Skip to main content
Glama

Ask About Codebase

ask_codebase

Answer questions about any codebase using its actual source code. Point it at a local folder or GitHub URL — no cloning required — to get grounded explanations of structure, files, and flows.

Instructions

Ask any question about a codebase and get an answer grounded in the actual code. Accepts a local folder path OR a GitHub URL (e.g. https://github.com/user/repo) — no cloning needed.

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": {
      "repo_path": "<repo_path>",
      "question": "<question>"
    },
    "name": "ask_codebase"
  }
}

Input Schema

NameRequiredDescriptionDefault
questionYesYour question about the codebase
max_filesNoMax number of files to read for context (default: 12)
repo_pathYesLocal folder path OR a GitHub repo URL (https://github.com/user/repo)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses that answers are grounded in real code and that GitHub URLs work without cloning, which removes a real operational uncertainty; however, it says nothing about read-only safety, cost/latency of scanning, error behavior on bad paths or private repos, or how sources are cited.

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 tightly written sentences, front-loaded with the core capability and followed immediately by the input-form constraint. Every clause earns its place; there is no filler or redundancy.

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 low-complexity, three-parameter tool with full schema coverage and no output schema, the essentials are covered. The main residual gap is that the description does not characterize the returned answer (e.g., whether it includes file citations or line references), which an agent would find useful when composing follow-up calls.

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 coverage is 100%, so both required parameters are already documented in the schema, and the description largely repeats the repo_path schema text rather than extending it. max_files and its default of 12 are never mentioned, so no meaning is added beyond structured fields.

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?

States a specific action and resource — ask a question about a codebase and receive an answer grounded in the actual code — which is more than a restatement of the name. It does not explicitly differentiate itself from the specialized siblings (explain_auth_flow, identify_key_files, scan_repo_structure), so an agent must infer that this is the general-purpose Q&A entry point.

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 description implies usage ('ask any question') and clarifies the accepted input forms (local folder or GitHub URL, no cloning), but gives no explicit when-to-use/when-not guidance or routing toward the narrower sibling tools. Nothing is misleading, but the selection decision is left to inference.

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