Skip to main content
Glama

Delete a page

delete_page
Destructive

Deletes a page the way the Pages panel does, in one change: its route (src/routes.tsx on a Xodia template site, the routes file on a React site with routes in code) and its file unless another route uses it, or its .html file on a plain HTML site. The home page stays. The answer lists the files removed and every file that still links to the page (links): fix or remove those links (nav, footer, Link to, a href), then run run_check kind "links". Nothing else is rewritten and no redirect is added: add one for a published page the site no longer needs (skill redirects). The site plan drops the page in the same change. Ask the user before deleting a page they wrote; dryRun says what would go first. Xodia saves every change at once, so there is no discard: to bring a page back, restore_checkpoint the last restore point from list_checkpoints taken before the delete, or the user restores it in Xodia (Project settings, Activity). Pages with a variable part are not deleted here: a collection's item page goes with its collection (CMS tools), any other one you remove in code. Refused with 409 and action ask_agent when Xodia can't change this site's routes safely (route_shape_unsupported, route_unreadable, delete_unsupported) or the HTML site lists its pages in vite.config (html_pages_listed): then remove it in code yourself. A page locked on the workspace's plan (list_pages, get_project lockedPages) is refused with plan_limit and reason page_locked. Where delete_page works, never delete a page by editing routes or files by hand. Saved at once, like every edit in Xodia; pushing to Git and publishing stay the user's. The site plan follows in the same change.

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": {
      "path": "<path>",
      "projectId": "<projectId>"
    },
    "name": "delete_page"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesThe page's address ("/about"), as list_pages shows it
branchNoOptional branch; default the branch the workspace has open
dryRunNoOnly say which files would go and which pages still link to it; deletes nothing
projectIdYesProject id from list_projects

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/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, but the description adds substantial context beyond them: exactly what gets removed (route plus file, file kept if another route uses it), what is deliberately not rewritten (links, redirects, site plan updated in the same change), the absence of undo and the concrete recovery path, and 409 refusal codes with reason fields. The only minor gap is not stating the response envelope explicitly, though it names the key fields removed/linking files.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The content is front-loaded and largely earns its place, but it is a dense wall of text with repetition: 'the site plan follows/drops the page in the same change' and 'saved at once, like every edit in Xodia' both appear twice in near-identical form, and the undo/checkpoint explanation is verbose. It would read better as short labeled sentences or grouped lines.

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 tool with no output schema and four parameters, the description covers what an agent needs: what is deleted, what is preserved, what the answer contains, how to recover, which error cases mean 'do it in code instead', and the plan-limit refusal. Nothing material about calling 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: dryRun is characterized as a preview of what files would go and who still links to the page, and path semantics vary by site type. The branch parameter is not discussed in the description at all, which keeps it from 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?

States a specific verb and resource and immediately distinguishes the three site shapes it handles (Xodia template routes.tsx, React routes-in-code, plain HTML .html), plus the special case of the home page. An agent can tell this apart from delete_file, delete_folder, move_page, and the CMS/collection tools 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?

Explicitly says when not to use it: collection item pages go with their collection via CMS tools, other parameterized pages must be removed in code, and it tells the agent to prefer this over hand-editing routes ('never delete a page by editing routes or files by hand'). It also routes to siblings (run_check kind "links", list_checkpoints/restore_checkpoint, redirects skill) with the conditions that select each.

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