Skip to main content
Glama

Query

query
Read-onlyIdempotent

Query a code knowledge graph to find relationships, search symbols, and analyze impact of changes. Perform impact analysis, search, and inspect large functions or callsites.

Instructions

Query the code knowledge graph for relationships, search, and impact analysis. Actions: query (pattern, target), search (search_query), impact (changed_files|base), large_functions (min_lines), spot_check (n -- random callsite snippets from last callers_of/callees_of/inheritors_of/importers_of result), renamed_in_diff (base -- symbols whose callsite line shifted vs base ref), diff (from_sha, to_sha -- nodes added/removed/modified between two commit SHAs). Use help tool for full docs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nNo
baseNoHEAD~1
kindNo
repoNo
as_ofNo
limitNo
actionYes
targetNo
to_shaNo
patternNo
from_shaNo
languagesNo
max_depthNo
min_linesNo
repo_rootNo
max_resultsNo
search_queryNo
changed_filesNo
context_linesNo
file_path_patternNo
max_payload_bytesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations already mark the tool as read-only, idempotent, and non-destructive. The description adds behavioral context for each action (e.g., spot_check does random callsite snippets, diff shows changes between commits), providing value beyond annotations without contradiction.

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?

The description is a single paragraph that efficiently bundles the purpose and action list. It is front-loaded with the main verb and resource. However, the inline action listing is somewhat dense and could be more structured with bullet points.

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?

Given 21 parameters, 0% schema coverage, and a complex multi-action tool, the description provides a high-level overview but defers full detail to the help tool. It does not cover prerequisites, default behaviors, or edge cases, leaving the agent to infer many usage aspects.

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. It explains parameters for some actions (pattern, target, search_query, etc.) but ignores many of the 21 parameters like limit, kind, repo, as_of, and others, leaving significant gaps for a complex tool.

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 the tool queries a 'code knowledge graph' for relationships, search, and impact analysis, listing specific actions like query, search, impact, etc. It distinguishes from sibling tools like 'graph' by focusing on query capabilities and referencing a separate 'graph' tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description lists actions with brief parameter hints and directs to 'help' for full docs, but does not explicitly guide when to use this tool over siblings like 'graph' or 'review'. Usage guidance is implied through action descriptions rather than explicit when-to/not-to-use comparisons.

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

Install Server

Other Tools

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/n24q02m/better-code-review-graph'

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