Skip to main content
Glama

opencode_session_search

Read-onlyIdempotent

Search session titles by keyword to locate a specific coding session. Use it to find the right session among many.

Instructions

Search sessions by keyword in title. Useful for finding a specific session among many.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch keyword (case-insensitive match on session title)
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
dataNo
textYes
isErrorYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.0

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, openWorldHint=true, idempotentHint=true, and destructiveHint=false, covering the safety profile. The description adds only the core behavior of searching by title but discloses no additional constraints, such as result limits, pagination, or whether searches are scoped to the workspace. It neither contradicts nor significantly enriches the annotation-derived behavioral expectations.

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?

The description is two sentences with no wasted words. The verb 'Search' is front-loaded, and the second sentence adds a small use-case context. The second sentence is slightly redundant with the first but does not detract from clarity.

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 simple search tool with a full output schema and comprehensive annotations, the description is adequate. It covers the core search-by-title behavior, while parameter semantics live in the schema and safety/behavioral traits in annotations. It could mention the optional directory scope explicitly, but the schema provides that, so no critical information is missing.

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%, with both 'query' and 'directory' fully described. The tool description provides no additional parameter-specific meaning beyond the schema, so it neither compensates for nor adds to the structured definitions. Baseline 3 is appropriate given high schema coverage.

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 specific verb ('Search'), resource ('sessions'), and scope ('by keyword in title'). This clearly distinguishes it from sibling tools like opencode_session_list and opencode_session_get, which list all sessions or fetch by ID. The phrase 'finding a specific session among many' reinforces the intended purpose.

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

Usage Guidelines4/5

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

'Useful for finding a specific session among many' provides clear context for when to use this tool. It implies a search scenario but does not explicitly name alternatives or state when not to use it. It does not mention that session_list is the alternative for listing all sessions, nor that session_get is for direct access.

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