SPB Git forge

spb/doc-api

Public
2commits 1branches 0releases
15.7 MBsize
maindefault branch
13 days agolast push
Python 88.3% TypeScript 7.6% Shell 4.1%
10.5 KB

# Anthropic tool-use ecosystem — index

Status: DOCUMENTED + LIVE_VERIFIED (82 live probe calls on 2026-09-18 — 45 × 200, 37 deliberate 400 validation probes — plus the two shared loops and the cheap pytest run; total ≈ $0.15; see reports/live-requests.jsonl, notes tools:*, raw sanitized responses in tmp-live/tools/). Sources: Tool use overview · Tool reference · Server tools · Messages API reference · Beta Messages reference · API release notes · SDK type lists sources/anthropic/openapi/{python,node}-sdk-api.md. Last verified: 2026-09-18. Machine-readable twins: generated/fragments/tools/anthropic-tools.json, generated/fragments/parameters/anthropic-tools.json, generated/fragments/objects/anthropic-tool-blocks.json, generated/fragments/compatibility/anthropic-tool-model-matrix.json.

# Taxonomy

Category Who executes Request shape Response blocks Pages
Client (user-defined) your code {name, description, input_schema, strict?, input_examples?, eager_input_streaming?, …} (type omitted or "custom") tool_use → you send tool_result custom-tools-and-tool-choice, tool-use-loop, fine-grained-tool-streaming
Anthropic-schema client tools your code (schema trained-in) {type: bash_20250124, name: bash}, text_editor_20250728 / str_replace_based_edit_tool, memory_20250818 / memory, beta computer_20251124 / computer_20250124 / computer tool_use (input {command…} / {action…}) → tool_result bash, text-editor, memory, computer-use
Client toolsets (GA 2026-08-19) your code one entry, no name: {type: computer_toolset_20260801} / {type: browser_toolset_20260801} (+ configs) tool_use with name=<member>, `toolset_name: computer browser; results must echo toolset_name`
Server tools Anthropic web_search_2025…/2026…, web_fetch_…, code_execution_…, `tool_search_tool_regex bm25_20251119, beta advisor_20260301` server_tool_use (id srvtoolu_…) + <tool>_tool_result; stop_reason: pause_turn possible
Programmatic Anthropic sandbox calls your tool any tool with allowed_callers: ["code_execution_20260120"] + code_execution_20260120+ server_tool_use{name: code_execution} → tool_use with caller: {type: code_execution_20260120, tool_id} → code_execution_tool_result programmatic-tool-calling
MCP (beta) Anthropic ↔ remote MCP server request mcp_servers[] + tools[]: {type: mcp_toolset, mcp_server_name} mcp_tool_use (id mcptoolu_…) + mcp_tool_result mcp-connector

Every tool_use block returned live carried caller: {"type": "direct"} (haiku 4.5, sonnet 4.6, sonnet 5) — the docs present caller only on the programmatic-tool-calling page.

# Exact type strings (docs ∩ SDK ∩ live)

Live probe k_types_* (an unknown type on each of the 11 live models) returned the same GA-schema tag list for every model: bash_20250124, browser_toolset_20260801, code_execution_20250522, code_execution_20250825, code_execution_20260120, code_execution_20260521, computer_toolset_20260801, custom, memory_20250818, text_editor_20250124, text_editor_20250429, text_editor_20250728, tool_search_tool_bm25, tool_search_tool_bm25_20251119, tool_search_tool_regex, tool_search_tool_regex_20251119, web_fetch_20250910, web_fetch_20260209, web_fetch_20260309, web_fetch_20260318, web_search_20250305, web_search_20260209, web_search_20260318. Beta-only tags (accepted only with their header): computer_20251124, computer_20250124, advisor_20260301, mcp_toolset. Per-model gating is a second step ('<model>' does not support tool types: … with a "Did you mean" list). SDK-only names (no live/doc use for current models): BetaToolComputerUse20241022, BetaToolBash20241022, BetaToolTextEditor20241022.

# Tool × model matrix (docs; ✔︎L = live verified 2026-09-18, ✘L = live 400)

Tool type Haiku 4.5 Sonnet 4.5 Sonnet 4.6 Sonnet 5 Opus 4.5 Opus 4.6 Opus 4.7 Opus 4.8 Opus 5 Fable 5 / 5.1 Mythos 5 / 5.1
custom, bash_20250124, text_editor_20250728, memory_20250818 ✔︎L ✔︎ ✔︎ ✔︎ ✔︎ ✔︎ ✔︎ ✔︎ ✔︎ ✔︎ (5.1: tool_choice any/tool → 400) ✔︎
text_editor_20250429 / _20250124 ✘L ? ? ? ? ? ? ? ? ? ?
web_search_20250305, web_fetch_20250910 ✔︎L ✔︎ ✔︎ ✔︎ ✔︎ ✔︎ ✔︎ ✔︎ ✔︎ ✔︎ ✔︎
web_search_20260209/_20260318, web_fetch_20260209/_0309/_0318 ✔︎L only with allowed_callers:["direct"] direct only (web fetch dyn. filtering list) ✔︎ ✔︎ direct only for web fetch ✔︎ ✔︎ ✔︎ ✔︎ ✔︎ ✔︎
code_execution_20250825/_20260120/_20260521 ✔︎L (no PTC/REPL) ✔︎ ✔︎L ✔︎ ✔︎ ✔︎ ✔︎ ✔︎ ✔︎ ✔︎ ✔︎
programmatic tool calling ✘L ✔︎ ✔︎L ✔︎ ✔︎ ✔︎ ✔︎ ✔︎ ✔︎ ✔︎ ✔︎
tool_search_tool_regex/bm25_20251119 ✔︎L ✔︎ ✔︎ (not in table — assumed) ✔︎ ✔︎ ✔︎ ✔︎ ✔︎ ✔︎ ✔︎
computer_toolset_20260801, browser_toolset_20260801 ✘L ✘ ✘ ✔︎L ✘ ✘ ✘ ✔︎ ✔︎ ✔︎ ✔︎
computer_20251124 (beta) ✘L ✘ ✔︎L ✔︎ ✔︎ ✔︎ ✔︎ ✔︎ ✔︎ ✔︎ ✔︎
computer_20250124 (beta) ✔︎L ✔︎ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘
advisor_20260301 as executor (beta) ✔︎L ✘ ✔︎ ✔︎ ✘ ✔︎ ✔︎ ✔︎ ✔︎ ✔︎ ✔︎
mcp_toolset (beta) ✔︎L ✔︎ ✔︎ ✔︎ ✔︎ ✔︎ ✔︎ ✔︎ ✔︎ ✔︎ ✔︎

Mythos models are documented but absent from our /v1/models list (ACCOUNT_RESTRICTED). Full per-cell records: generated/fragments/compatibility/anthropic-tool-model-matrix.json (360 rows).

# Tool × beta header

Feature Header today History
Custom tools, bash, text editor, memory, web search, web fetch, code execution, tool search, PTC, fine-grained streaming, toolsets none tool use GA 2024-05-30 · computer-use-2024-10-22 (bash/editor 20241022) · memory & tool-search/PTC/code-exec/web-fetch/input_examples headers dropped 2026-02-17 · fine-grained-tool-streaming-2025-05-14 dropped 2026-02-05 (still accepted, live b3) · legacy code-execution-2025-05-22 / code-execution-2025-08-25 remain valid opt-ins
computer_20251124 computer-use-2025-11-24 live 400 without it
computer_20250124 computer-use-2025-01-24 since 2025-02-24
advisor_20260301 advisor-tool-2026-03-01 beta since 2026-04-09; live 400 without
mcp_servers + mcp_toolset mcp-client-2025-11-20 mcp-client-2025-04-04 deprecated but still works live (k13b); the 400 for a missing header advertises mcp-client-2026-09-15, which is itself rejected as an unknown beta value (k13) — LIVE_DISCOVERED inconsistency

# Version history (release notes + tool pages)

Date Event
2024-05-30 Tool use GA (no header)
2024-10-03 tool_choice.disable_parallel_tool_use
2024-10-22 computer_20241022, bash_20241022, text_editor_20241022 (beta computer-use-2024-10-22, Sonnet 3.5)
2025-02-24 computer_20250124 (+ hold_key, left_mouse_down/up, scroll, triple_click, wait), bash_20250124, text_editor_20250124 (no header); token-efficient tool use
2025-02-27 tool_choice: none; tools no longer required when replaying tool blocks
2025-04-29 text_editor_20250429 (Claude 4, drops undo_edit, name str_replace_based_edit_tool)
2025-05-07 web_search_20250305
2025-05-22 code_execution_20250522 (Python only), MCP connector beta (mcp-client-2025-04-04), Files API
2025-06-11 fine-grained tool streaming beta
2025-07-28 text_editor_20250728 (+ max_characters)
2025-09-02 code_execution_20250825 (bash + file ops)
2025-09-10 web_fetch_20250910 beta
2025-09-29 memory_20250818 beta
2025-11-20 mcp-client-2025-11-20 (mcp_toolset)
2025-11-24 tool search (tool_search_tool_regex/bm25_20251119) + programmatic tool calling beta; computer_20251124 (beta computer-use-2025-11-24)
2026-02-05 fine-grained streaming no header (eager_input_streaming)
2026-02-17 web search / PTC / code exec / web fetch / tool search / memory / input_examples GA; web_search_20260209, web_fetch_20260209 (dynamic filtering); code execution free with web tools
2026-03 web_fetch_20260309 (use_cache)
2026-04-09 advisor_20260301 beta
2026-06-11 code_execution_20260521, web_search_20260318, web_fetch_20260318 (response_inclusion)
2026-06-18 SDKs ship code_execution_20260120
2026-08-19 computer_toolset_20260801 GA, browser_toolset_20260801 launched
2026-09-01 Fable 5.1 / Mythos 5.1: tool_choice any/tool → 400

# Pricing summary

Tokens (definitions + tool_use + tool_result + per-model tool-use system prompt: Haiku 4.5 / Sonnet 4.5 / Opus 4.5 = 496 (auto/none) or 588 (any/tool); Sonnet 4.6 / Opus 4.6 = 497/589; Opus 4.7 = 675/804; Opus 4.8 = 290/410; Opus 5 = 286/406; Sonnet 5 = 354/474). Live count_tokens on haiku 4.5: 11 → 581 tokens with one small tool; tool_choice: any +92; bash 751; text editor 1252; memory 1576; computer_20250124 1826. Web search $10 / 1,000 searches; web fetch free; code execution 1,550 free container-hours per org per month then $0.05/h (free with web_*_20260209+); advisor sub-inference at the advisor model's rate; MCP tokens only.