Skip to main content
Glama

gograph_tests

Read-onlyIdempotent

Find Go test functions in *_test.go files that statically exercise a named symbol, with optional transitive reverse attribution for router- or callback-mediated coverage.

Instructions

Find test functions in *_test.go files that statically exercise a named symbol, or list all attributed test edges when no symbol is given. Direct mode accepts Receiver.Method (including pointer receivers) or a full stable symbol ID. By default this preserves the direct-edge result contract. Set transitive=true with a required symbol to return gograph.tests.v1 reverse attribution, including exact/possible resolution, depth, and a representative stable-ID path from every reaching test; exact_only omits uncertain paths and package disambiguates the selected product symbol. The MCP server checks freshness before this call and refreshes in the current requested analysis mode. Read-only; no side effects. WHEN TO USE: Before editing a function — use transitive=true for router/callback-mediated coverage and direct mode for concrete test call sites. NOT TO USE: For test helper infrastructure (use gograph_fixtures); for running tests or proving runtime coverage. RETURNS: Direct result rows by default, or a versioned reverse-transitive report when requested.

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.
symbolNoThe symbol name to find tests for (optional)
packageNoWith transitive=true, optional exact Go package name used to disambiguate the selected symbol
intentionNoTechnical rationale, required for analytical calls selecting an active session.
exact_onlyNoWith transitive=true, omit paths containing possible edges
session_idNoCaller selector returned by session_create. Omission means an independent caller; never inherits server environment or another caller's session.
transitiveNoReturn reverse-transitive test attribution; requires symbol

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. Changed3 schema fields changedv1.7.5
    • addedInput schema / properties / exact_only
      Added value: +{
      +  "description": "With transitive=true, omit paths containing possible edges",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / package
      Added value: +{
      +  "description": "With transitive=true, optional exact Go package name used to disambiguate the selected symbol",
      +  "type": "string"
      +}
    • addedInput schema / properties / transitive
      Added value: +{
      +  "description": "Return reverse-transitive test attribution; requires symbol",
      +  "type": "boolean"
      +}
  3. First observedv1.0.0

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the 'Read-only; no side effects' sentence is redundant. The description does add genuine non-schema behavior: the server checks freshness and refreshes in the requested analysis mode before the call, and the return contract switches between direct rows and gograph.tests.v1 depending on transitive. Those additions are useful but partly duplicate the schema's own parameter descriptions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded and organized with WHEN TO USE / NOT TO USE / RETURNS sections, but the prose is dense and contains redundancy: 'By default this preserves the direct-edge result contract' is restated in RETURNS, and transitive/exact_only/package are re-explained after the schema already documents them. Some sentences could be compressed without loss.

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?

With seven entirely optional parameters and no output schema, the definition correctly explains the no-symbol behavior, the two result modes, and the versioned report fields (exact/possible resolution, depth, representative stable-ID path). The default direct-result row shape is only gestured at ('preserves the direct-edge result contract'), leaving a small gap given there is no output schema.

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 the baseline is 3. The description adds some real semantics — `symbol` accepts Receiver.Method form including pointer receivers or a full stable symbol ID, `transitive` requires a symbol, `exact_only` only applies with transitive, and `package` disambiguates the selected product symbol — which is a modest increment over the schema text rather than a substantive expansion.

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 opening sentence gives a specific verb (find) and resource (test functions in *_test.go files) plus the scope of what counts ('statically exercise a named symbol') and the no-symbol fallback (list all attributed test edges). It is clearly separable from gograph_untested and gograph_fixtures, which are named later in the description.

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 block ('Before editing a function — transitive=true for router/callback-mediated coverage, direct mode for concrete test call sites') and an explicit NOT TO USE block naming gograph_fixtures and clarifying that this is not runtime coverage. When-not guidance and alternatives are both present.

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