Skip to main content
Glama
Srinivasan-78

io.github.Srinivasan-78/repo2graph

repo_search

Read-onlyIdempotent

Find code implementations, error strings, and answers to questions by searching repository code with BM25 ranking and graph-neighbour expansion. Returns cited code chunks within your token budget.

Instructions

Search repository code for answers to questions using BM25 lexical ranking expanded with graph neighbours. Read-only, no side effects, secret files (.env) excluded. When to use: use for open-ended queries, locating implementations, or finding error strings. When NOT to use: do not use when you already have a symbol node_id and want callers/callees (use repo_neighbours); do not use for broad repo layout (use repo_map). Output: markdown citation blocks [cite: path:start-end] bounded by budget_tokens.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kNoNumber of initial seed chunks retrieved via BM25 lexical scoring (default 8, max 50).
hopsNoGraph traversal depth around seed chunks (default 1, max 4; 0 returns seeds only).
queryYesNatural language question, search terms, or symbol identifier to search for (e.g. 'pack_context' or 'how does export work').
budget_tokensNoMaximum token ceiling for returned markdown pack (default 6000, max 12000).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.5.1
    • changedInput schema / properties / budget_tokens / description
      Previous value: -"max 12000"New value: +"Maximum token ceiling for returned markdown pack (default 6000, max 12000)."
    • changedInput schema / properties / hops / description
      Previous value: -"graph hops (default 1, max 4)"New value: +"Graph traversal depth around seed chunks (default 1, max 4; 0 returns seeds only)."
    • changedInput schema / properties / k / description
      Previous value: -"seed chunks (default 8, max 50)"New value: +"Number of initial seed chunks retrieved via BM25 lexical scoring (default 8, max 50)."
    • changedInput schema / properties / query / description
      Previous value: -"the question"New value: +"Natural language question, search terms, or symbol identifier to search for (e.g. 'pack_context' or 'how does export work')."
  2. 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, idempotentHint, and destructiveHint, so the safety profile is covered. The description adds genuinely useful behavioral context beyond annotations: secret files (.env) are excluded, the output format is markdown citation blocks, and results are bounded by budget_tokens. No contradiction with annotations.

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 every sentence earns its place: purpose, safety, when-to-use, when-not-to-use, and output format. It is front-loaded with the core purpose and the exclusions are clearly separated, making it easy for an agent to parse quickly.

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?

For a tool with rich annotations and 100% parameter schema coverage, the description covers everything an agent needs to decide when to call it, what it does, what it returns, and how to avoid misuse. The sibling alternatives are named, the output format is specified, and the safety profile is already in annotations. No critical gap remains.

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 the schema fully documents all four parameters. The description does not add significant parameter-level meaning beyond what the schema already provides, though it does clarify that output is citation blocks bounded by budget_tokens, which is consistent with the schema's description. Baseline 3 is appropriate.

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 opens with a specific verb and resource: 'Search repository code for answers to questions.' It also names the search technique (BM25 lexical ranking expanded with graph neighbours) and explicitly contrasts with sibling tools in the usage section, making the tool's distinct role clear.

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

Usage Guidelines5/5

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

The description provides explicit when-to-use guidance ('open-ended queries, locating implementations, or finding error strings') and explicit when-not-to-use guidance with named alternatives (repo_neighbours for callers/callees, repo_map for broad layout). An agent can reliably route to the correct tool without further inference.

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