Skip to main content
Glama
Treeweft

treeweft-mcp

Official
by Treeweft

index_file

Parse, chunk, embed, and store a code file in vectors and entities to enable GraphRAG search. Returns a job_id for tracking; set force=true to re-index unchanged files.

Instructions

Index a single code file. Parses with tree-sitter, chunks with chonkie, embeds via TEI, and stores vectors in Milvus + entities in Neo4j. Returns immediately with a job_id; poll get_index_job to track progress. Set force=true to re-index even if this file is already indexed and unchanged (otherwise the call no-ops to the prior job).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
forceNo
file_pathYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2026.9.23

TDQS

A4.7/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 behavioral burden and does so thoroughly. It discloses that the tool is asynchronous ('Returns immediately with a job_id'), names the follow-up tool for tracking, explains the no-op behavior for unchanged files, and details the underlying pipeline. This is rich behavioral context beyond the schema.

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, zero filler, and the core action is front-loaded. Each sentence adds necessary information: what it does, how to track it, and when to adjust behavior. The structure is ideal for an AI agent scanning quickly.

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?

For a tool with two simple parameters, no annotations, and no output schema, the description is complete. It covers the asynchronous workflow, the no-op case, the force option, and the downstream storage destinations. Nothing an agent needs to call it correctly is missing.

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 force's meaning and effect in detail ('re-index even if this file is already indexed and unchanged'). file_path is not elaborated beyond 'single code file,' but its name and string type make it self-explanatory. This is good compensation for a small parameter set.

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 names a specific verb and resource: 'Index a single code file,' which clearly differentiates it from siblings like index_directory and index_repo. It also states the full processing pipeline and the asynchronous result behavior, leaving no ambiguity about what the tool does.

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: this is for a single file, implying index_directory/index_repo are alternatives for broader scopes. It also explains when to set force=true and when the call no-ops, which is concrete usage guidance. It does not explicitly enumerate sibling alternatives or exclusion criteria, but the single-file scope is sufficient.

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