Skip to main content
Glama
sohampatwardhan

Claude Code MCP Server

Create Claude Code cloud session

claude_create_cloud_session

Create a new Claude Code cloud session from a task description and return its session ID and URL for follow-up messages.

Instructions

Create a new Claude Code cloud session via claude --cloud on a pseudo-terminal (the CLI rejects this form when stdout is a pipe). Returns the parsed session_id and session_url. If parsing fails, parsed is false and the CLI output, with terminal controls removed, is in cli. The CLI runs in CLAUDE_MCP_CWD, or in the server process's working directory when that is unset. When Claude Code asks to trust that folder, the call fails with WORKSPACE_NOT_TRUSTED unless CLAUDE_MCP_TRUST_CWD=1.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
descriptionYesTask description for the new cloud session.
environment_idNoCloud environment id (e.g. ccpool_...). Overrides CLAUDE_CLOUD_ENVIRONMENT_ID; omit to use that default.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
cliYesCLI output with terminal control sequences removed.
argsYes
titleYes
parsedYesTrue when both session_id and session_url were parsed from CLI output.
session_idYes
session_urlYes
environment_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior5/5

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

Despite annotations already declaring readOnlyHint=false/openWorldHint=true/idempotentHint=false, the description adds substantial non-obvious behavior: the pseudo-terminal requirement (CLI rejects piped stdout), the parsed vs. `cli` fallback output shape, the CWD resolution rule, and the WORKSPACE_NOT_TRUSTED failure with the CLAUDE_MCP_TRUST_CWD=1 escape hatch. These are exactly the environment-specific behaviors an agent cannot get from the schema or annotations.

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

Conciseness4/5

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

Four sentences, front-loaded with the action, then output contract, then environment/failure behavior. Each sentence carries operational weight, though the parsing-failure sentence is somewhat dense and could be tightened without losing meaning.

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

Completeness5/5

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

For a creation tool with an output schema, the description covers the action, the return contract, the runtime environment, and the one failure mode that blocks success. An agent has everything needed to invoke it correctly and to interpret a failed call.

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 description coverage is 100%, so the schema already explains both parameters including the CLAUDE_CLOUD_ENVIRONMENT_ID override, which the description does not restate or extend. Baseline 3 is appropriate since the description adds no format, constraint, or default detail beyond the structured fields.

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

Purpose4/5

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

The description opens with a specific verb and resource ('Create a new Claude Code cloud session') and even names the underlying mechanism ('claude --cloud'). It is unambiguous, though it never explicitly contrasts itself with the sibling tools claude_send_followup or claude_auth_status, so it stops short of a 5.

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

Usage Guidelines3/5

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

Usage is implied rather than stated: an agent can infer this is the entry point that precedes claude_send_followup, but there is no explicit when-to-use/when-not-to-use guidance or alternative routing. The operational preconditions it does give (PTY requirement, trust requirement) are about mechanics, not tool selection.

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