Skip to main content
Glama
Seraphoenixy

Ygdria MCP Server

by Seraphoenixy

replace_section

Destructive

Replace a note section's body by heading path while preserving the heading and surrounding content, using the prior get_section output and required version for safe, atomic edits.

Instructions

Replace the body under a unique hierarchy of heading titles, preserving its heading and all outside Tiptap nodes. Use get_section first. oldText is the exact returned Markdown section body, including nested subsections. Requires current expectedVersion. Ambiguous paths fail atomically.

Input Schema

NameRequiredDescriptionDefault
textYes
noteIdYes
oldTextYes
headingPathYes
idempotencyKeyNo
expectedVersionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/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 adds real context beyond them: optimistic concurrency via required expectedVersion, atomic failure on ambiguous heading paths, and the exact-preservation guarantee for the heading and surrounding nodes. It does not explain what happens to nested subsections on failure in detail, or the role of idempotencyKey, but the safety-relevant behavior is well disclosed.

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?

Five short sentences, front-loaded with the action and its preservation scope, then the prerequisite, parameter constraint, concurrency requirement, and failure mode. No sentence is redundant.

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?

For a destructive mutation with no output schema and zero schema description coverage, the description supplies the essential operational context: precondition tool, concurrency token, preservation semantics, and atomic failure. The remaining gap is the undocumented text, noteId, and idempotencyKey parameters, which an agent must infer.

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 description coverage is 0%, so the description carries the burden and only partially does so: it defines oldText (exact Markdown body returned by get_section, including nested subsections), headingPath (hierarchy of heading titles), and expectedVersion (current version for conflict detection). It says nothing about text, noteId, or idempotencyKey, leaving half the parameters undocumented anywhere.

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?

States a specific verb ('Replace') and a precisely scoped resource ('the body under a unique hierarchy of heading titles'), and clarifies the preservation boundary (heading and all outside Tiptap nodes). This implicitly separates it from whole-note tools like replace_content, but no sibling is explicitly named, so differentiation is inferred rather than stated.

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?

'Use get_section first' gives an explicit prerequisite and the correct workflow ordering. 'Ambiguous paths fail atomically' signals the failure mode. There is no explicit when-not guidance or named alternative for whole-note replacement, keeping it short of a 5.

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