Skip to main content
Glama

project_query

Read-onlyIdempotent

Locate ranked code locations for symbols, files, or questions, returning numbered source lines and filters for evidence-first repository analysis.

Instructions

Where is X / what handles Y: ranked code locations as text with numbered source lines. Hits are leads, not claims.

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": "project_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
formatNo'text' (default): plain text, skeleton first; 'json': items; 'sentences': the prose sentences, file:line.text
questionYesQuestion, symbol or file names to look up; filters narrow it: path:GLOB lang: symbol: is:vendored /regex/ AND OR NOT.
max_itemsNoMaximum code locations to return (1-25).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.5.0
    • changedInput schema / properties / format / description
      Previous value: -"'text' (default): plain text for reading, skeleton first; 'json': structured items."New value: +"'text' (default): plain text, skeleton first; 'json': items; 'sentences': the prose sentences, file:line."
    • changedInput schema / properties / format / enum
      Previous value: -[
      -  "text",
      -  "json"
      -]New value: +[
      +  "text",
      +  "json",
      +  "sentences"
      +]
  2. Changed1 schema field changedv0.4.0
    • changedInput schema / properties / question / description
      Previous value: -"Question, symbol or file names to look up."New value: +"Question, symbol or file names to look up; filters narrow it: path:GLOB lang: symbol: is:vendored /regex/ AND OR NOT."
  3. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, and closed-world behavior. The description adds meaningful value by noting that results are ranked locations with numbered source lines and that hits are leads rather than authoritative claims, which helps the agent interpret output.

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 very short, front-loads the core use case, and every phrase contributes: the 'Where is X / what handles Y' framing, the ranked-location result shape, and the caveat about hits being leads.

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 a read-only code search tool with no output schema, the description sufficiently establishes the return type as ranked code locations with numbered source lines and warns that results are leads. It could mention ranking behavior or result limits more explicitly, but the schema covers format and max_items details.

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

Parameters3/5

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

Schema description coverage is 100%, so all parameter semantics are already documented in the schema. The description adds little beyond the schema, except framing the default text format as showing numbered source lines; baseline 3 is appropriate when the schema does the heavy lifting.

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 states a clear retrieval purpose with concrete examples ('Where is X / what handles Y') and the resource ('ranked code locations'). It does not explicitly differentiate itself from sibling tools such as analyze or code_check, but its search-oriented intent is distinct enough for an agent to identify.

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 phrasing 'Where is X / what handles Y' implies when to use the tool for code lookup, and 'Hits are leads, not claims' gives useful caution. However, there is no explicit guidance on when to choose this over siblings like analyze or code_check, nor any stated exclusions.

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

Deploy Server

Other Tools