Skip to main content
Glama
zoeynine

Obsidian Server MCP

by zoeynine

vault_replace_text

Destructive

Replace one exact, case-sensitive text match in an existing UTF-8 vault file using a version guard; provide empty new text to delete the match. No automatic retry.

Instructions

Replace one unique, case-sensitive literal match in an existing UTF-8 file. Copy exact oldText from a whole-file vault_read; copy version as ifMatch or versionGuard as ifMatchGuard. Empty newText deletes. No automatic retry.

Input Schema

NameRequiredDescriptionDefault
pathYes
ifMatchNo
newTextYes
oldTextYes
ifMatchGuardNo

Output Schema

NameRequiredDescriptionDefault
pathYes
createdYes
messageYes
versionYes
warningsNo
sizeBytesYes
versionGuardYes
beforeSizeBytesYes
replacementCountYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=false; the description adds real context beyond them: the match must be unique and case-sensitive, empty newText deletes the match, and there is no automatic retry on conflict. It does not say what error surfaces when the match is missing or non-unique, which is the remaining gap for a destructive tool.

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?

Four short sentences, zero filler, with the core operation and its uniqueness constraint front-loaded before the workflow notes. Every sentence adds a distinct fact an agent needs.

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?

An output schema exists so return values need not be described, and the description covers the match semantics, guard parameters, delete-by-empty-newText, and retry behavior. The only meaningful omission is failure-mode detail for a non-unique or absent match on a destructive edit.

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

Parameters4/5

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

With 0% schema description coverage, the description carries the burden and largely succeeds: oldText must be an exact literal from vault_read, newText may be empty to delete, and both ifMatch and ifMatchGuard are explained as version-carrying guards. Only 'path' is left unstated, which is self-evident.

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 with the exact matching semantics: 'Replace one unique, case-sensitive literal match in an existing UTF-8 file.' The uniqueness and case-sensitivity constraints implicitly separate it from vault_patch, vault_write and vault_append, so an agent can pick it without opening a schema.

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

Usage Guidelines4/5

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

Gives the required workflow upfront: copy exact oldText from a whole-file vault_read, and carry version into ifMatch or versionGuard into ifMatchGuard. 'No automatic retry' tells the caller it must handle failure. It stops short of naming when to use vault_patch or vault_append instead, so no explicit exclusion is stated.

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