Skip to main content
Glama

fix_duplicate_uid

Assigns a new UID to the newer of two notes sharing a UID, leaving the older note and its relations unchanged; requires explicit user confirmation before rewriting.

Instructions

Give a note a new uid because an older note already holds its uid (lint_vault reports the newer file as duplicate-uid, for example a file dropped in with a copied header). path is the file lint_vault named.

Ask the user first, every time: it rewrites the uid line of that file. Show the user both files, then call this with user_confirmed=true only after they said yes. Without it nothing is written and an error says why. The older node keeps the uid. Relations that point at the old uid mean the older node, so none of them is rewritten. Recorded as one commit; undo_last_vault_change undoes it. Refuses a file that is not the newer holder of a shared uid. Returns {path, old_uid, new_uid, commit} or {error}.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>"
    },
    "name": "fix_duplicate_uid"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
user_confirmedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.9.0

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses the mutation (rewrites the uid line of that file), the gating behavior (nothing is written without confirmation; an error explains why), the data-integrity rule that the older node keeps the uid and inbound relations are not rewritten, commit granularity, undo support, and the return shape.

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 first sentence front-loads what the tool does and why, and nearly every clause carries operational meaning. It is dense and line-broken into a near-wall of text, so a small amount of trimming or bullet structure would improve scannability without losing content.

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?

There is no output schema and no annotations, yet the description covers return values ({path, old_uid, new_uid, commit} or {error}), safety gating, side effects, scope of rewrite, refusals, and undo. Nothing an agent needs in order to call this correctly is missing.

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 must compensate, and it does: `path` is defined as 'the file lint_vault named', and `user_confirmed` is given real semantics (only set true after the user has said yes; without it nothing is written). Both parameters become usable without any schema documentation.

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 ('Give a note a new uid') plus the exact triggering condition ('because an older note already holds its uid'), and explicitly ties it to lint_vault's `duplicate-uid` report. An agent can distinguish it from lint_vault (detects) and generate_uid (mints new ids) 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 Guidelines5/5

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

Names the upstream step (lint_vault reports the file), the prerequisite (ask the user, then pass `user_confirmed=true`), the refusal condition ('Refuses a file that is not the newer holder of a shared uid'), and the reversal path (undo_last_vault_change). When-to-use, when-not-to-use, and the alternative for undoing are all explicit.

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