Skip to content

Remove toolbox preview header from the Mastering Toolbox notebook - #73

Merged
nicholasdbrady merged 3 commits into
mainfrom
fix/toolbox-preview-header-scope
Jul 29, 2026
Merged

Remove toolbox preview header from the Mastering Toolbox notebook#73
nicholasdbrady merged 3 commits into
mainfrom
fix/toolbox-preview-header-scope

Conversation

@lindazqli

@lindazqli lindazqli commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

What

The mastering-foundry-toolbox.ipynb notebook applied a Foundry-Features: Toolboxes=V1Preview header (via a TOOLBOX_HEADERS constant) to every toolbox MCP call, the management REST API, and skill-resource reads. That header is not required for any of those paths. This PR removes it everywhere and corrects the surrounding prose.

Why

  • Tool consumption (MAF, LangGraph, Copilot SDK, raw MCP tools/list / call_tool) needs only a bearer token scoped to https://ai.azure.com/.default - no preview header.
  • Toolbox management REST (POST .../versions, PATCH .../{name}) needs only the bearer token.
  • Consuming skills as MCP resources (10b, resources/list / resources/read) is standard MCP against the same endpoint - no preview header.
  • The only flow that needs a preview feature flag is skills CRUD (project.beta.skills.* create / update-default), and the beta.skills SDK sends it automatically - so it is never set by hand in the notebook.

Changes

  • Removed the TOOLBOX_HEADERS definition and every **TOOLBOX_HEADERS spread (5 REST, verify cells, 10b skills, MAF, LangGraph, Copilot SDK).
  • Updated intro, 5, 9, and 4l prose accordingly.

No tool behavior changes - the removed headers were unnecessary. Notebook JSON validated; all 59 cells intact.

@lindazqli
lindazqli requested a review from a team as a code owner July 16, 2026 07:59
@lindazqli
lindazqli force-pushed the fix/toolbox-preview-header-scope branch from daab7b6 to 14a884b Compare July 17, 2026 01:32
@lindazqli lindazqli changed the title Scope Toolboxes preview header to skills + management REST only Remove toolbox preview header from the Mastering Toolbox notebook Jul 17, 2026

@nicholasdbrady nicholasdbrady left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cookbook review: Publish after fixes

The general Toolboxes=V1Preview cleanup is consistent, but the Skills path still needs one correction before merge.

  • Required: Section 4l · Skills now says Skills CRUD is the only flow that needs a preview feature flag. Current Microsoft Learn guidance also requires Foundry-Features: Skills=V1Preview when a toolbox version includes a skill reference. This notebook pins azure-ai-projects 2.3.x and calls project.toolboxes.create_version(..., skills=...); that stable operation does not inject the Skills header. With SKILL_NAME set, the version-creation cells can therefore fail. Conditionally pass headers={"Foundry-Features": "Skills=V1Preview"} whenever skills is non-empty (including the normal, search-first, and RAI-guarded version creation paths), and update the prose so it does not claim only Skills CRUD is preview-gated. The optional REST example currently has no skills payload, so it does not need the header unless that payload is extended.

After the fix, exercise the notebook path with SKILL_NAME set to confirm skill attachment succeeds.

What works: The obsolete toolbox header constant and its MCP/management call sites were removed consistently; notebook cell IDs, metadata, outputs, and execution counts remain unchanged, and the PR checks pass.

Stable azure-ai-projects 2.3.x toolboxes.create_version does not auto-inject the Skills preview header, so passing a non-empty skills= would fail. Conditionally send headers={'Foundry-Features': 'Skills=V1Preview'} on all three version-creation paths (normal, search-first, RAI-guarded) only when skills is present, and correct the Section 4l prose that claimed skills CRUD was the only preview-gated flow.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@nicholasdbrady
nicholasdbrady merged commit 913ae6a into main Jul 29, 2026
5 checks passed
@nicholasdbrady
nicholasdbrady deleted the fix/toolbox-preview-header-scope branch July 29, 2026 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants