Skip to main content
Glama
mvagnon

opencode-mcp

by mvagnon

Ask codebase

ask_codebase
Read-only

Ask natural-language questions about any GitHub repository and receive answers grounded in the actual code. Automatically fetches the repo, read-only, with optional branch and session continuation.

Instructions

Ask a natural-language question about a GitHub repository and get an answer grounded in the real code. READ-ONLY: never writes, edits, builds, or executes anything. The harness fetches the repo itself (clone or refresh, max every few days) — a nonexistent repo fails fast with the exact git error. Stateful PER REPOSITORY: continue_session=true resumes the latest discussion of that owner/repo (follow-up questions keep their context); false (default) starts a fresh one. Optional branch pins a specific branch. Use it for architecture questions, where a feature lives, request flow, conventions, design rationale, etc.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoYesREQUIRED exact GitHub slug "owner/repo" (e.g. "vercel/next.js"). Deterministic — no nicknames, no fuzzy descriptions, no URLs. The harness fetches it itself and fails fast with the exact git error if it does not exist or is unreachable.
branchNoOptional branch to pin (e.g. "canary"). Omit for the repo's default branch. An explicit branch different from the current checkout triggers a re-fetch.
questionYesThe natural-language question (e.g. "where is API request auth validated?").
continue_sessionNoIf true, resume the latest discussion of this repo (same context; the checkout is only refreshed by the TTL policy, so code usually stays stable). If false (default), start a fresh discussion.
Behavior5/5

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

The description adds substantial behavioral context beyond the readOnlyHint and openWorldHint annotations: it explicitly states 'READ-ONLY: never writes, edits, builds, or executes anything', explains the harness's repo fetching and caching behavior, fails-fast with git errors, and details session statefulness with continue_session. No contradictions 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 concise (four sentences) and front-loaded with the core purpose. Every sentence delivers unique value: purpose, safety, fetch behavior, statefulness, and usage examples. No fluff or repetition.

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?

The description fully covers the tool's behavior, safety, statefulness, fetch mechanics, and use cases. The input schema thoroughly documents all four parameters, and the description complements it without needing an output schema. It is complete for an AI agent to decide when and how to invoke the tool.

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 baseline is 3. The description enriches parameter understanding beyond the schema by explaining deterministic repo slugs, session semantics associated with continue_session, and branch behavior (e.g., re-fetch on explicit branch). This adds meaningful context rather than merely repeating schema descriptions.

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 precisely states that the tool answers natural-language questions about a GitHub repository with answers grounded in real code. The verb 'Ask' and resource 'codebase' are specific and there are no sibling tools requiring differentiation.

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?

It explicitly lists use cases: 'architecture questions, where a feature lives, request flow, conventions, design rationale, etc.' This gives clear context on when to use the tool, even though no alternatives exist to contrast.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mvagnon/opencode-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server