115 pages for initialize.
Titles and paths first, then pages whose text carries it. Each row opens that page as this site last read it.
customer-support-chat
Claude Developer Platform · in the page
about-claude/use-case-guides/customer-support-chat
…quire "anthropic" class ChatBot attr_reader :messages def initialize @anthropic = Anthropic::Client.new @messages = [] end def generate_message(messages, max_tokens)…
legal-summarization
Claude Developer Platform · in the page
about-claude/use-case-guides/legal-summarization
…the Claude SDK to run it. </CodeGroupItem> ```python Python # Initialize the Anthropic client client = anthropic.Anthropic() def summarize_document( text, details_to_extract, model…
mcp-connector
Claude Developer Platform · in the page
agents-and-tools/mcp-connector
…entSession(read, write) as mcp_client: await mcp_client.initialize() # List tools and convert them for the Claude API tools_result = await mcp_client.list_to…
bash-tool
Claude Developer Platform · in the page
agents-and-tools/tool-use/bash-tool
…ss BashSession attr_reader :output, :wait_thread def initialize start end # Run a command in the session and return its output. def execute_command(…
fine-grained-tool-streaming
Claude Developer Platform · in the page
agents-and-tools/tool-use/fine-grained-tool-streaming
…ation contract: 1. On `content_block_start` with `type: "tool_use"`, initialize an empty string: `input_json = ""`. 2. For each `content_block_delta` with `type: "input_json_delta"`, append: `input_j…
memory-tool
Claude Developer Platform · in the page
agents-and-tools/tool-use/memory-tool
…rom the state the last one recorded. ### How the pattern works 1. **Initializer session:** The first session sets up the memory files before any substantive work starts. This includes a progress log…
text-editor-tool
Claude Developer Platform · in the page
agents-and-tools/tool-use/text-editor-tool
…tor_20250728"` for Claude 4 and later models. <Steps> <Step title="Initialize your editor implementation"> Create helper functions to handle file operations such as reading, writing, and modify…
Log at info level
Claude Developer Platform · in the page
agents-and-tools/tool-use/tool-runner
…with typed input schemas. ```ruby require "anthropic" # Initialize client client = Anthropic::Client.new # Define input schema class GetWeatherInput < Anthropic::BaseModel…
Vaults
Claude Developer Platform · in the page
api/beta/vaults
…- `method: string` The MCP method that failed (for example `initialize` or `tools/list`). - `refresh: BetaManagedAgentsRefreshObject or null` Details of the refresh-token exchange at…
Credentials
Claude Developer Platform · in the page
api/beta/vaults/credentials
…- `method: string` The MCP method that failed (for example `initialize` or `tools/list`). - `refresh: BetaManagedAgentsRefreshObject or null` Details of the refresh-token exchange at…
Validate an MCP OAuth Credential
Claude Developer Platform · in the page
api/beta/vaults/credentials/mcp_oauth_validate
…- `method: string` The MCP method that failed (for example `initialize` or `tools/list`). - `refresh: BetaManagedAgentsRefreshObject or null` Details of the refresh-token exchange at…
mid-conversation-effort-example
Claude Developer Platform · in the page
build-with-claude/mid-conversation-effort-example
…gled with mid-conversation system messages. class ModeAgent def initialize(model, mode_on: true) @model = model @mode_on = mode_on @messages = [] @mode_announced = false…
search-results
Claude Developer Platform · in the page
build-with-claude/search-results
…m the dashboard, 3) Install our SDK using pip install company-sdk, 4) Initialize the client with your API key." } ], "citations": { "enabled…
apple-foundation-models
Claude Developer Platform · in the page
cli-sdks-libraries/libraries/apple-foundation-models
…Plan a 4-day trip to Buenos Aires.") print(response.content) ``` The initializer also accepts `baseURL` (default `https://api.anthropic.com`), `timeout`, and `serverTools` (see [Server-side tools](ht…
php
Claude Developer Platform · in the page
cli-sdks-libraries/sdks/php
…equest option for this SDK. ## Value objects The recommended way to initialize value objects is the static `with` constructor `Base64ImageSource::with(data: "U3RhaW5sZXNzIHJvY2tz", ...)` with named…
spawn.sh: called once per claimed work item
Claude Developer Platform · in the page
managed-agents/self-hosted-sandboxes
…ncAnthropic() as client, ): await mcp_session.initialize() listed = await mcp_session.list_tools() agent = await client.beta.agents.create(…
self-hosted-sandboxes-custom-tools
Claude Developer Platform · in the page
managed-agents/self-hosted-sandboxes-custom-tools
…ncAnthropic() as client, ): await mcp_session.initialize() listed = await mcp_session.list_tools() agent = await client.beta.agents.create(…
tools-web-restrictions
Claude Developer Platform · in the page
managed-agents/tools-web-restrictions
…onger valid The session checks the configuration again when it first initializes the tool. If a setting that was accepted earlier is no longer valid at that point, the session emits a [`session.error…
vaults
Claude Developer Platform · in the page
managed-agents/vaults
…token": false, "status": "invalid", "mcp_probe": { "method": "initialize", "http_response": { "status_code": 401, "content_type": "application/json", "body": "{\"error\":…
Intercept and control agent behavior with hooks
Claude Code CLI · in the page
agent-sdk/hooks
…ssiondenied) | | `SessionStart` | No | Yes | Session initialization | Initialize logging and telemetry | | `SessionEnd` | No | Yes | Session termination | Clean up temporary resources | | `Notificatio…
Connect to external tools with MCP
Claude Code CLI · in the page
agent-sdk/mcp
…md) for implementation details. An SDK MCP server registered by an [`initialize` control request](/docs/en/agent-sdk/typescript#sdkcontrolinitializeresponse) begins connecting as soon as Claude Code…
Agent SDK reference - Python
Claude Code CLI · in the page
agent-sdk/python
…Methods | Method | Description | | :- | :- | | `__init__(options)` | Initialize the client with optional configuration | | `connect(prompt)` | Connect to Claude with an optional initial prompt or mes…
Quickstart
Claude Code CLI · in the page
agent-sdk/quickstart
…package manager that handles virtual environments automatically. Then initialize a project and add the SDK: ```bash theme={null} uv init uv add claude-agent-sdk ``` **Python (pip)** Create and acti…
Agent SDK reference - TypeScript
Claude Code CLI · in the page
agent-sdk/typescript
…up()` Pre-warms the CLI subprocess by spawning it and completing the initialize handshake before a prompt is available. The returned [`WarmQuery`](#warmquery) handle accepts a prompt later and writes…
Commands
Claude Code CLI · in the page
commands
…| Initialize project with a `CLAUDE.md` guide. Set `CLAUDE_CODE_NEW_INIT=1` for an interactive flow that also walks through skills,…
Error reference
Claude Code CLI · in the page
errors
…rocess. Before v2.1.174, a background session assigned to an idle pre-initialized worker could fail this way even when valid credentials were configured. Before v2.1.176, a cloud session that sat idle…
Plugin manifest reference
Claude Code CLI · in the page
plugins/manifest-reference
…server process | | `initializationOptions` | No | Options sent in the initialize request | | `settings` | No | Settings sent by `workspace/didChangeConfiguration` | | `workspaceFolder` | No | Workspac…
Troubleshoot a mod
Claude Code CLI · in the page
plugins/mods/troubleshoot
…A value resets when the module reloads Module-level variables are re-initialized on each reload. [Keep the value in `$.state` or `$.store`](/docs/en/plugins/mods/interface#keep-state). ### A value…
Customize sessions in self-hosted environments
Claude Code CLI · in the page
self-hosted-environments-configuration
…nnect in the background. While the session waits here, it's slower to initialize. [`MCP_CONNECT_TIMEOUT_MS`](/docs/en/env-vars) changes the 5-second default. * **First turn**: after the message arrive…
Deploy self-hosted environments to production
Claude Code CLI · in the page
self-hosted-environments-deploy
…at startup. See [Shutdown timing](#shutdown-timing). Once logging is initialized, the runner writes its lifecycle log, including `[runner:fatal]` lines, to stdout, and debug output to stderr, all as…
Self-hosted environments reference
Claude Code CLI · in the page
self-hosted-environments-reference
…s-configuration.md#keep-stdin-and-file-descriptor-3-attached) that it initialized within N minutes. The N minutes start at spawn, after cloning, and start over at each `user` or `assistant` message th…
Troubleshoot installation and login
Claude Code CLI · in the page
troubleshoot-install
…handshake failed: * `curl: (35) TLS connect error` * `schannel: next InitializeSecurityContext failed` * PowerShell's `Could not create SSL/TLS secure channel` * PowerShell's `Could not establish tru…
Run parallel sessions with worktrees
Claude Code CLI · in the page
worktrees
…# Set up the worktree environment A worktree is a fresh checkout, so initialize your development environment there: ask Claude to install dependencies, or run your project's setup yourself in the wor…
Lazy authentication for MCP servers
Claude Documentation · in the page
connectors/building/lazy-authentication
…actBearer(req); const authed = isTokenValid(token); // The gate. initialize, tools/list, and public tool calls fall through. if (!authed && callsProtectedTool(req.body)) { res .status…
Manage your directory listing
Claude Documentation · in the page
connectors/building/managing-your-listing
…last 30 days. Every MCP message counts toward the ranking, including `initialize` and `tools/list`, and it includes accounts whose connection attempt never finished authenticating, which is a broader…
Design guidelines
Claude Documentation · in the page
connectors/building/mcp-apps/design-guidelines
…r app supports through `appCapabilities.availableDisplayModes` in `ui/initialize`. The host responds with the modes it supports, and your app can request a switch with `ui/request-display-mode`. Modes…
Supersede older widget instances
Claude Documentation · in the page
connectors/building/mcp-apps/instance-supersession
…the announce() definition in the broadcast snippet, // so channel is initialized before announce() runs. const serverKey = await Promise.race([ serverKeyReady, new Promise<null>((r) => setTimeout…
Test your connector
Claude Documentation · in the page
connectors/building/testing
…## Detect Claude as the client Claude identifies itself in the MCP `initialize` handshake through `clientInfo`, but the exact value depends on the surface and the request path. You may see `"name":…
Changelog
Claude Documentation · in the page
cowork/changelog
…**Code** * Fixed Code sessions started in a git worktree failing to initialize on Windows. **Cowork** * No user-facing changes. **3P** * No user-facing changes. **v1.46388.1** 2026-09-04 **Ge…
MCP, plugins, skills, and hooks
Claude Documentation · in the page
third-party/claude-desktop/extensions
…nectors** has a **Test this connection** button that runs a live MCP `initialize` and `tools/list` against the server using the headers or OAuth settings you've entered, then shows the round-trip late…
Build an MCP client
Model Context Protocol · in the page
docs/2024-11-05/develop/build-client
…riables from .env class MCPClient: def __init__(self): # Initialize session and client objects self.session: Optional[ClientSession] = None self.exit_stack = AsyncExitStac…
Build an MCP server
Model Context Protocol · in the page
docs/2024-11-05/develop/build-server
…ng import Any import httpx from mcp.server.fastmcp import FastMCP # Initialize FastMCP server mcp = FastMCP("weather") # Constants NWS_API_BASE = "https://api.weather.gov" USER_AGENT = "weather-app…
Client Best Practices
Model Context Protocol · in the page
docs/2024-11-05/develop/clients/client-best-practices
…ble Model->>Host: enable_server("salesforce") Host->>Server: Initialize connection Server-->>Host: Server capabilities + tools Host-->>Model: Salesforce server connected Note ove…
Architecture overview
Model Context Protocol · in the page
docs/2024-11-05/learn/architecture
…ycle management](#lifecycle-management) section, the client sends an `initialize` request to establish the connection and negotiate supported features. ```json Initialize Request theme={null} { "js…
Debugging
Model Context Protocol · in the page
docs/2024-11-05/tools/debugging
…to a client that hasn't declared that capability. Inspect the [`initialize` exchange](/specification/2024-11-05/basic/lifecycle#initialization) to verify both sides declared what you expect…
Understanding Authorization in MCP
Model Context Protocol · in the page
docs/2024-11-05/tutorials/security/authorization
…from "@modelcontextprotocol/sdk/server/streamableHttp.js"; import { isInitializeRequest } from "@modelcontextprotocol/sdk/types.js"; import { z } from "zod"; import cors from "cors"; import { mcpAut…
Security Best Practices
Model Context Protocol · in the page
docs/2024-11-05/tutorials/security/security_best_practices
…participant ServerB participant Attacker Client->>ServerA: Initialize (connect to HTTP server) ServerA-->>Client: Respond with session ID Attacker->>ServerB: Access/guess session I…
Build an MCP client
Model Context Protocol · in the page
docs/2025-03-26/develop/build-client
…riables from .env class MCPClient: def __init__(self): # Initialize session and client objects self.session: Optional[ClientSession] = None self.exit_stack = AsyncExitStac…
Build an MCP server
Model Context Protocol · in the page
docs/2025-03-26/develop/build-server
…ng import Any import httpx from mcp.server.fastmcp import FastMCP # Initialize FastMCP server mcp = FastMCP("weather") # Constants NWS_API_BASE = "https://api.weather.gov" USER_AGENT = "weather-app…
Client Best Practices
Model Context Protocol · in the page
docs/2025-03-26/develop/clients/client-best-practices
…ble Model->>Host: enable_server("salesforce") Host->>Server: Initialize connection Server-->>Host: Server capabilities + tools Host-->>Model: Salesforce server connected Note ove…