Skip to main content
Glama

register_edit

Idempotent

Notify trace-mcp that a file was edited, triggering a lightweight reindex and cache invalidation to keep search fresh. Also flags duplicate symbols to prevent recreating existing logic.

Instructions

Notify trace-mcp that a file was edited. Reindexes the single file and invalidates search caches. Call after Edit/Write to keep index fresh — much lighter than full reindex. Also flags duplicate symbols — if _duplication_warnings appears, you may be recreating existing logic; review them. Each one is reported once per file, not on every edit; check_duplication re-asks. Mutates the index; idempotent. Returns JSON: { status, file, totalFiles, indexed, _duplication_warnings? }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesRelative path to the edited file

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv3.3.0
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
  2. Added
  3. Removedv1.38.0
  4. Changed1 schema field changedv1.35.1
    • removedInput schema / additionalProperties
      Removed value: -false
  5. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already carry idempotentHint=true, readOnlyHint=false, and destructiveHint=false; the description confirms these ('Mutates the index; idempotent') without contradicting them. It adds real value beyond annotations: search-cache invalidation, duplicate-symbol flagging, the once-per-file reporting constraint, and the exact JSON return shape. Minor gap: no mention of error behavior when the file path is invalid.

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?

Front-loaded with the core purpose, then usage guidance, then the duplication caveat, then the return format. Each sentence earns its place and the information is ordered by importance. Slightly dense, but not padded — no redundancy with the schema or annotations.

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?

Complete for a single-parameter mutation tool: it covers what happens (reindex, cache invalidation), when to use it (after Edit/Write, lighter than full reindex), its idempotency, a caveat (duplication warnings, reported once per file), and the return structure in the absence of an output schema. 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.

Parameters3/5

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

Schema coverage is 100% — the single parameter file_path is fully documented as 'Relative path to the edited file.' The description references the file only implicitly through the return JSON ({ file }), adding no semantic detail beyond the schema. Baseline 3 is appropriate since the schema carries the parameter meaning.

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 and resource ('Notify trace-mcp that a file was edited'), and precisely scopes what happens: reindex the single file and invalidate search caches. It clearly differentiates from the read-oriented siblings (get_index_health, get_symbol, search) by being a mutation, and positions itself as the lightweight single-file counterpart to a full reindex.

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?

Gives explicit when-to-use guidance: 'Call after Edit/Write to keep index fresh — much lighter than full reindex.' It names the alternative (full reindex) and the deciding condition. It also routes a follow-up question to a sibling ('check_duplication re-asks'), so an agent knows which tool to pick next.

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