Skip to main content
Glama

compare_sessions

Compare before and after session scorecards using full IDs or unique prefixes to see whether a workflow improved.

Instructions

Compare two session scorecards to see whether a workflow improved. Session IDs may be full IDs or unique prefixes.

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": {
      "before_session_id": "<before_session_id>",
      "after_session_id": "<after_session_id>"
    },
    "name": "compare_sessions"
  }
}

Input Schema

NameRequiredDescriptionDefault
after_sourceNoclaude
before_sourceNoclaude
after_session_idYes
before_session_idYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full burden of behavioral disclosure. It never states that the operation is read-only, whether comparison has side effects or ordering implications (which session is the baseline), or anything about cost/rate limits; "compare" implies a read but that is inference, not disclosure.

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?

Two short sentences with zero padding; the core action is front-loaded and the ID-format note is a useful addendum. Nothing is wasted, though the space saved is partly spent on the ID note rather than on the undocumented source parameters.

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?

An output schema exists, so return values need not be explained, but for a four-parameter tool with no annotations and no schema descriptions the definition is thin: the source parameters and comparison direction are unaddressed. An agent could invoke it, but might pass the wrong sources or order the sessions backwards without discovering the error until after the call.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across four parameters, so the description must compensate and only partially does: it clarifies that before_session_id/after_session_id accept full IDs or unique prefixes. The two source parameters (before_source, after_source, defaulting to "claude") are left completely unexplained — no allowed values, no meaning — which is a substantial gap given the schema provides nothing.

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 ("Compare two session scorecards") plus the outcome it serves ("whether a workflow improved"), so an agent knows exactly what operation this is. It does not explicitly distinguish itself from siblings like get_session_scorecard or analyze_sessions, so it stops short of a 5.

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?

The phrase "to see whether a workflow improved" implies the use case, giving a rough sense of when to reach for it. However, there is no explicit when-not guidance and no mention of alternatives such as get_session_scorecard for a single session or score_sessions for generating scores, leaving the agent to infer routing.

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