Skip to main content
Glama

WordPress: Wp theme file delete

wordpress_specialist_wp_theme_file_delete
Destructive

Delete a file from a WordPress theme using site, theme slug, and path, while blocking removal of the active theme's style.css to prevent front-end breakage.

Instructions

[UNIFIED] Delete a file inside a theme. Path resolution is identical to wp_theme_file_read (S-16). Refuses to delete style.css of the active theme — that would break the front-end. Requires Airano MCP Bridge v2.14.0+ and edit_themes.

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": {
      "site": "<site>",
      "theme_slug": "<theme_slug>",
      "path": "<path>"
    },
    "name": "wordpress_specialist_wp_theme_file_delete"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
siteYes
theme_slugYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.14.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and non-idempotent, so the safety profile is known; the description adds real value on top with an explicit guard rail that protects the front-end and the required bridge version and capability. It leaves out irreversibility/trash behavior and whether a nonexistent path errors or no-ops, which would matter for a destructive call.

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

Conciseness5/5

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

Four compact sentences, front-loaded with the action, then the path-resolution note, the guard rail, and the prerequisites. Nothing is filler apart from the minor "[UNIFIED]" tag.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers the destructive guard rail and prereqs, which is most of what an agent needs for a mutation with no output schema. However, it is silent on confirmation/return behavior and on how the path-resolution reference applies in practice, leaving gaps for a permanent-delete operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and all three parameters are required, so the description must carry the burden. It clarifies only `path` indirectly by pointing at wp_theme_file_read's resolution rules, while `site` and `theme_slug` are never explained (e.g. whether theme_slug must be the active theme, slug vs directory name).

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 ("Delete a file inside a theme") and scopes it to theme files, which cleanly separates it from sibling file_read, file_write, file_patch and wp_theme_delete (whole theme). An agent can pick this 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 Guidelines4/5

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

Gives a clear when-not case (refuses to delete style.css of the active theme) and names prerequisites (Bridge v2.14.0+, edit_themes capability). It does not route the agent to an alternative when the target is style.css (e.g. patch instead), so it stops short of full alternative guidance.

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

Deploy Server

Other Tools