Skip to main content
Glama

doc_index_repo

Index a GitHub repository's documentation by fetching .md/.txt files, parsing sections, and storing them locally for section-based retrieval, reducing token usage.

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). Indexes .md and .txt only; every other file in the repo is ignored. Returns changes on every success path (at most 50 entries, newest first) with changes_total and changes_truncated beside it; the new/changed/deleted counts are the authority, not len(changes). Each entry's mtime is the head COMMIT date, offset-aware (e.g. 2026-09-20T13:15:39+00:00), because a repository has no per-file modification time. index_local's mtime is naive local time instead, so read the offset before comparing times across the two.

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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.118.0
  2. Removedv1.99.0
  3. Changed3 schema fields changedv1.69.0
    • changedInput schema / properties / incremental / description
      Previous value: -"When true (default), skip all HTTP fetches if the HEAD commit SHA is unchanged; otherwise only re-index changed files. Set to false to force a full re-index."New value: +"When 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."
    • addedInput schema / properties / name
      Added value: +{
      +  "description": "Optional 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.",
      +  "type": "string"
      +}
    • addedInput schema / properties / ref
      Added value: +{
      +  "description": "Optional 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.",
      +  "type": "string"
      +}
  4. First observedv1.66.3

TDQS

A4.4/5.0
Behavior5/5

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

With only readOnlyHint: false as annotation, the description carries the full behavioral burden and does so thoroughly. It discloses embedding auto-enablement tied to specific environment variables, the fact that non-documentation files are ignored, the successful return shape with truncation counts as authority, and the meaning of mtime as the commit date with an offset-aware timezone.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but dense with essential behavior, and the key purpose is front-loaded. Every sentence adds operational value, especially the return-shape warning and timezone caveat. It could be slightly more scannable with bullets, but the organization is effective for the tool's complexity.

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?

Given there is no output schema, the description appropriately documents the return value semantics, truncation behavior, and count-authority rule. It also covers important cross-tool nuance with index_local's mtime. The combination of file-type scope, embedding configuration, return semantics, and timezone handling makes the tool safe to invoke correctly.

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 input schema already fully documents every parameter. The description adds useful context about auto-enabled embeddings and return timing, but it does not need to add semantics for each parameter. This matches the baseline for fully schema-documented parameters.

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: 'Index a GitHub repository's documentation.' It clearly states the concrete behavior — fetches .md/.txt files, parses sections, and saves to local storage — and distinguishes itself from the local indexing sibling by contrasting mtime semantics with index_local.

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 gives clear context for when this tool applies: GitHub repositories, and it explicitly restricts scope to .md/.txt files while ignoring all others. It references index_local in a comparative way and explains the mtime difference, but it does not explicitly say 'use index_local for local directories' or state exclusions among siblings.

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