Skip to main content
Glama
Replaced by its MCP Registry listing

This endpoint is listed in the official MCP Registry as fynk MCP. If you published it, claim ownership there.

Replace template content

replace-template-content
Destructive

Replaces the ENTIRE content of a draft template from an HTML string in a single destructive write.

Use this tool ONLY when:

  • You are authoring the initial content of an empty, freshly created template (e.g. after create-template-from-scratch), or

  • The user has explicitly asked to discard the current content and rewrite the whole template.

This is the right tool for laying down a large body of content at once (e.g. a whole NDA). It writes the whole template body in one go; there is no way to edit an individual node.

Do NOT use this tool to edit a template that already has content. Overwriting throws the existing content away. If the template already has content, this tool refuses to run unless you pass replace_existing_content=true to confirm the destructive overwrite. Read the current content with get-template-html first, so anything worth keeping can be carried over into the new HTML.

Overwriting an existing body cannot be undone, so ask the user to confirm it before passing replace_existing_content=true.

Only allowed on unpublished (draft) templates with a prosemirror_data content type.

Create the template's parties, signature blocks and dynamic fields before this call, so the body can reference their existing records by ref_uuid. Key HTML forms:

  • Dynamic field:

  • Party:

  • Signatures:

  • Numbered clause: Clause text

  • Cross-reference: (set a matching UUID you generate as data-uuid on the target ordered list node in the same call)

Clause numbers are always computed by fynk: text starting with a clause marker ("1.", "(a)", "§ 5") is rejected. Headings go up to . No two nodes may share a data-uuid (except , which repeats the target clause's uuid). Copy images, dynamic tables and signing vote blocks over exactly as get-template-html returned them; leaving one out removes it.

The response carries a warnings list alongside the stored HTML: what the template still lacks to work as a template. The write succeeded either way, but act on them before reporting the template as finished.

Read the fynk://articles/working-with-template-content resource before your first call writing template content in a conversation: it covers nested and non-decimal clause numbering (1.1, (a), I., § 1), numbered sections vs headings, multi-paragraph clauses and alignment.

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": {
      "template_uuid": "<template_uuid>",
      "html": "<html>"
    },
    "name": "replace-template-content"
  }
}

Input Schema

NameRequiredDescriptionDefault
htmlYesFull HTML of the template content, in the format described by the fynk://articles/working-with-template-content resource. Replaces the entire document
template_uuidYesUUID of the unpublished template whose content should be replaced
replace_existing_contentNoRequired confirmation (true) to overwrite a template that already has content. Omit (or false) for empty templates. Defaults to false.

Output Schema

NameRequiredDescriptionDefault
htmlNoThe stored template content serialised back to HTML. Addressable nodes carry a data-uuid attribute usable in subsequent operations.
warningsNoAdvisory notes on what the stored template is still missing to work as a template: dynamic fields or signature blocks that exist but are placed nowhere, a body naming its parties as fixed text. The write succeeded; act on these before reporting the template as finished.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / html / description
      Previous value: -"Full HTML of the template content. Use the same data-* attribute conventions as get-template-html. Replaces the entire document"New value: +"Full HTML of the template content, in the format described by the fynk://articles/working-with-template-content resource. Replaces the entire document"
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, but the description goes well beyond them: it discloses the refusal behavior unless replace_existing_content=true, that overwrite cannot be undone, the draft-only and prosemirror_data content-type restriction, the data-uuid uniqueness rule, rejection of hard-coded clause markers, that omitted images/dynamic tables/signing blocks are removed, and that a warnings list is returned even on success.

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 action and destructive nature, then organized under clear conditional headings and a compact HTML-forms list. It runs long and repeats the overwrite-is-destructive warning in two places, but nearly every sentence carries operational constraint rather than filler.

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 high-risk destructive write with an output schema present, the description covers preconditions, ordering dependencies, HTML node forms, validation rejection rules, confirmation gating, and the warnings return surface. Nothing an agent needs to call it safely appears missing, and it points to the working-with-template-content resource for deeper formatting detail.

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?

Schema coverage is 100%, so the parameters are documented structurally, yet the description adds real meaning: it explains the exact confirmation semantics of replace_existing_content and the ref_uuid/data-uuid conventions the html string must contain (dynamic fields, parties, signature blocks, ordered lists, cross-references). It stops short of mapping each parameter individually, which keeps it below a 5.

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?

The opening sentence states a specific verb and resource ('Replaces the ENTIRE content of a draft template from an HTML string') plus the write mode ('single destructive write'). It explicitly separates itself from sibling operations by naming create-template-from-scratch and get-template-html, and by ruling out node-level editing.

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 an explicit 'Use this tool ONLY when' list of two conditions and a 'Do NOT use this tool to edit a template that already has content' exclusion, with the precise alternative (get-template-html first, carry content over). It also states preconditions (create parties/signature blocks/dynamic fields first) and a user-confirmation step.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources