Skip to main content
Glama

graph_query

Return the code knowledge graph slice relevant to a plain-language question, including nodes, edges, and file:line evidence; use before grepping.

Instructions

Return the part of the code knowledge graph relevant to a plain-language question (nodes, edges, file:line evidence). Use before grepping the codebase.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "question": "<question>"
    },
    "name": "graph_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
budgetNo
questionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It discloses the return shape (nodes, edges, file:line evidence) and the pre-grep usage pattern, which is useful. However, it says nothing about read-only behavior, result limits, budget effects, or failure modes.

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?

Two tight sentences, with the core purpose front-loaded and the usage cue second. There is no filler or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the primary input and return contents, which is important because there is no output schema. It omits the budget parameter's meaning and does not help the agent choose among sibling graph tools. For a retrieval tool with zero schema coverage, that leaves meaningful gaps.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate for two parameters. It clarifies that 'question' is plain-language and tied to graph relevance, but it never explains 'budget' or what the default value of 40 controls. This leaves one of two parameters undocumented.

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 gives a specific verb and resource: return the relevant part of the code knowledge graph for a plain-language question. It also states the return contents (nodes, edges, file:line evidence), making the operation concrete. It does not explicitly distinguish itself from siblings like graph_explain or graph_path, so it falls short of a 5.

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?

It provides a clear usage cue: use this before grepping the codebase. That tells the agent when the tool is appropriate relative to a common fallback. It does not name or exclude sibling graph tools, so there is no explicit alternative routing.

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