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. THE PAGE DESCRIPTION is not part of what this tool matches or returns: the <description> tag a page read shows under the ## heading is left out here, so keep it out of old_str, and do not take its absence from the result as the description being gone. Change the description with xtiles_set_page_description. Returns the updated markdown on success; on rejection the error says what to do instead.

Input Schema

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

Output 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 destructiveHint=true and idempotentHint=false, but the description goes far beyond them: atomicity of all replacements, the exactly-once matching requirement, empty new_str as deletion, heading-level rules that cause rejection, what is silently preserved (file blocks, dividers, table column types, styles), and the fact that the page description is excluded from matching. No contradiction with the destructive annotation.

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?

It is long and densely capitalized, but the core workflow and the primary constraint (old_str must match exactly once) are front-loaded before the edge cases. For a mutation tool with such non-obvious semantics each block of text carries weight, though the volume is close to the limit of what an agent can absorb.

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?

Output schema exists, yet the description still notes the success return (updated markdown) and that rejections explain what to do instead. For a complex, destructive in-place edit with unusual heading and table rules, the coverage appears complete: workflow, failure modes, preserved content, and boundaries with sibling tools are all addressed.

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 100% schema coverage the baseline is 3, and the description adds real meaning the schema lacks: one old_str may span several blocks or cross tile headings, may cover only part of a block, and can express reordering, merging, or splitting. It also reinforces the exact-match and empty-deletion semantics of both parameters.

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?

It states a specific verb and resource ('Edit a page in place by search-and-replace over the markdown') and names the sibling whose output it operates on (xtiles_get_view_content). It also explicitly separates itself from xtiles_set_page_description and the collection API, so an agent can route correctly 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 Guidelines5/5

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

It gives an explicit workflow (read, copy the exact substring, send replacements), states the ambiguity-handling rule, and names alternatives for adjacent cases: xtiles_set_page_description for the description, the collection API for database pages, and delete+add for a table that must become non-table content. When-to-use and when-not-to-use are both covered.

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