Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Deploy, evaluate, and manage AI agents end-to-end on Microsoft Azure AI Foundry
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
foundry-agent/create/references/skill-toolbox.md
1# Skills in Toolbox23How to attach, list, remove, and version **skills** (reusable behavioral guidelines) in a Foundry toolbox using `azd ai toolbox skill`.45Skills are not a tool `type` โ they live in a separate `skills[]` array in the toolbox manifest. At the MCP level, skills are exposed as **resources** (`resources/list` / `resources/read` with `skill://` URIs).67> ๐ For skill resource CRUD (`azd ai skill create/update/list/download/delete`), see [skill-management.md](skill-management.md).8>9> ๐ For consuming skills in agent code (Agent Framework SDK integration, progressive disclosure, `load_skill`), see [use-skills-in-hosted-agent.md](use-skills-in-hosted-agent.md).1011## Install1213```bash14azd extension install azure.ai.skills # skill CRUD15azd extension install azure.ai.toolboxes # toolbox management16```1718## CLI surface โ `azd ai toolbox skill`1920| Command | What it does |21|---------|--------------|22| `azd ai toolbox skill add <toolbox> <skill>` | Attach skill (follows default version); new immutable toolbox version. |23| `azd ai toolbox skill add <toolbox> <skill>@<ver>` | Attach skill pinned to a specific version. |24| `azd ai toolbox skill add <toolbox> --from-file <path>` | Attach multiple skills from JSON/YAML. |25| `azd ai toolbox skill list <toolbox>` | List skill references in the toolbox. |26| `azd ai toolbox skill remove <toolbox> <skill> [<skill>...] [--force]` | Detach skills; one new version. |2728> Every `skill add` / `skill remove` creates a new immutable toolbox version but does **not** change the default. Run `azd ai toolbox publish <toolbox> <version>` to promote.2930## Recipe: attach skill to existing toolbox3132```bash33# 1. Create the skill (if not already uploaded)34azd ai skill create support-style --file ./skills/support-style/3536# 2. Attach to toolbox37azd ai toolbox skill add agent-tools support-style3839# 3. Promote the new toolbox version40azd ai toolbox publish agent-tools <new-version>4142# 4. Verify43azd ai toolbox skill list agent-tools44```4546## Recipe: include skills in toolbox creation4748Skills are a top-level `skills[]` array in the `--from-file` manifest:4950```yaml51description: Agent toolbox with skills52connections:53- name: my-mcp-server54skills:55- name: support-style56- name: escalation-policy57version: "2" # pin to version 2; omit to follow default58tools:59- type: web_search60name: web61```6263```bash64azd ai toolbox create agent-tools --from-file tools.yaml65```6667When `version` is omitted from a skill entry, the toolbox resolves the skill's `default_version` at read time. If the skill is updated (`azd ai skill update`), agents on the consumer endpoint pick up the new content without a toolbox republish.6869## Recipe: remove skill from toolbox7071```bash72# Remove one or more skills (one new version)73azd ai toolbox skill remove agent-tools my-skill --force7475# Promote76azd ai toolbox publish agent-tools <new-version>77```7879Removing the last skill is allowed (the toolbox can still have connections and tools).8081## Versioning behavior8283- Each `skill add` / `skill remove` creates a new immutable toolbox version (default unchanged until `publish`).84- Skill references without a pinned version follow the skill's `default_version` at read time.85- Skill references with a pinned version (`skill@2`) stay on that version regardless of skill updates.86- To rollback: `azd ai toolbox publish <toolbox> <previous-version>`.8788## How skills appear at runtime (raw MCP protocol)8990Skills are exposed through the MCP **resources** protocol (not `tools/list`):9192- `resources/list` advertises each skill as a resource with a `skill://<name>/SKILL.md` URI (name + description).93- `resources/list` also exposes `skill://index.json` โ a discovery index listing every skill on the toolbox version with URLs to read each skill's `SKILL.md` and (for multi-file skills) its ZIP archive.94- `resources/read` with a `skill://` URI retrieves the full `SKILL.md` body on demand.9596### Raw MCP call examples9798```bash99# Get a bearer token100TOK=$(az account get-access-token --resource "https://ai.azure.com" --query accessToken -o tsv)101102# Foundry project endpoint (no trailing slash)103PE="<FOUNDRY_PROJECT_ENDPOINT>"104URL="$PE/toolboxes/<toolbox>/mcp?api-version=v1"105# List available skills (resources/list)106curl -s -X POST "$URL" \107-H "Authorization: Bearer $TOK" \108-H "Content-Type: application/json" \109-H "Foundry-Features: Toolboxes=V1Preview" \110-d '{"jsonrpc":"2.0","id":1,"method":"resources/list","params":{}}'111112# Read skill index113curl -s -X POST "$URL" \114-H "Authorization: Bearer $TOK" \115-H "Content-Type: application/json" \116-H "Foundry-Features: Toolboxes=V1Preview" \117-d '{"jsonrpc":"2.0","id":2,"method":"resources/read","params":{"uri":"skill://index.json"}}'118119# Read a specific skill's content120curl -s -X POST "$URL" \121-H "Authorization: Bearer $TOK" \122-H "Content-Type: application/json" \123-H "Foundry-Features: Toolboxes=V1Preview" \124-d '{"jsonrpc":"2.0","id":3,"method":"resources/read","params":{"uri":"skill://my-skill/SKILL.md"}}'125```126127> For how the Agent Framework SDK wraps these MCP resources into a `load_skill` tool for progressive disclosure, see [use-skills-in-hosted-agent.md](use-skills-in-hosted-agent.md).128129## Skill + Tool Search interaction130131When `toolbox_search_preview` is enabled, regular tools are hidden from `tools/list` and discovered via `tool_search`. Skills remain in `resources/list` regardless of this setting โ they are not affected by Tool Search.132133## Skills via Toolbox vs SkillsProvider: when to use which134135See [use-skills-in-hosted-agent.md ยง Choosing an approach](use-skills-in-hosted-agent.md) for a comparison table.136