Skip to main content
Glama
dfine-io

dfine-semantic

Official
by dfine-io

Index a project

index_project
DestructiveIdempotent

Builds or refreshes a semantic index for a project root, embedding new or changed files and removing deleted ones to enable natural-language code search.

Instructions

Build or refresh the semantic index of a project root. Embeds only new, edited or outdated files and drops deleted ones. Pass duplicates: true once to enable find_duplicates for this project.

Input Schema

NameRequiredDescriptionDefault
pathYesAbsolute path to project root
forceNoDiscard the stored index and rebuild it from scratch
duplicatesNotrue builds the duplicate index, false deletes it - omit to keep it as is
extensionsNoFile extensions to index - omit to keep the project's list

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.4

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=true, and readOnlyHint=false, so the safety profile is covered structurally. The description adds real behavioral value beyond that: it explains the incremental strategy (only new/edited/outdated files are embedded, deleted ones dropped) and that duplicates indexing is opt-in and persists across calls. It stops short of noting cost/duration or concurrency concerns for a long-running index build.

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 tight sentences: purpose first, then the incremental/destructive behavior, then the one opt-in flag that has side effects on another tool. No filler, and the most decision-relevant fact is front-loaded.

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 a 4-parameter mutation tool with no output schema and annotations that already carry the safety hints, the description covers purpose, mutation semantics, and the one non-obvious flag. It is complete enough to invoke correctly; only return/status reporting and expected duration are unaddressed, which is minor given index_status exists.

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 path, force, duplicates, and extensions are all self-documenting in the schema. The description reinforces the duplicates parameter's cross-tool effect on find_duplicates, which is mild added meaning, but does not clarify force vs. default or extension-list persistence beyond what the schema says. Baseline 3 applies.

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?

States a specific verb+resource ('Build or refresh the semantic index of a project root') and immediately scopes what it touches. It is distinguishable from siblings like index_status (which presumably reports) and semantic_search (which queries) without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives one concrete usage instruction — pass duplicates: true once to enable find_duplicates — which ties this tool to a sibling. However, it never says when to call this versus index_status (e.g., check status before reindexing) or when a full rebuild (force) is warranted over the default incremental behavior.

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