Skip to main content
Glama

graph_query

Read-onlyIdempotent

Query the code knowledge graph to explore callers, callees, imports, subclasses, and shortest paths between symbols. Use operations like neighbors, overview, and surprising_connections for deep code analysis.

Instructions

Raw access to the code knowledge graph (calls, inheritance, imports), for the questions the dedicated tools do not cover: find_usages, impact and describe_symbol answer the common ones with the results already shaped. operation: callers | callees | subclasses | superclasses | imports | neighbors | shortest_path | overview | surprising_connections | status. symbol is matched as a case-insensitive substring; results carry file:line.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
depthNoneighbors: hops out (1-6).
limitNoMax edges.
top_nNooverview / surprising_connections: items to return.
sourceNoSource name. Omit when only one source applies.
symbolNoSymbol the operation acts on (not needed by overview / status).
targetNoDestination symbol for shortest_path.
max_hopsNoshortest_path: max path length.
operationYesOne of the operations listed in the tool description.
relation_filterNoneighbors: calls | inherits | imports | imports_from | contains.
min_community_sizeNooverview: minimum community size.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Addedv1.9.0

TDQS

A4.6/5.0
Behavior4/5

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

Beyond the read-only/idempotent annotations, the description adds useful behavioral details: symbol matching is case-insensitive substring, results carry file:line, and the operation set includes status and overview. It does not claim any side effects (consistent with annotations), and the 'raw access' phrasing signals lower-level output. This adds meaningful context beyond 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.

Conciseness5/5

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

The description is a compact two-sentence paragraph. The first sentence explains purpose and relationship to siblings; the second lists operations and key behaviors. No redundant words, and the most important scoping information (dedicated tools) is front-loaded. It is dense but every clause contributes.

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?

Given the tool has many operations and no output schema, the description gives enough context to understand its role, limit usage, and know that results include file:line. It does not enumerate return shapes for each operation, but that is largely unnecessary for an agent to select and call the tool; the parameter schema fills in the rest. Minor gaps like per-operation output details are acceptable.

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?

Although schema coverage is 100%, the description enriches parameter understanding by enumerating the allowed operation values (callers, callees, etc.) and clarifying that symbol is matched as a case-insensitive substring. These details are not fully captured in the schema, which only says 'One of the operations listed in the tool description' for operation. Thus it adds value beyond the field descriptions.

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 description clearly states it provides raw access to the code knowledge graph and explicitly names the dedicated sibling tools (find_usages, impact, describe_symbol) that cover common cases, distinguishing itself as the fallback for other graph operations. It lists the supported operations with concrete verbs (callers, callees, subclasses, etc.), making the purpose unambiguous.

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?

It gives explicit when-to-use guidance: 'for the questions the dedicated tools do not cover' and names the alternatives (find_usages, impact, describe_symbol). This tells the agent exactly when to prefer this tool over siblings, which is the core of usage guidelines.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/lorenzo-cambiaghi/LynxMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server