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. If xtiles_update_content is in your tool list, edit with it instead — read the page with format: "tags" first; use this tool only when it is not. 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 update_description in xtiles_update_content if it is in your tool list, otherwise with xtiles_set_page_description. Returns the updated markdown on success; on rejection the error says what to do instead.

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": {
      "viewId": "<viewId>",
      "replacements": "<replacements>"
    },
    "name": "xtiles_patch_view_content"
  }
}

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?

Goes well beyond the destructive/atomic annotations: replacements apply atomically against the markdown as read, old_str must match exactly once, rejection returns an error suggesting an alternative, and the ambiguity policy forbids silently disambiguating. It also enumerates what is preserved (file blocks, dividers, link styles, table column types) and the heading-level rules, which the annotations cannot convey.

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 alternative-tool routing and the three-step workflow before the detailed rules, and every section carries operational content. It is long and leans on capitalized warnings, so it is dense rather than wasteful, but a tighter structure with headings would read better.

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?

With an output schema present, the description need not explain return values, and it still notes the updated markdown is returned on success. For a destructive, high-risk edit tool, the coverage of matching rules, heading semantics, unsupported content, and fallbacks is thorough.

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 semantics: an old_str may span several blocks and cross tile headings, may cover only part of a block, empty new_str deletes, and reordering is expressed by writing blocks in new order. This meaning is not derivable from the schema alone.

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 ('edit a page in place by search-and-replace over the markdown') and explicitly distinguishes itself from the sibling xtiles_update_content, telling the agent to prefer that tool when available. An agent can identify the operation without opening the 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?

Provides explicit routing: use xtiles_update_content instead if present, read with format: "tags" first, and fall back to this tool only when it is absent. It also names the right tool for page descriptions (update_description / xtiles_set_page_description) and states collection pages cannot be patched at all.

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