Follow Discord
Sweep 22 Oct 2026 · 21:04Z Build v2.1.309 528 read Stable v2.1.308 Latest v2.1.309 Next v2.1.309 Feeds RSS JSON llms.txt llms-full.txt Unofficial
HomeDocsSearch
Search the documentation

114 pages for args.

Titles and paths first, then pages whose text carries it. Each row opens that page as this site last read it.

Or, for the model with the same capabilities and no access approval requirement: Claude Developer Platform · in the page about-claude/models/migration-guide …s AdaptiveThinkingExample { public static void main(String[] args) { AnthropicClient client = AnthropicOkHttpClient.fromEnv(); MessageCreateParams params = MessageC… mcp-connector Claude Developer Platform · in the page agents-and-tools/mcp-connector …const transport = new StdioClientTransport({ command: "mcp-server", args: [] }); const mcpClient = new Client({ name: "my-client", version: "1.0.0" }); await mcpClient.connect(transport); //… bash-tool Claude Developer Platform · in the page agents-and-tools/tool-use/bash-tool …-l *.csv && ls -lh *.csv` * Searching files: `find . -name "*.py" | xargs grep "pattern"` * Creating backups: `tar -czf backup.tar.gz ./data` ### System tasks * Checking resources: `df -h && free -… build-a-tool-using-agent Claude Developer Platform · in the page agents-and-tools/tool-use/build-a-tool-using-agent …reate a calendar event with attendees and optional recurrence. Args: title: Event title. start: Start time in ISO 8601 format. end: End time in ISO 8601 format.… Log at info level Claude Developer Platform · in the page agents-and-tools/tool-use/tool-runner …str: """Get the current weather in a given location. Args: location: The city and state, e.g. San Francisco, CA unit: Temperature unit, either 'celsius' or 'fa… claude-on-amazon-bedrock-legacy Claude Developer Platform · in the page build-with-claude/claude-on-amazon-bedrock-legacy …ublic class BasicMessage { public static void main(String[] args) { AnthropicClient client = AnthropicOkHttpClient.builder() .backend(BedrockBackend.fromEnv()… sent_count = len(messages sent in the compaction request) Claude Developer Platform · in the page build-with-claude/compaction …messages = new ArrayList<>(); public static void main(String[] args) { System.out.println(chat("Help me build a Python web scraper")); System.out.println(chat("Add support f… compaction-threshold Claude Developer Platform · in the page build-with-claude/compaction-threshold …messages = new ArrayList<>(); public static void main(String[] args) { System.out.println(chat("Help me build a Python web scraper")); System.out.println(chat("Add support f… mid-conversation-effort-example Claude Developer Platform · in the page build-with-claude/mid-conversation-effort-example …ound above, no fan-out needed.")); ``` ```csharp C# var task = args.Length > 0 ? args[0] : "Explore the current directory, then give a thorough review: what it does, " + "… Request 2 caches its request content (not the response) Claude Developer Platform · in the page build-with-claude/prompt-caching …class PromptCachingExample { public static void main(String[] args) { AnthropicClient client = AnthropicOkHttpClient.fromEnv(); MessageCreateParams params = MessageCreateP… token-counting Claude Developer Platform · in the page build-with-claude/token-counting …ic class CountTokensExample { public static void main(String[] args) { AnthropicClient client = AnthropicOkHttpClient.fromEnv(); MessageCountTokensParams params = MessageCo… scripting Claude Developer Platform · in the page cli-sdks-libraries/cli/scripting …mits one bare ID on each line, so standard tools such as `head` and `xargs` apply directly. Capture the first result, then pass it to a follow-up command: ```bash FIRST_AGENT=$(ant beta:agents list -… openai-sdk Claude Developer Platform · in the page cli-sdks-libraries/libraries/openai-sdk …; public class QuickStart { public static void main(String[] args) { OpenAIClient client = OpenAIOkHttpClient.builder() .apiKey(System.getenv("ANTHROPIC_API_KEY")) //… java Claude Developer Platform · in the page cli-sdks-libraries/sdks/java …tln(...)` and place the body inside `public static void main(String[] args)` within a class. </Note> ## Quick start ```java import com.anthropic.client.AnthropicClient; import com.anthropic.client.o… For Amazon Bedrock support Claude Developer Platform · in the page cli-sdks-libraries/sdks/python …ation: str) -> str: """Get the weather for a given location. Args: location: The city and state, for example, San Francisco, CA Returns: A JSON-encoded string with the loc… typescript Claude Developer Platform · in the page cli-sdks-libraries/sdks/typescript …r const transport = new StdioClientTransport({ command: "mcp-server", args: [] }); const mcpClient = new Client({ name: "my-client", version: "1.0.0" }); await mcpClient.connect(transport); // Use MC… migration Claude Developer Platform · in the page managed-agents/migration …current weather for a city.", {"city": str}) async def get_weather(args: dict) -> dict: return {"content": [{"type": "text", "text": f"{args['city']}: 18°C, clear"}]} options = ClaudeAgen… spawn.sh: called once per claimed work item Claude Developer Platform · in the page managed-agents/self-hosted-sandboxes …// inside needs the secret to mount the session's memory stores. args := []string{"run", "--rm", "--detach"} for _, name := range sandboxEnv { args = append(args, "-e", name) } launc… self-hosted-sandboxes-workers Claude Developer Platform · in the page managed-agents/self-hosted-sandboxes-workers …// inside needs the secret to mount the session's memory stores. args := []string{"run", "--rm", "--detach"} for _, name := range sandboxEnv { args = append(args, "-e", name) } launc… sessions Claude Developer Platform · in the page managed-agents/sessions …: // create() strips nulls from raw arrays and ::with() treats null args as omitted. $overrides['system'] = null; $overrideSession = $client->beta->sessions->create( agent: $overrides,… webhooks Claude Developer Platform · in the page managed-agents/webhooks …HROPIC_WEBHOOK_SIGNING_KEY from env var app = WebApplication.Create(args); app.MapPost("/webhook", async (HttpRequest request) => { using var reader = new StreamReader(request.Body);… Use Claude Code features in the SDK Claude Code CLI · in the page agent-sdk/claude-code-features …ResultMessage import asyncio # PreToolUse hook callback. Positional args: # input_data: HookInput dict with tool_name, tool_input, hook_event_name # tool_use_id: str | None, the ID of the tool c… Give Claude custom tools Claude Code CLI · in the page agent-sdk/custom-tools …* **TypeScript**: a [Zod schema](https://zod.dev/). The handler's `args` take their types from it. Call `.describe()` on a field to give it a description Claude sees. * **Python**: a dict mapping… Rewind file changes with checkpointing Claude Code CLI · in the page agent-sdk/file-checkpointing …ceptEdits", # Auto-accept file edits without prompting extra_args={ "replay-user-messages": None }, # Required to receive checkpoint UUIDs in the response stream )… Connect to external tools with MCP Claude Code CLI · in the page agent-sdk/mcp …mcpServers: { filesystem: { command: "npx", args: ["-y", "@modelcontextprotocol/server-filesystem", "/Users/me/projects"] } }, allowedTools: ["mcp__filesystem__… Modifying system prompts Claude Code CLI · in the page agent-sdk/modifying-system-prompts …ess.md#start-faster-with-bare-mode) by passing `--bare` through `extraArgs` or setting `CLAUDE_CODE_SIMPLE=1`, recording stays off unless you set `snapshot: true`. Recording an `append` or custom pro… Agent SDK reference - Python Claude Code CLI · in the page agent-sdk/python …ed, TypedDict from claude_agent_sdk import tool class ForecastArgs(TypedDict): latitude: Annotated[float, "Latitude coordinate"] hours: NotRequired[Annotated[int, "How many hours… Agent SDK reference - TypeScript Claude Code CLI · in the page agent-sdk/typescript …me: string, description: string, inputSchema: Schema, handler: (args: InferShape<Schema>, extra: unknown) => Promise<CallToolResult>, extras?: { annotations?: ToolAnnotations; searchHint?: str… Manage multiple agents with agent view Claude Code CLI · in the page agent-view …stop command again. If the process remains, check it with `ps -ww -o args= -p <pid>`: Claude Code started with `daemon` is a supervisor, so run `kill -9 <pid>`. Leave anything else; if `claude agents… Claude Code changelog Claude Code CLI · in the page changelog …and health status * Fixed `claude mcp get` showing no Type, Command, Args, or Environment for stdio servers whose config entry omits the `type` field * Fixed `.claude/settings.local.json` allow rules… Channels reference Claude Code CLI · in the page channels-reference …theme={null} { "mcpServers": { "webhook": { "command": "bun", "args": ["./webhook.ts"] } } } ``` Claude Code reads your MCP config at startup and spawns each server as a subprocess. **4. Te… Explore the .claude directory Claude Code CLI · in the page claude-directory …: `{ "mcpServers": { "notion": { "command": "npx", "args": ["-y", "@notionhq/notion-mcp-server"], "env": { "NOTION_TOKEN": "\${NOTION_TOKEN}" } } } }`,… Debug your configuration Claude Code CLI · in the page debug-your-config …start shows as failed in `/mcp`. Relative file paths in `command` or `args` are a frequent cause, since they resolve against the directory you launched Claude Code from rather than the location of `.m… Desktop application Claude Code CLI · in the page desktop …"name": "my-app", "runtimeExecutable": "npm", "runtimeArgs": ["run", "dev"], "port": 3000 } ] } ``` You can define multiple configurations to run different servers from th… Development containers Claude Code CLI · in the page devcontainer …reference adds the `NET_ADMIN` and `NET_RAW` capabilities through `runArgs`. The firewall script and these capabilities are not required for Claude Code itself: you can leave them out and rely on your… Claude Code GitHub Actions Claude Code CLI · in the page github-actions …me as a first install. * Add the `--comment` argument and the `claude_args` line from the [review workflow example](#run-a-skill) to the checked-in file yourself, which keeps any other edits you made… Use Claude Code GitHub Actions with cloud providers Claude Code CLI · in the page github-actions-cloud-providers …token.outputs.token }} use_bedrock: "true" claude_args: '--model us.anthropic.claude-sonnet-4-6' ``` > [!TIP] > > Bedrock model IDs include a cross-region inference profile prefix… Glossary Claude Code CLI · in the page glossary …o server runs as a process Claude Code starts from the `command` and `args` fields of its configuration, which have nothing to do with the [commands](#command) you type at the prompt. Learn more: [Mo… Hooks reference Claude Code CLI · in the page hooks …and": "${CLAUDE_PROJECT_DIR}/.claude/hooks/block-rm.sh", "args": [] } ] } ] } } ``` The script reads the JSON input from stdin, extracts the command, and ret… Automate actions with hooks Claude Code CLI · in the page hooks-guide …": [{ "type": "command", "command": "jq -r '.tool_input.file_path' | xargs npx prettier --write" }] } ], "Notification": [ { "matcher": "", "hooks": [{ "type": "com… Control MCP server access for your organization Claude Code CLI · in the page managed-mcp …"stdio", "command": "/usr/local/bin/company-mcp-server", "args": ["--config", "/etc/company/mcp-config.json"], "env": { "COMPANY_API_URL": "https://internal.example.com"… Connect Claude Code to tools via MCP Claude Code CLI · in the page mcp …onment, so referencing it via `${VAR}` expansion in the `command` or `args` of a project-scoped `.mcp.json` entry or a local- or user-scoped server entry in `~/.claude.json` requires a default such as… Connect to MCP servers Claude Code CLI · in the page mcp-quickstart …"playwright": { "type": "stdio", "command": "npx", "args": ["-y", "@playwright/mcp@latest"] } } } ``` The fields differ by server type: * For HTTP servers, `url` is the endpo… Configure permissions Claude Code CLI · in the page permissions …so `Bash(rm *)` in deny still matches `FOO=bar rm -rf tmp/`. Bare `xargs` is also stripped, so `Bash(grep *)` matches `xargs grep pattern`. Stripping applies only when `xargs` has no flags: an invoc… Add components to a plugin Claude Code CLI · in the page plugins/components …null} { "mcpServers": { "db": { "command": "node", "args": ["${CLAUDE_PLUGIN_ROOT}/server.js"] } } } ``` An LSP server gives Claude [diagnostics and code navigation](/docs/en/… Create a Claude Code plugin Claude Code CLI · in the page plugins/create …": [{ "type": "command", "command": "jq -r '.tool_input.file_path' | xargs npm run lint:fix" }] } ] } } ``` **4. Test the migrated plugin** Load the plugin for a session: ```bash theme=… Plugin manifest reference Claude Code CLI · in the page plugins/manifest-reference …"mcpServers": { "deploy-api": { "command": "node", "args": ["${CLAUDE_PLUGIN_ROOT}/server.js"] } }, "lspServers": "./.lsp.json", "outputStyles": "./styles/", "experimenta… Use the mods API Claude Code CLI · in the page plugins/mods/api …it on('command.run', { command: 'standup' }, async ($, e) => { // e.args is the text typed after the command name, or an empty string return { text: 'Summary for the last ' + (e.args || '1') + ' d… Create a mod Claude Code CLI · in the page plugins/mods/create …hook returns const answer = await $.command.run({ command: 'tally', args: '' }) expect(answer.text).toBe('Claude has made 2 tool calls since this mod loaded') }) ``` In your shell, run the tests… Test a mod Claude Code CLI · in the page plugins/mods/test …hook returns const answer = await $.command.run({ command: 'tally', args: '' }) expect(answer.text).toBe('Claude has made 2 tool calls since this mod loaded') }) ``` In your shell, run the tests…
Feedback