Skip to main content
Glama

kb_rebuild

Idempotent

Rebuild one knowledge-folder index from its local source after user approval; the existing index remains active until the new one is complete.

Instructions

Rebuild one index of the knowledge folder from its source on this PC — ONLY with the user's approval (docs/KNOWLEDGE_BASE.md rule 6: the user is asked, or pass the confirm_token of tc_request_confirmation(action='kb_rebuild', args={'index': …})). index: 'infosys' (the Help Viewer package, the plugin's extractor, in its own process — minutes; the current index stays in use until the new one is complete and then replaces it), 'manuals' (the PDFs in manuals, in its own process), 'esi' (the ESI files in manuals\ and TwinCAT's ESI folders → index\esi.db, in its own process — minutes; the current index stays in use until the new one is complete). Without force an index that is complete and current is left as it is. Nothing is deleted. kb_status / tc_doctor show the progress.

Input Schema

NameRequiredDescriptionDefault
forceNo
indexYes
confirm_tokenNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.8.12

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations (idempotent, non-destructive), the description discloses duration ('minutes'), process isolation ('in its own process'), the atomic-swap semantics ('the current index stays in use until the new one is complete and then replaces it'), the output location (index\esi.db), the safety guarantee ('Nothing is deleted') and how to monitor progress (kb_status / tc_doctor). That is substantial context the annotations cannot carry.

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 most important constraints — the rebuild scope and the approval requirement — are front-loaded, and every clause carries information. It loses a point for the repetitive 'in its own process' phrasing across all three index variants and for cramming everything into one dense paragraph with nested parentheses rather than a short list.

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 multi-step, approval-gated maintenance operation this covers the full agent workflow: permission gating, per-index behavior, no-op conditions, side-effect safety, progress monitoring, and where the artifact lands. An output schema exists, so return values need not be described.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries the full burden, and it does: it enumerates the three valid index values with per-value semantics ('infosys' Help Viewer package, 'manuals' PDFs, 'esi' ESI files and TwinCAT ESI folders), explains force's effect on skip-if-current behavior, and explains confirm_token's origin. No parameter is left ambiguous.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening clause gives a specific verb and resource — 'Rebuild one index of the knowledge folder from its source on this PC' — plus the scope ('one index'), so an agent knows exactly what is being acted on. It stops short of a 5 because the sibling kb_reindex is never named or contrasted, leaving the boundary between 'rebuild' and 'reindex' to inference.

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

Usage Guidelines5/5

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

It states an explicit precondition ('ONLY with the user's approval'), cites the governing rule (docs/KNOWLEDGE_BASE.md rule 6) and the exact confirmation mechanism to satisfy it (tc_request_confirmation(action='kb_rebuild', ...)). It also tells the agent when the tool is a no-op ('Without force an index that is complete and current is left as it is'), which is genuine when/when-not guidance.

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

Deploy Server

Other Tools