Skip to main content
Glama
choruzo
by choruzo

Inspect changes made in a session

get_diff
Read-only

Retrieve file changes made by a delegated OpenCode session using the session ID to review edits and verify task output.

Instructions

Return the file changes made by a delegated session, as reported by OpenCode (GET /api/session/{id}/diff).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idYesSession id returned by delegate_task/create_session.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0-alpha.1

TDQS

B3.2/5.0
Behavior3/5

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

readOnlyHint=true already tells the agent this is a safe read, so the bar is lower. The description adds that the diff is sourced from OpenCode via a specific endpoint, which is useful context, but says nothing about diff format, size limits, or behavior for sessions that made 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One tight sentence with the core action front-loaded; the trailing endpoint parenthetical earns its place by naming the data source, though it could be trimmed.

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

Completeness3/5

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

For a one-parameter read operation with no output schema, the definition covers the essentials. However, the actual return shape of a 'diff' is never characterized, which is the one thing an agent calling get_diff would most want to predict.

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% and the single session_id parameter is fully described there, so the description does not need to compensate. It adds no format or sourcing detail beyond what the schema already states.

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?

States a specific verb and resource: 'Return the file changes made by a delegated session', with the source pinned down ('as reported by OpenCode'). It distinguishes itself well enough from get_session (metadata) and list_agents, though it never names a sibling explicitly.

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?

No when-to-use guidance, no prerequisites stated, and no alternatives named. The only routing hint is indirect, coming from the schema note that session_id comes from delegate_task/create_session.

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