Skip to main content
Glama

gograph_coverage

Read-onlyIdempotent

Map a Go test to production functions and methods statically reachable from it, with exact or possible results. Use it for structural test attribution, not runtime or branch coverage.

Instructions

Return the transitive set of production functions and methods statically reachable from one test function. The MCP server refreshes the graph first. Exact results have an all-static path; any parser-only or CHA dispatch edge degrades that symbol and its descendants to possible. Same-named tests in multiple packages return status=ambiguous and are never merged; retry with the stable test ID from matched_tests or gograph_identity. The optional package qualifier resolves the uncommon in-package versus external foo_test ID collision. Set exact_only=true to omit possible results. This is static attribution, not runtime or branch coverage proof. Read-only; no side effects. WHEN TO USE: To map one test to the product symbols it structurally exercises. NOT TO USE: To claim execution or branch coverage. RETURNS: gograph.coverage.v1 JSON with analysis precision, test-call resolution, matched tests, symbols, resolution, depth, representative stable-ID paths, and limitations.

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.
testYesExact test name or canonical stable test symbol ID
packageNoOptional exact Go package name used only to disambiguate matching test symbols
intentionNoTechnical rationale, required for analytical calls selecting an active session.
exact_onlyNoReturn only symbols reached entirely through exact/static edges
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.6/5.0
Behavior4/5

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

Beyond the readOnly/idempotent annotations, the description discloses that the server refreshes the graph first, that parser-only or CHA edges downgrade a symbol and its descendants to possible, that same-named tests yield status=ambiguous and are never merged, and that package disambiguates foo_test collisions. These are genuinely useful behavioral traits. Minor deduction for the redundant 'Read-only; no side effects' restating the annotations.

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?

Content is front-loaded with the core definition followed by precision semantics, disambiguation, and labeled WHEN/NOT/RETURNS blocks. It is dense but nearly every sentence carries information; the trailing 'Read-only; no side effects' is the one line that duplicates structured annotation data rather than adding to it.

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?

This is a complex analytical tool with six parameters and no output schema, and the description still covers precision model, ambiguity handling, exclusions, and the returned gograph.coverage.v1 field set. Nothing an agent needs to invoke or interpret it correctly is missing.

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?

With 100% schema coverage the baseline is 3, but the description adds real meaning: the purpose of package as a narrow disambiguator for the in-package versus external foo_test collision, and the effect of exact_only=true in omitting possible results. The root parameter is left entirely to the schema, which is acceptable but the only unaddressed surface.

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?

The first sentence names a specific verb, resource, and scope: the transitive set of production symbols statically reachable from one test function. It is clearly separable from siblings like gograph_tests, gograph_untested, and gograph_trace, and the WHEN TO USE line reinforces the distinction.

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?

Explicit WHEN TO USE and NOT TO USE sections state the positive case (map a test to structurally exercised symbols) and the exclusion (do not claim runtime or branch coverage). It also routes the agent to alternatives on ambiguity, telling it to retry with stable IDs from matched_tests or gograph_identity, and explains when to set exact_only.

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