Skip to main content
Glama

gograph_usages

Read-onlyIdempotent

Find every place a named Go type appears in parameters, returns, struct fields, interfaces, and composite literals to assess the blast radius before changing its definition.

Instructions

Find every place a named Go type appears in function parameter lists, return type signatures, struct field or interface method declarations, and composite-literal construction. The MCP server checks freshness before this call and refreshes in the current requested analysis mode; precise and precise_fallback graphs retry CHA/SSA after source changes. Read-only; no side effects. WHEN TO USE: Before changing an interface or type definition — see the consumption and construction blast radius. NOT TO USE: For call sites of a function (use gograph_callers); use gograph_literals when only struct Foo{...} initialization sites are needed; for all transitive callers use gograph_impact. RETURNS: File paths and line locations where the type appears; empty when the type is not referenced.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeYesThe type name to search for (e.g., 'AuthService', 'Repository')
limitNoMaximum rows per page; the byte budget may return fewer.
cursorNoOpaque next_cursor for the same graph snapshot and result selection.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.7.5
    • addedInput schema / properties / cursor
      Added value: +{
      +  "description": "Opaque next_cursor for the same graph snapshot and result selection.",
      +  "maxLength": 128,
      +  "type": "string"
      +}
    • addedInput schema / properties / limit
      Added value: +{
      +  "default": 100,
      +  "description": "Maximum rows per page; the byte budget may return fewer.",
      +  "maximum": 200,
      +  "minimum": 1,
      +  "type": "integer"
      +}
  2. First observedv1.0.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive, so the safety profile is covered. The description still adds real context the annotations do not: server-side freshness checks, refresh in the current analysis mode, and CHA/SSA retry after source changes. It does not cover rate limits or graph-snapshot staleness semantics for the cursor, but the added freshness/retry detail is substantive.

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 scope statement, then WHEN/NOT TO USE, then RETURNS. Dense but every sentence carries information; the enum-like field list in the opening sentence is slightly heavy but justifies the tool's breadth.

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?

No output schema exists, and the description compensates by describing the return values (file paths and line locations) and the empty-result case. Combined with the freshness behavior and alternative routing, an agent has everything needed to call it correctly.

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 description coverage is 100%, so all three parameters (type, limit, cursor) are already documented in the schema. The description adds no syntax or format guidance beyond that, so the baseline of 3 applies.

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?

States a specific verb ('Find every place') and resource ('named Go type') and enumerates the exact syntactic contexts searched (parameter lists, return signatures, struct/interface declarations, composite literals). An agent can distinguish it from sibling tools without opening any schema.

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 ('before changing an interface or type definition') and NOT TO USE sections that name three alternatives — gograph_callers, gograph_literals, gograph_impact — each with the condition that selects it. Nothing is left to inference.

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