Skip to main content
Glama
Treeweft

treeweft-mcp

Official
by Treeweft

index_repo

Index a Git repository from a local path or remote URL, creating a searchable index job with a retrievable ID for progress tracking.

Instructions

Index a git repository. Accepts a local path (with ~/ expansion) or a remote git URL. Auto-detects current branch for local repos. Returns immediately with a job_id; poll get_index_job to track progress. Re-indexing the same source upserts (no duplicates). By default an already-indexed, unchanged source no-ops to its prior job — set force=true to force a full re-index.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNo
pathNo
forceNo
branchNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2026.9.23

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure and does so thoroughly: it reveals the async return via job_id, the polling mechanism, upsert/no-duplicate semantics, and the no-op behavior for unchanged sources unless force=true. This goes well beyond the basic 'index' action.

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?

Three sentences, each adding distinct value: what the tool does, how inputs are provided, and what behavioral results to expect. The core purpose is front-loaded and every sentence earns its place with no fluff.

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?

The description covers the job_id lifecycle, re-indexing behavior, force re-indexing, and acceptable source types. It does not explicitly state whether url and path are mutually exclusive or mention auth requirements, but for a 4-parameter tool with no output schema, it is largely complete.

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 description coverage is 0%, so the description must compensate. It explains path vs URL usage, the force flag's effect, and branch auto-detection for local repos. The branch parameter's role is only implied as an override rather than explicitly stated, which is a minor gap.

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 opening sentence 'Index a git repository' gives a specific verb and resource. The rest of the description further distinguishes it from siblings like index_file and index_directory by clarifying that it handles git repositories via local path or remote URL.

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 clear context on input types (local path with ~/ expansion or remote git URL) and the asynchronous workflow (returns job_id, poll get_index_job). It does not explicitly name alternative indexing tools or state when not to use this tool, but the usage context is strong enough to guide an agent.

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