Skip to main content
Glama

opencode_session_create

Destructive

Create a new session for delegating coding tasks. Optionally set a parent session or target a project directory.

Instructions

Create a new session. Optionally provide a parentID to create a child session, and a title.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleNoSession title
parentIDNoParent session ID
directoryNoAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes
isErrorYes
sessionYes
sessionIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.0

TDQS

B3.3/5.0
Behavior2/5

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

Annotations include destructiveHint=true but description doesn't explain what gets destroyed or side effects. No mention of the session creation being tracked, persisted, or any context about interactions with other tools. With destructiveHint present, description should clarify the lifecycle but doesn't.

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?

Single sentence that is clear and front-loaded with the core action. No unnecessary words, all essential information included despite being brief.

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?

There is an output schema to describe return values, and schema covers all parameters at 100%. However, given the destructiveHint and the potentially complex session management across many sibling tools, the description could benefit from mentioning prerequisites or typical usage flow. Still adequate for a simple creation.

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 covers all 3 parameters with descriptions (100% coverage). Description adds meaning by clarifying parentID creates a child session, but title and directory are already described in the schema. Little added value beyond what schema provides.

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?

States a clear verb+resource: 'Create a new session', and mentions optional a parentID for child session. Distinguishes from siblings by focusing on creation rather than listing, deleting, or updating.

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?

Infers use when a new session is needed but no explicit when-to-use or alternatives. Lacks guidance on when to use child sessions vs separate sessions, and doesn't mention that deletion (destructiveHint) may require careful handling.

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

Deploy Server

Other Tools