Skip to main content
Glama

opencode_message_list

Read-onlyIdempotent

Retrieve a formatted list of messages from a session, showing each role and content. Specify a session ID and optional limit to review conversation history.

Instructions

List all messages in a session with formatted output showing roles and content

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of messages to return
directoryNoAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.
sessionIdYesSession ID

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
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is covered. The description adds that output is formatted with roles and content, which is useful but minimal; it does not disclose ordering, pagination behavior, or behavior when a sessionId is invalid.

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?

The description is a single, front-loaded sentence with no filler. It conveys the core operation, scope, and output shape efficiently.

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 straightforward read-only list operation, the combination of a clear description, 100% parameter coverage, a complete output schema, and strong annotations is nearly sufficient. The only minor gap is the lack of explicit guidance about ordering or pagination, but this is not critical for the tool's basic 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 coverage is 100%, so all three parameters are already documented with descriptions. The tool description does not add extra parameter-level meaning beyond what the schema provides, so the 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 clearly states the action ('List all messages'), the resource ('in a session'), and the output format ('showing roles and content'). It is easily distinguished from sibling tools like opencode_message_get because it explicitly targets the full message list rather than a single message.

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?

The description implies the use case: a caller who needs all messages in a session. However, it does not explicitly name alternatives such as opencode_message_get for single-message retrieval or opencode_session_search for filtered queries, nor does it state any exclusions or prerequisites beyond the required sessionId.

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