Skip to main content
Glama
xuanpass

opencode-http-mcp

by xuanpass

opencode_session_diff

Retrieve code changes made in an OpenCode session, optionally scoped to a specific message, to review the resulting diff.

Instructions

Get the diff for a session, optionally for a specific message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
directoryNoProject directory to target. Optional; defaults to the server default project.
messageIDNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It implies a read operation via 'Get' but says nothing about what the diff contains (git patch, file changes, unified format), whether it requires a shared/forked session, how large it can get, or what happens for sessions with no changes.

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?

A single sentence with zero filler, and the core action is front-loaded before the optional modifier. Every clause earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no annotations, no output schema, and partial parameter documentation, the description leaves an agent guessing at the diff's format and semantics. For a tool whose entire value is the returned diff, this is under-specified.

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 only 33% (only 'directory' is documented), so the description must compensate. It partially does: 'for a session' clarifies the required id and 'optionally for a specific message' clarifies messageID's role and optionality. However, it adds no detail on the id format or what 'directory' scoping does, leaving gaps for two of three parameters.

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 ('Get the diff for a session') and adds the optional narrowing to a specific message. It is immediately distinguishable from siblings like opencode_session_get or opencode_session_status, though it never explicitly contrasts itself with opencode_review_changes.

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?

There is no when-to-use guidance, no prerequisites, and no named alternative. The phrase 'optionally for a specific message' hints at two invocation modes but doesn't say when to prefer one over the other or how this differs from review_changes.

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