Skip to main content
Glama

gograph_query

Read-onlyIdempotent

Search Go code graph index for symbols, packages, files, and imports by keyword substrings. Use when exploring a feature name without knowing its package.

Instructions

Search the graph index for symbols, packages, files, and import edges that match one or more keyword substrings. Multiple terms use OR semantics, matching CLI query term.... The MCP server refreshes source analysis before the call. Read-only; no persistent side effects. WHEN TO USE: During initial exploration when you have a keyword or feature name but do not know its package. NOT TO USE: When you already know the exact symbol (use gograph_source or gograph_node); for package dependency trees (use gograph_deps). RETURNS: Matching symbols, files, and imports; empty when no terms match.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
termNoOne keyword search term (e.g. 'AuthService')
limitNoMaximum rows per page; the byte budget may return fewer.
termsNoOptional list of keyword terms combined with OR semantics
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. Addedv1.5.3
  3. Removedv1.5.3
  4. Changed3 schema fields changed
    • changedInput schema / properties / term / description
      Previous value: -"The keyword search term to locate in symbols, files, and imports (e.g., 'AuthService', 'token', 'router')"New value: +"One keyword search term (e.g. 'AuthService')"
    • addedInput schema / properties / terms
      Added value: +{
      +  "description": "Optional list of keyword terms combined with OR semantics",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "term"
      -]New value: +[]
  5. Changed1 schema field changedv1.4.66
    • changedInput schema / properties / term / description
      Previous value: -"The keyword to search for (e.g., 'Auth')"New value: +"The keyword search term to locate in symbols, files, and imports (e.g., 'AuthService', 'token', 'router')"
  6. First observedv1.0.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive/closed-world, so the safety profile is covered. The description adds real behavioral context beyond that: the server refreshes source analysis before the call, multiple terms use OR semantics, and results are empty when no terms match. It stops short of describing pagination/cursor behavior, which keeps it from a 5.

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

Conciseness5/5

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

Front-loads the core purpose, then uses labeled WHEN/NOT/RETURNS sections. Each sentence carries distinct information and there is no redundancy or 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 steps in to describe return values (matching symbols, files, imports; empty on no match) and pagination is hinted via the cursor semantics. For a search tool with full annotation and schema coverage, nothing an agent needs to invoke it correctly is missing.

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 the schema already documents term, terms (OR semantics), limit (byte budget caveat), and cursor. The description largely restates the OR semantics already present in the schema and adds little new parameter-level meaning. Baseline 3 is appropriate.

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 (Search) and a well-scoped resource (graph index for symbols, packages, files, and import edges), plus the matching mechanism (keyword substrings). An agent can distinguish it from siblings like gograph_source and gograph_deps 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 (initial exploration with a keyword but unknown package) and NOT TO USE clauses that name the exact alternatives (gograph_source, gograph_node for known symbols; gograph_deps for dependency trees). Routing is fully specified.

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