Skip to main content
Glama

claude_reply

Destructive

Resume a Claude Code session from a prior session ID to send follow-up prompts, reuse its working directory, or fork it into a new session for branching work.

Instructions

Continue a Claude Code session via claude --resume=<session_id> (runs synchronously, or as a native MCP Task when the client advertises io.modelcontextprotocol/tasks). Automatically reuses the original session's cwd/worktree when cwd is omitted. Pass fork_session=true to branch into a new session_id. For long follow-ups on non-Tasks clients, prefer claude_async(session_id=..., prompt=...) + claude_wait.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "prompt": "<prompt>",
      "session_id": "<session_id>"
    },
    "name": "claude_reply"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdNoWorking directory for the Claude Code session. If relative, resolved against the server's cwd. On resume, defaults to the original session's cwd/worktree when omitted.
bareNoMinimal headless mode skipping hooks, plugins, CLAUDE.md discovery, and OAuth/keychain reads (passes --bare; requires API key or provider credentials).
agentNoNamed agent for this session (passes --agent).
modelNoOptional model alias or full model name (e.g. 'opus', 'sonnet', 'haiku', 'fable', or a full model identifier). Call claude_models to list available models, resolved IDs, and supported effort levels.
toolsNoBuilt-in tools to expose: "" or [] for none, "default" for the default set, or comma-separated/array tool names (e.g. ["Read","Edit","Bash"]).
agentsNoCustom agents definition (JSON object or file path; passes --agents).
effortNoReasoning effort level for this session.
promptYesThe follow-up prompt to continue the session.
add_dirNoAdditional directories Claude can access (passes repeatable --add-dir).
settingsNoExtra settings to load (JSON object or file path; passes --settings). Prefer file paths over inline credentials.
max_turnsNoMaximum number of agentic turns for this invocation (passes --max-turns).
mcp_configNoMCP server configurations to load (array of JSON objects or file paths/JSON strings; passes repeatable --mcp-config).
session_idYesThe session ID (or session name) from a previous Claude call.
json_schemaNoOptional JSON Schema (object or string) passed to --json-schema so Claude Code returns structuredContent.structured_output via its StructuredOutput tool. Callers should verify structured_output is present, as Claude CLI can still exit 0 without it on short-circuited CLI commands or prose fallbacks.
fork_sessionNoWhen resuming via session_id, create a new session ID instead of mutating the original session (passes --fork-session).
allowed_toolsNoTool allow rules (e.g. ["Bash(git *)", "Edit"]; passes --allowed-tools).
system_promptNoReplace the default system prompt (passes --system-prompt).
fallback_modelNoOptional fallback model(s) (comma-separated) when the primary model is busy or unavailable (passes --fallback-model).
max_budget_usdNoMaximum API spend in USD for this invocation (passes --max-budget-usd).
permission_modeNoPermission mode for tool approval (acceptEdits, auto, bypassPermissions, manual, dontAsk, plan).
setting_sourcesNoComma-separated setting sources to load (e.g. "user,project,local", or "" to exclude all user/project/local settings).
disallowed_toolsNoTool deny rules (e.g. ["Bash(rm *)"]; passes --disallowed-tools).
strict_mcp_configNoOnly use MCP servers from mcp_config, ignoring all other MCP configs (passes --strict-mcp-config). Explicit false overrides server default.
append_system_promptNoAppend text to the default system prompt (passes --append-system-prompt).
disable_slash_commandsNoDisable all skills and slash commands (passes --disable-slash-commands). Explicit false overrides server default.
no_session_persistenceNoDo not save the session transcript to disk; cannot be resumed later (passes --no-session-persistence). Explicit false overrides server default.
dangerously_skip_permissionsNoBypass all permission checks (passes --dangerously-skip-permissions). Explicit false overrides server default.

Output Schema

NameRequiredDescriptionDefault
textYes
modelNo
usageNo
effortNo
statusYes
failureNo
exit_codeNo
num_turnsNo
session_idNo
stop_reasonNo
tool_errorsNo
partial_outputNo
result_subtypeNo
permission_modeNo
terminal_reasonNo
duration_secondsNo
structured_outputNo
permission_denialsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and openWorldHint=true, so the description's value is in the added operational context: it runs synchronously or as a native MCP Task depending on client capability, and it auto-reuses the original session's cwd/worktree. It stops short of spelling out that a non-forked resume mutates the original transcript irreversibly, or the cost/latency profile of the synchronous path.

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?

The core action and its CLI mechanism are front-loaded in the first clause, followed by the two behavioral caveats an agent actually needs (sync vs Task, cwd reuse) and the fork switch. Four sentences, no filler; the parenthetical is dense but load-bearing.

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

Completeness4/5

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

For a 27-parameter session-continuation tool with an output schema, the description covers the decision points that matter: continuation vs fork, sync vs async, and cwd inheritance. Remaining gaps (destructive effect on the original transcript, when to expect structured_output) are handled partly in the schema, leaving only minor room for improvement.

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%, so all 27 parameters are already documented in the schema, including the cwd default-on-resume and fork_session semantics the description echoes. The description adds only routing context (claude_models for model listing) rather than new meaning beyond the structured fields, so the baseline applies.

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?

States a specific verb and resource ('Continue a Claude Code session via `claude --resume=<session_id>`') and immediately distinguishes this from a fresh session by naming the resume mechanism. The async alternative is named explicitly, so an agent can separate this from claude/claude_async without opening any schema.

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?

Gives explicit routing: use this to continue an existing session, use fork_session=true to branch instead of mutating, and prefer claude_async(...) + claude_wait for long follow-ups on clients that don't support MCP Tasks. Both the alternative and the condition that selects it are stated.

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