Skip to main content
Glama

xtiles_patch_view_content

Destructive

Edit a page in place by search-and-replace over the markdown that xtiles_get_view_content returns. Workflow: (1) read the page, (2) copy the exact substring to change, (3) send replacements. All replacements apply atomically against the markdown as read; old_str must match exactly once. An empty new_str deletes what old_str matched. AMBIGUITY IS NOT YOURS TO RESOLVE: when the text the user wants changed appears more than once and they did not say which one — or said "all of them" — quote the occurrences back with their surrounding text and ask, before sending anything. Making each old_str unique by adding a neighbouring word satisfies this tool and still edits every occurrence, which is the outcome the user was never asked about. HEADING LEVELS ARE NOT ORDINARY MARKDOWN — read this before editing any heading: ## is the page title and CANNOT be patched at all; ### is a tile heading — patch it to rename a tile; #### and ##### are H1 and H2 heading blocks INSIDE a tile. Never write # or ## in new_str, and never change a ### to fewer hashes: that says "start a new page here", and is rejected. Changing #### to ##### is accepted but does nothing — the stored heading size is kept. ONE old_str MAY COVER SEVERAL BLOCKS, and may cross tile headings — quote the whole stretch you want to change, heading and body together, and the edits are worked out per block. It may also cover only PART of a block; the rest of that block is kept. Reordering works: write the blocks in the new order and they are moved, not rebuilt. Merging two blocks into one line, or splitting one across two lines, works as well. EDIT NORMALLY: paragraphs, bulleted and numbered lists, checklists, tasks (including their assignee), quotes, code blocks, headings, an image caption, and a link label or url. CANNOT be changed through the text (they are kept as they are, so an edit around them is safe): a file block, a divider, and everything markdown does not spell out — a link display style, a table column type or colour. TABLES: quote the rows you are changing, or the whole table. Column types and options are kept. A table cannot become non-table content — delete it and add the new content instead. Collection (database) pages cannot be patched at all — their rows are edited through the collection API. Returns the updated markdown on success; on rejection the error says what to do instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
viewIdYesView ID of the page to edit.
replacementsYesList of search-and-replace operations applied atomically.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYes
contentYes
view_idYes
project_idYes
applied_operations_countYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations declare a destructive, non-idempotent mutation; the description adds far more: replacements apply atomically, `old_str` must match exactly once, empty `new_str` deletes, ambiguity must be surfaced to the user rather than auto-resolved, headings have title/tile/H1/H2 semantics, and certain elements (file blocks, dividers, link styles, column types) are preserved. This is substantial disclosure beyond the structured hints.

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-loads the mechanism and workflow before the detailed rules, and almost every sentence encodes a distinct constraint. It is long and leans on all-caps emphasis, but the complexity of the patch semantics justifies most of the length.

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, non-idempotent patch tool with an output schema, all the critical caveats are covered: matching rules, deletion semantics, heading restrictions, element-level editability, and the return/error contract. Nothing needed to invoke it correctly is missing.

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 baseline is 3, but the description adds real meaning beyond the schema: one `old_str` may span several blocks and cross tile headings, may cover only part of a block with the rest preserved, and supports reordering, merging, and splitting. That materially expands how `old_str`/`new_str` are understood.

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 first sentence states an exact verb and mechanism — 'Edit a page in place by search-and-replace over the markdown' — and names the sibling that produces the input (`xtiles_get_view_content`). An agent can distinguish this from a full-document update or a read 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?

Gives an explicit three-step workflow (read, copy exact substring, send replacements) and clear when-not conditions: collection/database pages cannot be patched at all and must go through the collection API, and tables cannot become non-table content — delete and add instead. Alternatives are named, not inferred.

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