Skip to main content
Glama

doc_index_repo

Indexes a GitHub repository's documentation by fetching .md and .txt files, parsing sections, and storing locally for section-level search and retrieval.

Instructions

Index a GitHub repository's documentation. Fetches .md/.txt files, parses sections, and saves to local storage. Embeddings auto-enable when a provider is configured (GOOGLE_API_KEY, OPENAI_API_KEY, openai-compatible + JDOCMUNCH_OPENAI_COMPAT_URL + JDOCMUNCH_OPENAI_COMPAT_MODEL, or sentence-transformers).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refNoOptional GitHub branch, tag, or commit-ish to index. If omitted, HEAD is used. The ref is resolved to a commit SHA before fetching content; repo@sha remains the durable lookup handle.
urlYesGitHub repository URL or owner/repo string
nameNoOptional stored index name override. If omitted, the GitHub repo name is used. Must be a safe storage component: letters, numbers, dot, underscore, and hyphen only.
incrementalNoWhen true (default), skip all HTTP fetches if the selected GitHub ref's commit SHA is unchanged; otherwise only re-index changed files. Set to false to force a full re-index.
use_embeddingsNoGenerate semantic embeddings for each section. true/false/"auto". "auto" (default) enables embeddings when an embedding provider is configured, including openai-compatible + JDOCMUNCH_OPENAI_COMPAT_URL + JDOCMUNCH_OPENAI_COMPAT_MODEL.auto
use_ai_summariesNoUse AI to generate section summaries.
Behavior4/5

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

The description adds value beyond annotations: it explains the indexing process, the conditional embedding behavior, and the ref resolution. Annotations already indicate mutability (readOnlyHint=false), and the description confirms this with 'saves to local storage'. Minor gap: no mention of overwrite behavior on re-index.

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 two sentences, front-loaded with the core purpose, and each sentence adds necessary context. No redundant information.

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

Completeness3/5

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

Given no output schema, the description could mention the return value or side effects. It covers the indexing process and embedding configuration, but lacks details on prerequisites (e.g., GitHub API auth) and what happens on subsequent runs.

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 already documents each parameter. The description adds marginal value by re-iterating the embedding condition for use_embeddings, but does not provide new insights beyond the schema.

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 clearly states the verb ('Index'), resource ('a GitHub repository's documentation'), and specific actions ('Fetches .md/.txt files, parses sections, and saves to local storage'). It distinguishes from siblings like index_local and other doc query tools.

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?

The description provides context on when embeddings are auto-enabled (based on environment variables) and mentions the ref parameter. However, it lacks explicit guidance on when not to use this tool versus alternatives like index_local or other indexing tools.

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/jgravelle/jdocmunch-mcp'

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