Skip to main content
Glama

gograph_identity

Read-onlyIdempotent

Resolve exact Go symbol names or stable IDs to location-independent identities and current source locations, returning every candidate when names are ambiguous.

Instructions

Resolve an exact Go symbol spelling or canonical stable ID to location-independent symbol identity plus current source location. Canonical IDs are module import path + receiver/name and survive line shifts and file moves within the same package; package/module moves, receiver changes, and renames change the ID. Ambiguous short names return every candidate and never select one silently. An optional exact package qualifier disambiguates the uncommon in-package versus external foo_test ID collision. The MCP server refreshes the graph first. Read-only; no side effects. WHEN TO USE: Before persisting cross-document references or to re-resolve an existing stable ID. RETURNS: gograph.identity.v1 JSON with status exact, ambiguous, or not_found and deterministic matches.

Input Schema

NameRequiredDescriptionDefault
rootNoAbsolute path of the checkout you are working in (your cwd or git worktree). Must be this server's repository or one of its git worktrees; the answer then comes from that checkout's own graph. A path elsewhere is refused. Alias: cwd. Omit only when the configured checkout is the one you mean.
symbolYesExact symbol name, package/receiver-qualified spelling, or canonical stable ID
packageNoOptional exact Go package name used to disambiguate matching symbols
intentionNoTechnical rationale, required for analytical calls selecting an active session.
session_idNoCaller selector returned by session_create. Omission means an independent caller; never inherits server environment or another caller's session.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.7.18
    • addedInput schema / properties / intention
      Added value: +{
      +  "description": "Technical rationale, required for analytical calls selecting an active session.",
      +  "type": "string"
      +}
    • addedInput schema / properties / root
      Added value: +{
      +  "description": "Absolute path of the checkout you are working in (your cwd or git worktree). Must be this server's repository or one of its git worktrees; the answer then comes from that checkout's own graph. A path elsewhere is refused. Alias: cwd. Omit only when the configured checkout is the one you mean.",
      +  "type": "string"
      +}
    • addedInput schema / properties / session_id
      Added value: +{
      +  "description": "Caller selector returned by session_create. Omission means an independent caller; never inherits server environment or another caller's session.",
      +  "type": "string"
      +}
  2. Addedv1.6.2

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description still adds substantive context: the server refreshes the graph first, ambiguous short names return every candidate and are never silently resolved, and the exact durability rules for canonical IDs (survives line shifts and file moves within a package; breaks on package/module moves, receiver changes, renames). These are behavioral facts an agent cannot get from the annotations or schema.

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?

Front-loaded with the core action, then the ID-stability rules, then labeled WHEN TO USE and RETURNS sections, which makes it scannable. It is dense throughout and the ID-durability enumeration is wordy, but no sentence is filler.

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?

With no output schema, the description correctly supplies the return contract: gograph.identity.v1 JSON with status values exact, ambiguous, or not_found plus deterministic matches. Combined with the ambiguity policy and the root/package scoping notes, an agent has everything needed to call and interpret this tool.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning beyond the schema: it explains why the optional package qualifier exists (the uncommon in-package versus external foo_test ID collision) rather than just restating it. It also clarifies what forms the symbol parameter accepts (exact name, qualified spelling, canonical ID), reinforcing the schema text.

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?

The description opens with a precise verb+resource: resolve a symbol spelling or canonical stable ID to a location-independent identity plus current source location. That is far more specific than most siblings and implies the difference from lookup-style tools like gograph_node or gograph_usages. It never names a sibling tool to contrast against, so it stops short of the top bar.

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

Usage Guidelines4/5

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

An explicit 'WHEN TO USE' line gives two concrete triggers: before persisting cross-document references, and to re-resolve an existing stable ID. That is clear positive guidance with real context. There are no explicit when-not-to-use conditions or named alternatives (e.g., when to prefer gograph_node or gograph_source instead).

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