Anthropic Python SDK v1.8.0 adds claude-opus-5-5, inline tool defs, and MCP tool-list pinning
sdkThe Anthropic Python SDK 1.8.0 adds API support for the new claude-opus-5-5 model, inline tool definitions, and a beta MCP tool-list pinning feature that lets clients lock the set of tools discovered from an MCP server. Also includes fixes: add_tools() now takes effect immediately, tool-runner compaction requests omit reply-only params, shared evaluated_permission enum for Managed Agents events, and a Python 3.13 stream-at-exit crash fix.
An agent can now call claude-opus-5-5, declare tools inline in requests, and pin an MCP server's tool list (beta) for stable, reproducible tool discovery across sessions.
Feature line explicitly mentions claude-opus-5-5, inline tool definitions, and MCP tool-list pinning (beta). Example code shows plausible usage; exact beta header name and tool_configuration field are inferred and may need verification against docs.
pip install anthropic==1.8.0from anthropic import Anthropic
client = Anthropic()
resp = client.beta.messages.create(
model="claude-opus-5-5",
max_tokens=1024,
tools=[
{
"name": "get_weather",
"description": "Look up current weather for a city.",
"input_schema": {
"type": "object",
"properties": {"city": {"type": "string"}},
"required": ["city"],
},
}
],
mcp_servers=[
{
"type": "url",
"url": "https://mcp.example.com",
"name": "example",
# Pin the tool list discovered from this MCP server (beta)
"tool_configuration": {"pinned_tool_list_version": "2026-09-22"},
}
],
messages=[{"role": "user", "content": "What's the weather in Tokyo?"}],
betas=["mcp-tool-list-pinning-2026-09-22"],
)
print(resp)