Skip to main content
Glama

query

Read-onlyIdempotent

Evaluate Scheme expressions against the code graph to find files affected by a change, symbol usages, and repository structure.

Instructions

Evaluate a Scheme query on the graph, e.g. (files (intersect (deps "A" 2) (rdeps "B" 1))).

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": {
      "expression": "<expression>"
    },
    "name": "query"
  }
}

Input Schema

NameRequiredDescriptionDefault
allNoList everything instead of stopping at 200 items.
expressionYesA Scheme expression; (help) lists the functions.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and a closed-world scope, so the safety profile is covered. The description adds that evaluation happens against the graph in Scheme, but says nothing about sandboxing, error behavior, or result shape beyond what the schema states about the 200-item cap.

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?

A single front-loaded sentence with a worked example; nothing is redundant and the example carries the weight that prose would otherwise need.

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?

For an open-ended query escape hatch with no output schema, the description is thin on what comes back (item shape, truncation behavior) and on how it relates to the many specific sibling query tools. The example plus the schema's `(help)` pointer make it callable, but an agent has to discover the return format empirically.

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 100%, so the baseline is 3, and the description earns above that by supplying a concrete expression example with nested function calls and string/positional arguments, which conveys syntax the schema's "A Scheme expression" line does not. It still does not explain the semantics of the `all` flag, though the schema already documents it.

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: "Evaluate a Scheme query on the graph," and the inline example makes clear this is a general, composable query surface rather than a fixed-purpose lookup. That distinguishes it from single-purpose siblings like deps/rdeps, though it never explicitly names them as alternatives.

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?

Usage is only implied: the example shows a nested intersect of deps and rdeps, suggesting this tool is for compound or ad-hoc queries that the fixed siblings cannot express. There is no explicit when-to-use/when-not statement or routing to alternatives, so an agent must infer the selection rule from the example.

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