Skip to main content
Glama

session_diff

Read-onlyIdempotent

Retrieve structured diffs for a specific session turn, enabling change inspection without fetching messages or session details.

Instructions

Get structured diffs for a session turn. Returns only the diff; does not fetch messages or session details.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "session_id": "<session_id>"
    },
    "name": "session_diff"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoEnding turn id.
fromNoStarting turn id.
serverNoServer id. Omit when exactly one server is available.
contextNoLines of context around changes.
session_idYesSession id on that server.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, and closed-world behavior. The description adds output-scope behavior ('returns only the diff; does not fetch messages or session details'), which is useful beyond annotations, but it omits diff computation semantics and any limits.

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?

Two short sentences, front-loaded with the core action and followed by a scoping exclusion. Every sentence earns its place.

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 read-only, idempotent tool with fully documented parameters and no output schema, the description covers purpose and output scope adequately. It could be richer about diff format, but nothing critical is missing for correct 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 description coverage is 100%, so all five parameters including from, to, and context are fully documented in the schema. The description adds no additional parameter meaning beyond the schema, so the baseline of 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 ('Get') and resource ('structured diffs for a session turn'), and explicitly differentiates from siblings by noting it does not fetch messages or session details. The only minor ambiguity is what the diff is computed between, but the schema's from/to parameters fill that in.

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?

It clarifies that the tool returns only the diff and excludes messages/session details, which implies when to choose it over session_messages. However, it does not explicitly name alternatives or state positive conditions or prerequisites for use.

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