Skip to main content
Glama

claude

Execute a coding task by sending a prompt to the CLI, then use the returned session ID to continue the conversation.

Instructions

Run a Claude Code CLI session. Executes claude -p --output-format stream-json as a subprocess and returns the result.

Use this tool to start a new coding task with Claude Code. The response includes a Session ID that can be used with the claude-reply tool to continue the conversation.

WARNING: defaults to permission mode bypassPermissions (parity with codex --full-auto). Use a safer mode (e.g. acceptEdits or auto) for sensitive workspaces.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYesThe prompt to send to Claude
modelNoModel id or alias (e.g. "sonnet", "opus", "claude-sonnet-4-6"). Do NOT set this unless the user explicitly requests a specific model.
effortNoReasoning effort. Auto-select based on task complexity: low/medium for simple tasks, high for moderate, xhigh/max for complex multi-file work. Do NOT set if the user has not asked for a specific level.
permissionModeNoPermission mode. Defaults to "bypassPermissions" (parity with codex --full-auto). Use "acceptEdits" or "auto" for safer behavior.
cwdNoWorking directory for the Claude session
addDirsNoAdditional directories Claude can read/edit (--add-dir).
allowedToolsNoTools Claude may use without permission prompt (e.g. ["Bash(git *)", "Edit"]). See Claude permission rule syntax.
disallowedToolsNoTools Claude must not use.
appendSystemPromptNoText appended to the default system prompt.
mcpConfigNoMCP server config files or JSON strings (--mcp-config, repeatable).
maxTurnsNoLimit the number of agentic turns (--max-turns). Headless safety stop.
bareNoRun with --bare (skip hooks/skills/plugins/MCP/CLAUDE.md). NOTE: requires ANTHROPIC_API_KEY or apiKeyHelper — Pro/Max OAuth users will fail to authenticate.
timeoutNoIdle timeout in milliseconds (default: 600000 = 10 min). Resets on every event.
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. It discloses execution as subprocess, output format, session ID generation, and default permission mode with safety warning. However, lacks details on idempotency, error handling, or side effects beyond the permission mode note.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Very concise: three short paragraphs front-loading the main purpose, continuation usage, and a critical warning. No unnecessary content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool has 13 parameters and no output schema, but description only covers high-level behavior and permission mode. Missing details on return value structure, error behavior, and parameter interactions. Could be more complete given complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with detailed parameter descriptions. The tool description adds no extra meaning beyond what schema already provides, so baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it runs a Claude Code CLI session and starts a new coding task. It distinguishes from the sibling tool claude-reply by noting that session ID can be used to continue the conversation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says to use this tool to start a new coding task and points to claude-reply for continuation. Also includes a warning about permission mode defaults, guiding safer usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nayagamez/claude-cli-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server