Skip to main content
Glama

wp_apply_style

DestructiveIdempotent

Apply ONE style to MANY elements in a single call. Use this whenever several elements should look the same — the cards in a row, every kicker, all the headings in a section. Styling them one at a time is how six cards end up with three different accent colours: each edit is a fresh chance to typo a hex or forget a radius, and nothing ties them together afterwards. One payload cannot drift from itself. Same style vocabulary as wp_patch_page (wp_style_keys lists it), same per-element verification: the response reports effective for each node, so you can see if any element ignored the write. dry_run previews.

Input Schema

NameRequiredDescriptionDefault
styleYesJSON style object applied to every id, e.g. {"bg":"#FFFFFF","radius":16,"padding":28}. Keys from wp_style_keys.
dry_runNoPreview the diff without writing.
post_idYesPage/post numeric id
site_idYesWordPress site id
node_idsYesJSON array of element ids, e.g. ["a1b2c3","d4e5f6"] (from wp_get_page outline).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already cover the safety profile (destructiveHint=true, idempotentHint=true, openWorldHint=true). The description adds value beyond that: it discloses the per-element verification mechanism (response reports `effective` per node) and the dry_run preview path, which is useful given there is no output schema. It does not explicitly warn that existing per-element styles are overwritten, which would be the ideal addition for a destructive tool.

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-loaded with the core action in sentence one, followed by rationale and verification detail. The 'six cards / three accent colours' illustration is motivational rather than strictly informational, adding mild length, but the sentences generally earn their place.

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

Completeness4/5

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

For a batch destructive mutation with no output schema, the description covers when to use it, the shared vocabulary, dry-run previewing, and the verification signal returned. The main omission is an explicit note that existing styles on the target nodes are replaced, though the destructiveHint annotation partially covers this.

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

Parameters3/5

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

Schema coverage is 100%, so the schema already documents every parameter including examples for style and node_ids. The description reinforces the wp_style_keys vocabulary source but adds no format or syntax detail the schema lacks. Baseline 3 is appropriate.

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, resource, and cardinality constraint ('Apply ONE style to MANY elements in a single call'), which immediately separates it from single-element siblings like wp_patch_page. Concrete examples (cards in a row, every kicker) make the scope unambiguous.

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?

Explicit when-to-use trigger ('whenever several elements should look the same') plus a named anti-pattern (styling one at a time) and concrete drift/typo rationale. It also routes the agent to sibling resources (wp_style_keys for vocabulary, wp_get_page for outlines) and mentions dry_run for preview.

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