Skip to main content
Glama

Semantic Diff

open_diff_viewer

Opens the Semantic Diff viewer to display agent-annotated diff sessions or analyze the current git working tree against HEAD using AST semantic matching.

Instructions

Opens the Semantic Diff viewer. Shows the latest agent-annotated diff session if available, or analyzes the current git working tree against HEAD using pure AST semantic matching.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "open_diff_viewer"
  }
}

Input Schema

NameRequiredDescriptionDefault
demoNoWhen true or "ts"/"cpp", loads the built-in refactor showcase fixture
baselineNoOptional git ref (defaults to HEAD)
repoPathNoOptional repository path (defaults to cwd)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full disclosure burden. It does disclose the important non-obvious behavior: which source is chosen first and what happens as a fallback, plus the fact that matching is pure AST semantic rather than textual. It does not state whether opening the viewer has side effects (e.g., creating or mutating a saved session) or whether it is strictly read-only, which matters because a sibling named app_save_review_state exists.

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 sentences, front-loaded with the action and followed by the resolution order. No filler, though 'Shows the latest agent-annotated diff session if available' and the fallback clause could be tightened slightly.

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 zero-required-parameter viewer with no output schema, the definition covers the essentials: what opens, what content is shown, and the fallback logic. The remaining gap is the absence of any statement about side effects or what the agent receives back, which slightly undersells the tool's contract.

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%, so all three parameters are already documented in the schema. The description only adds the incidental detail that analysis is 'against HEAD', which loosely maps to the baseline default. Baseline 3 applies when the schema does the heavy lifting.

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?

Names a specific verb and resource ('Opens the Semantic Diff viewer') and clarifies the two data sources it draws from: the latest agent-annotated session or the git working tree analyzed via AST matching. It is distinguishable from raw-diff siblings like app_get_raw_diff by the semantic/AST framing, though it never explicitly contrasts itself with present_diff or app_get_raw_diff.

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 description implies when the tool is useful (you want a semantic, agent-annotated view of changes) and explains the automatic fallback from session data to a live working-tree analysis. However, it gives no explicit guidance on when to prefer it over present_diff or app_get_raw_diff, and no prerequisites are stated.

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