Skip to main content
Glama

query_graph

Read-onlyIdempotent

Run read-only Cypher to analyze multi-hop code paths, aggregations, and cross-service dependencies. Use the missed graph to detect coverage gaps.

Instructions

Read-only Cypher for multi-hop, aggregation, complexity, or cross-service analysis. Default: 200 visible rows with exact/lower-bound totals and truncation; continue safely with next_cursor. graph=missed is a file tree of flagged coverage gaps; absence is not proof of completeness. Use get_graph_schema(diagnostics=full) for properties.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
graphNocode graph (default) or missed coverage-gap file tree.code
queryYesCypher query
cursorNoSnapshot continuation; keep query/project/graph. Format, budget, and max_rows may change.
formatNotree may use local @N+suffix prefix refs; json uses direct strings.tree
offsetNoLive compatibility paging; cannot be combined with cursor.
projectYes
max_rowsNoVisible rows (default 200; max 99998); 0 uses the legacy maximum. Evaluation is unchanged.
max_output_tokensNoSizing hint; hard ceiling is 4 UTF-8 bytes/token. Rows stay whole.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changedv0.11.0
    • addedInput schema / properties / cursor
      Added value: +{
      +  "description": "Snapshot continuation; keep query/project/graph. Format, budget, and max_rows may change.",
      +  "type": "string"
      +}
    • addedInput schema / properties / format
      Added value: +{
      +  "default": "tree",
      +  "description": "tree may use local @N+suffix prefix refs; json uses direct strings.",
      +  "enum": [
      +    "tree",
      +    "json"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / graph / description
      Previous value: -"Which graph to query: the code knowledge graph (default) or the missed graph (only files not fully indexed, laid out as their file structure)."New value: +"code graph (default) or missed coverage-gap file tree."
    • addedInput schema / properties / max_output_tokens
      Added value: +{
      +  "description": "Sizing hint; hard ceiling is 4 UTF-8 bytes/token. Rows stay whole.",
      +  "maximum": 1000000,
      +  "minimum": 128,
      +  "type": "integer"
      +}
    • addedInput schema / properties / max_rows / default
      Added value: +200
    • changedInput schema / properties / max_rows / description
      Previous value: -"Optional row limit. Default: unlimited up to a 100k row ceiling. No offset support — use search_graph for paginated browsing."New value: +"Visible rows (default 200; max 99998); 0 uses the legacy maximum. Evaluation is unchanged."
    • addedInput schema / properties / max_rows / minimum
      Added value: +0
    • addedInput schema / properties / offset
      Added value: +{
      +  "default": 0,
      +  "description": "Live compatibility paging; cannot be combined with cursor.",
      +  "minimum": 0,
      +  "type": "integer"
      +}
  2. Changed1 schema field changedv0.10.4
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "type": "object"
      -}New value: +null
  3. Changed1 schema field changedv0.10.0
    • addedInput schema / properties / graph
      Added value: +{
      +  "default": "code",
      +  "description": "Which graph to query: the code knowledge graph (default) or the missed graph (only files not fully indexed, laid out as their file structure).",
      +  "enum": [
      +    "code",
      +    "missed"
      +  ],
      +  "type": "string"
      +}
  4. Changed1 schema field changedv0.9.0
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "type": "object"
      +}
  5. First observedv1.0.0

TDQS

A3.8/5.0
Behavior1/5

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

Annotation Contradiction: openWorldHint=false indicates closed-world results, but the description says 'absence is not proof of completeness' for graph=missed, which is an open-world caveat. While pagination, truncation, and cursor behavior are disclosed, the contradiction with the annotation makes the behavioral guidance unreliable.

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 dense but efficient: it front-loads purpose, then covers pagination behavior, graph=missed semantics, and the get_graph_schema alternative. Every sentence earns its place with no filler.

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?

For an 8-parameter tool with no output schema, the description covers the most important non-obvious behaviors: pagination, truncation, graph modes, and property lookup. It is nearly complete, but the open-world annotation contradiction prevents it from being fully trustworthy.

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?

Schema coverage is high (88%), so the baseline is 3, but the description adds valuable semantics: default 200 visible rows, truncation and lower-bound totals, safe cursor continuation, and the graph=missed coverage-gap caveat. These details meaningfully supplement the schema 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 defines the tool as read-only Cypher for multi-hop, aggregation, complexity, or cross-service analysis, which is specific and informative. It also differentiates from get_graph_schema by directing property-related needs there.

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?

The description states when to use the tool (complex, multi-hop, aggregation, cross-service analysis) and explicitly points to get_graph_schema(diagnostics=full) for properties. It does not explicitly contrast with search_graph or other siblings, leaving room for stronger exclusions.

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