Skip to main content
Glama

opencode_session_init

Destructive

Analyze the application and generate AGENTS.md to prepare a coding session, supplying context for autonomous tasks. This operation takes 30-60+ seconds on larger projects.

Instructions

Analyze the app and create AGENTS.md for a session. NOTE: This is a long-running operation that may take 30-60+ seconds depending on project size.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesSession ID
modelIDYesModel ID (e.g. 'claude-3-5-sonnet-20241022')
variantNoModel variant (e.g. 'fast', 'smart')
directoryNoAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.
messageIDYesMessage ID
providerIDYesProvider ID (e.g. 'anthropic')

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
textYes
isErrorYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already disclose destructiveHint=true, readOnlyHint=false, and openWorldHint=true. The description adds valuable context beyond annotations by naming the side effect (creates AGENTS.md) and the long-running nature (30-60+ seconds). It does not explicitly warn about overwriting an existing AGENTS.md, but the destructive hint already covers the hazard.

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 purposeful, front-loaded sentences. The action 'Analyze the app and create AGENTS.md' comes first, and the runtime caveat is isolated in a clear NOTE. There is no filler or repetition of schema information.

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?

Taken together with the rich schema, annotations, and output schema, the description covers the main decision-relevant facts: what the tool does, that it creates a file artifact, and that it may take a long time. It could state when to use it relative to other session tools, but the provided structure is sufficient for correct invocation.

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 six parameters are already documented with meaningful descriptions. The tool description adds no direct parameter semantics; it only indirectly references project size, which relates to the directory parameter. Baseline 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 states a concrete action and resource: 'Analyze the app and create AGENTS.md for a session.' This clearly differentiates it from session lifecycle tools like opencode_session_create or opencode_project_init, and tells an agent exactly what the tool produces.

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

Usage Guidelines2/5

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

The description gives no explicit guidance on when to call this tool versus alternatives such as opencode_session_create, opencode_session_update, or opencode_project_init. The only timing note is the 30-60+ second runtime warning, which is not usage-selection guidance.

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