Skip to main content
Glama

session.diff

Read-only

Compare two session checkpoints to return task status changes, new blockers, decisions, and file updates as JSON. Defaults to the two latest checkpoints; read-only.

Instructions

Compare two checkpoints of the current session and return the changes as JSON: task title and status, new and resolved blockers, new decisions, tasks started or completed, new files, and next_action before and after. Read-only. With no IDs it compares the two latest checkpoints and errors when there are fewer than two. For code changes use workspace.diff.

Input Schema

NameRequiredDescriptionDefault
after_idNoNewer checkpoint ID; defaults to the latest
before_idNoOlder checkpoint ID; defaults to the second-latest

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.1.9
    • changedInput schema / properties / after_id / description
      Previous value: -"After checkpoint ID (defaults to latest)"New value: +"Newer checkpoint ID; defaults to the latest"
    • changedInput schema / properties / before_id / description
      Previous value: -"Before checkpoint ID (defaults to second-latest)"New value: +"Older checkpoint ID; defaults to the second-latest"
  2. First observedv0.1.8

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, but the description goes further by disclosing the default comparison behavior and the error condition when fewer than two checkpoints exist. It stops short of describing output ordering or size limits, which keeps it from a 5.

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?

Front-loads the purpose and return contents, then tacks on defaults, error behavior, and the sibling alternative in short clauses. No sentence is wasted despite the density.

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

Completeness5/5

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

No output schema exists, so enumerating the returned fields (task title/status, blockers, decisions, tasks, files, next_action) is exactly the compensation needed, and the error condition and alternative tool complete the picture for a two-param 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% and already documents that after_id defaults to the latest and before_id to the second-latest. The description's 'with no IDs it compares the two latest' restates this rather than adding format or edge-case detail, so baseline 3 applies.

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?

States a specific verb and resource ('compare two checkpoints of the current session'), enumerates exactly what the diff contains, and explicitly distinguishes itself from workspace.diff for code changes. An agent can separate this from sibling diff/checkpoint tools without consulting the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly covers the zero-argument case (compares the two latest checkpoints), the failure condition (errors with fewer than two), and names the alternative tool for code changes. Both when-to-use and when-to-use-something-else are stated.

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