Skip to main content
Glama

opencode_session_create

Starts a new OpenCode session for multi-turn conversations, returning a session ID for follow-up prompts.

Instructions

Create a new OpenCode session for multi-turn conversations. Returns a session ID that can be used for subsequent prompts.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "opencode_session_create"
  }
}

Input Schema

NameRequiredDescriptionDefault
agentNoAgent to use
modelNoModel in format provider/model
titleNoSession title
workingDirectoryNoProject directory path (auto-detected if not specified)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, idempotentHint=false and openWorldHint=true, so the mutation and non-idempotent nature is covered. The description adds genuinely useful behavior beyond that — that the call yields a session ID consumed by later prompts — but says nothing about side effects, persistence lifetime, or whether session state is scoped to the working directory.

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?

Two short sentences with zero waste; the action is front-loaded and the return-value note follows immediately. Nothing is repeated from the schema or annotations.

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 zero-required-parameter creation tool with no output schema, the definition covers what the agent needs: what it makes and what it returns. A minor gap remains around default behavior when agent, model, or workingDirectory are omitted, but the schema's auto-detection note partially covers that.

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 all four parameters (agent, model, title, workingDirectory) are already documented, and the description adds no additional meaning such as defaults or format examples. Baseline 3 is appropriate when the schema carries the parameter burden.

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 states a specific verb and resource ('Create a new OpenCode session') and adds the intended use case ('multi-turn conversations'). It implicitly separates itself from opencode_session_prompt by noting the returned session ID feeds subsequent prompts, but it never names the sibling explicitly, so differentiation is inferred rather than stated.

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 through the two-step flow it describes: create a session, then use the returned ID for later prompts. There is no explicit when-to-use versus when-not guidance, and no mention of alternatives such as reusing an existing session from opencode_session_list.

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