Skip to main content
Glama

opencode_session_diff

Read-onlyIdempotent

Show files created, modified, and deleted in a session.

Instructions

Show files created, modified, and deleted in a session.

Returns a diff summary with file paths and change types.

Return Format

{"success": bool, "message": str, "data": {"diff": dict}}

Examples

opencode_session_diff(session_id="sess_01")

Input Schema

NameRequiredDescriptionDefault
session_idYesSession ID to diff

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.2.11
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "type": "object"
      -}New value: +null
  2. First observedv0.2.3

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and idempotentHint, so the safety profile is covered. The description adds real value beyond that by specifying the return format and stating the diff includes file paths and change types, giving the agent a sense of output shape for a tool with no output schema.

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 core purpose is front-loaded in the first sentence, followed by output shape and a compact example. Slightly more scaffolding (labeled sections) than strictly needed for a one-parameter tool, but nothing is wasteful.

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?

With no output schema, the description appropriately explains the return structure and diff contents, which is exactly what an agent needs to interpret results. Only usage/differentiation guidance is missing, so it is nearly complete for a simple read tool.

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% for the single session_id parameter, so the schema already documents it. The description's example (session_id="sess_01") adds only superficial format illustration, so baseline 3 applies.

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 (show) and resource (files created/modified/deleted in a session), which is concrete and distinguishable from a generic session fetch. It does not, however, explicitly contrast itself with close siblings like opencode_get_session or opencode_get_messages.

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?

Usage is implied by the purpose – diff a session's file changes – but there is no explicit when-to-use/when-not or naming of alternatives such as opencode_get_session for metadata vs. this for file diffs. The example clarifies the call shape but not the routing decision.

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