Skip to main content
Glama

Search code

search
Read-only

Find code by symbol name, keyword, or natural-language question across AST chunks; returns ranked file:line ranges with matching lines.

Instructions

Hybrid code search over AST chunks (whole functions, methods, classes): symbol names, BM25 keywords and a local code embedding model, so identifiers and plain questions both work, e.g. "parseConfig", "refresh token expiry" or "where are failed requests retried". Returns ranked file:line ranges with the matching lines.

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

Input Schema

NameRequiredDescriptionDefault
kindNo
pathNoOnly files whose path starts with or contains this.
rootNoRepository root. Defaults to the client's workspace root or the server's working directory.
limitNoMax results (default 10).
queryYes
formatNotext (default, compact, file:line cited) or json.
include_testsNoDefault true (tests rank lower).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds real behavioral detail beyond that: which code units are searched, that ranking is hybrid/fused, and that results come back as ranked file:line ranges with matched lines — valuable since there is no output schema. It omits index freshness, result caps beyond the schema's limit, and whether unindexed repos error or fall back.

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?

Two sentences, front-loaded with the mechanism before the examples, and the return-shape sentence closes it. The exemplar list is compact and each item illustrates a distinct query mode rather than padding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Seven parameters but only one required, 71% schema coverage, and no output schema — so the description carries the return-value burden, which it does explicitly. Combined with annotations covering read-only/local-only behavior, nothing the agent needs in order to call it correctly is missing.

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 71% and path, root, limit, format and include_tests are already documented there, so the baseline is 3. The description earns above baseline by clarifying the semantics of the undocumented 'query' parameter: identifiers and plain natural-language questions are both valid, which directly shapes how the agent formulates input.

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?

States a specific verb and resource ('Hybrid code search over AST chunks'), scopes the unit of retrieval (whole functions, methods, classes) and names the retrieval strategy (symbol names, BM25, local embeddings). An agent immediately knows what this returns, and no sibling (context, db, impact, map, trace) competes for the same job.

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?

Gives concrete query exemplars — an identifier ('parseConfig'), a topic phrase ('refresh token expiry') and a natural-language question ('where are failed requests retried') — which tells the agent the input can be either style. It stops short of stating when to prefer this over a sibling like context or map, so it is clear context without 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