Skip to main content
Glama

rename_concept

Destructive

Rename a concept slug and update every backlink in one atomic operation, preserving the node UID and rewriting all file references.

Instructions

⚠ MULTI-FILE WRITE — change a slug and update every backlink in one atomic graph-level operation. The node UID is preserved; only its current human-readable slug changes. Renames the .md file (oldSlug → newSlug, directory move OK), updates the moved file's frontmatter slug: key, and rewrites every backlink — frontmatter array entries (capabilities / elements / dependencies / relates / contains / describes), inline-string keys, and body links [[oldSlug]] / (oldSlug.md). Tail-only references (mcp-server for capabilities/mcp-server) are also redirected to the new tail. Two-stage safety:

  1. Without confirm: true the call is a dry-run — returns updates (each affected file with before/after array keys + bodyChanged flag) without writing.

  2. With confirm: true the file is moved and all backlinks are rewritten in one pass. Throws if oldSlug missing or newSlug already taken (unless overwrite: true). Use this instead of patch_concept + N find_backlinks + N patch_concept loops. Confirmed writes return compact postWriteMaintenance (maintenance_plan) with count-safe byPhase / bySeverity / byKind queue buckets, action score, executable proposedAction, and current-page nextExecutableAction / nextReviewAction pointers for the final graph.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
confirmNoActually perform the rename when true. Omit or false for a dry-run preview.
newSlugYesTarget vault-relative slug (omit the .md extension). Directories are created if needed.
oldSlugYesCurrent vault-relative slug (omit the .md extension).
overwriteNoAllow overwriting an existing file at newSlug. Defaults to false (throws if newSlug exists).
expected_mtimeNoOptional conflict guard for oldSlug. Pass the `mtime` from get_concept; throws VaultConflictError if the source has been modified externally since you read it.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
uidYes
movedYes
dryRunYes
changedNo
messageNo
newSlugYes
oldSlugYes
canConfirmYesTrue only when repeating the call with confirm:true can perform the previewed change without another explicit safety opt-in.
sourcePathYes
targetPathYes
wouldChangeYesTrue only when the dry-run predicts a disk or Git change.
previewReadyYesTrue only when this response is a complete dry-run preview that an agent can review.
blockedReasonsYesMachine-readable human explanations for every condition currently blocking confirmation.
backlinkUpdatesYes
postWriteMaintenanceNoCompact maintenance_plan summary for post-write follow-up. Bucket maps describe the remaining queue after the write.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.13.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and readOnlyHint=false, and the description expands on this with essential behavioral context: atomic multi-file write, UID preservation, backlink rewrite details, overwrite semantics, mtime conflict guard, and postWriteMaintenance return structure. No contradiction with annotations.

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?

The description is long but every clause earns its place: it front-loads the destructive multi-file warning, then uses numbered safety stages and precise edge cases. The detail is proportional to the complexity of a graph-wide rename operation.

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 destructive graph-level mutation, the description covers the dry-run preview, confirmed-write behavior, error/conflict conditions, alternative workflow guidance, and the return maintenance plan structure. With a rich input schema, output schema, and safety annotations, nothing critical is missing for an agent to decide whether and how to invoke this tool.

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?

All five parameters have complete schema descriptions (100% coverage), so the schema already explains confirm, newSlug, oldSlug, overwrite, and expected_mtime. The description adds behavioral context such as rename direction and overwrite throw behavior, but largely reinforces what the schema already says rather than providing substantial new parameter-level 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?

Opens with a precise statement of action and scope: 'change a slug and update every backlink in one atomic graph-level operation.' It further details exactly what changes (file move, frontmatter slug key, inline-string keys, body links, tail-only references) and what stays the same (node UID), making it clearly distinct from siblings like patch_concept, find_backlinks, and delete_concept.

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?

Explicitly names the alternative workflow: 'Use this instead of patch_concept + N find_backlinks + N patch_concept loops.' It also defines the two-stage safety flow (dry-run without confirm, actual write with confirm) and the throw conditions for missing oldSlug or taken newSlug, giving the agent clear invocation guidance.

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