Skip to main content
Glama

sessions_compare

Read-onlyIdempotent

Compare two OpenCode sessions side by side to review their differences without loading messages or diffs. Omit server arguments when only one server is available.

Instructions

Compare two sessions. Returns both sessions side by side; does not fetch messages or diffs. Omit a server argument when exactly one server is available.

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_a": "<session_a>",
      "session_b": "<session_b>"
    },
    "name": "sessions_compare"
  }
}

Input Schema

NameRequiredDescriptionDefault
server_aNoFirst server id. Omit when exactly one server is available.
server_bNoSecond server id. Omit when exactly one server is available.
session_aYesFirst session id.
session_bYesSecond session id.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and openWorldHint=false, so safety is covered. The description adds useful scope information by stating what is not fetched (messages, diffs), but says nothing about behavior when the two sessions belong to different servers or what a returned session object contains, and there is no output schema to fill that gap.

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?

Three short sentences, front-loaded with the core action before the scope exclusion and the server-omission rule. Minor waste: the server-omission rule duplicates the schema and could have been dropped for an agent that reads parameters.

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 simple read-only comparison with fully documented parameters and rich annotations, the description covers action, return shape, and scope limits. The remaining gap is only the structure of the returned session objects, which is arguably documented by the sibling session_get.

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 every parameter carries its own description, so the schema does the heavy lifting. The description's only parameter-related statement (omit server when one server exists) merely restates the schema text for server_a/server_b and adds no new meaning.

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 sessions") plus the return shape ("both sessions side by side"). The clause "does not fetch messages or diffs" implicitly separates it from session_messages and session_diff, though it never names a preferred alternative.

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?

Provides one concrete conditional rule: omit a server argument when exactly one server is available. It gives no guidance on when to choose this over session_diff (same session over time) or session_get, so the agent must infer routing from the negative clause alone.

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