Skip to main content
Glama
Treeweft

treeweft-mcp

Official
by Treeweft

index_directory

Recursively index all code files in a directory to enable search, returning a job ID for progress tracking. Use force=true to re-index even when the directory is unchanged.

Instructions

Index all code files in a directory (recursive). Returns immediately with a job_id; poll get_index_job to track progress. Set force=true to re-index even if the directory is already indexed and unchanged (otherwise the call no-ops to the prior job).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
forceNo
patternNo**/*
directoryYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2026.9.23

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does well: it discloses async return, the job_id, and the force re-index/no-op behavior. It does not mention side effects (index persistence) or permissions, but the core behavior is transparent.

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 concise sentences, front-loaded with the primary purpose. Every sentence adds value: purpose, async behavior, and force semantics. No wasted words.

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 an async tool, it covers the key workflow: immediate return, job_id, and polling via get_index_job. It does not explain the pattern parameter or error handling, but given the simplicity and no output schema, it is reasonably complete. The missing pattern is the main gap.

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 0%, so the description must explain parameters. It explains force ('Set force=true to re-index... otherwise no-ops'), and directory is implied by the title. However, the pattern parameter is never mentioned, leaving its meaning and default unexplained, which is a significant 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 description clearly states a specific action and resource: 'Index all code files in a directory (recursive)'. This distinguishes it from siblings like index_file (single file) and index_repo (repo-level). The recursive scope and directory target are explicit.

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?

Provides clear context: it is asynchronous (returns immediately with job_id, poll get_index_job), and explains the force parameter's no-op behavior. However, it does not explicitly exclude alternatives such as index_file for single files or mention when to prefer another tool, leaving some inference.

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