Skip to main content
Glama

Apply a blueprint

wp_blueprint_apply
Destructive

Apply the applicable parts of a blueprint to this site — the write side of wp_blueprint_diff, which returns the same plan read-only together with plan_hash. Dry run by default: without apply=true the answer is the plan and nothing is written. It adds what is missing; only with update_existing does it change what exists here but differs: settings, terms and pages are overwritten, and an existing menu gets the items it lacks, where an item whose label or parent differs is added beside the old one and notes say so. It never deletes, deactivates or removes anything, and structure here that the blueprint lacks is left alone. A repeated run writes only what earlier runs left undone (max_writes reached, a failed row, updates without update_existing); what they applied shows as unchanged. Applied: settings (allow-listed fields; each write records an undo point where one can be kept), terms, pages (title, slug, status and parent only; a row carrying content, post_content or body is refused, any other field this build does not write is named under "unwritten_fields" on its row and counted as "not_written", and where this site fills post_content for new posts the result says so under "notes") and menus with their items and theme locations. Advisory only, never applied: post types and taxonomies (they live in plugin or theme code), widgets, plugin activation and theme switches; menu_order and page templates are compared but not written. Every write goes through the ordinary tools, so their permissions, the token's scope and the per-tool switches apply; a section whose tools are off is reported as blocked. With on_error "stop" the first failed write ends the run, and writes made before it stay. Forwarded by AlphaBridge Connect to the one site this connection reaches.

Input Schema

NameRequiredDescriptionDefault
applyNotrue writes. false (default): dry run, nothing is written.
sessionNoA committed upload session id holding the JSON.
on_errorNo"stop" (default): the first failed write ends the run; "continue": the remaining rows are still written. Writes already made stay either way.
sectionsYesSections to apply, required: any of settings, terms, pages and menus.
blueprintNoThe blueprint JSON, inline. Exactly one of blueprint/session.
max_writesNoHard cap on writes in one run, 1-2000. Default 200.
expect_hashNoplan_hash from wp_blueprint_diff; the apply refuses if the state changed since.
allow_partialNotrue accepts sections the export marked truncated. Default false: such sections are refused.
update_existingNotrue also performs "update" rows — things that exist here but differ. Default false: only what is missing is created. Settings always exist, so a settings apply writes nothing without this flag, and the answer says so.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • changedInput schema / properties / allow_partial / description
      Previous value: -"Accept truncated sections. Default false."New value: +"true accepts sections the export marked truncated. Default false: such sections are refused."
    • changedInput schema / properties / apply / description
      Previous value: -"false (default) = dry run, nothing is written."New value: +"true writes. false (default): dry run, nothing is written."
    • changedInput schema / properties / on_error / description
      Previous value: -"\"stop\" (default) or \"continue\"."New value: +"\"stop\" (default): the first failed write ends the run; \"continue\": the remaining rows are still written. Writes already made stay either way."
    • changedInput schema / properties / sections / description
      Previous value: -"REQUIRED: name what you want applied (settings|terms|pages|menus)."New value: +"Sections to apply, required: any of settings, terms, pages and menus."
    • changedInput schema / properties / update_existing / description
      Previous value: -"Also perform \"update\" rows — things that exist here but differ. Default false: only create what is missing. Note that settings ALWAYS exist, so a settings apply is always an update and does nothing without this flag; the answer tells you when that happened."New value: +"true also performs \"update\" rows — things that exist here but differ. Default false: only what is missing is created. Settings always exist, so a settings apply writes nothing without this flag, and the answer says so."
  2. Added

TDQS

A4.7/5.0
Behavior5/5

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

Far beyond the annotations: it names exactly what gets overwritten (settings, terms, pages), how menus merge (differing label/parent adds beside the old item and is noted), what is never touched (deletion, deactivation, deactivated structure not in the blueprint), which sections are advisory-only and reported blocked, that writes go through ordinary tools so their permissions and token scope apply, and that on_error 'stop' keeps writes already made. The 'never deletes' wording is reconciled with destructiveHint=true by the explicit overwrite list, so this is clarification rather than contradiction.

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?

Purpose and the dry-run default are correctly front-loaded, and nearly every clause carries real information (unwritten_fields, not_written, notes). However it is delivered as one dense paragraph of semicolon-chained clauses that forces re-reading to separate refusals from outcomes, so structure costs it more than the length does.

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 9-parameter, nested-object, destructive tool with no output schema, the description covers the failure modes (refused rows, truncated sections, blocked sections, max_writes, on_error), the reporting keys an agent will see back (unwritten_fields, not_written, notes, unchanged), and the permission boundary. Nothing needed to call 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; the description earns an extra point by explaining consequences the schema does not, notably that settings always exist so a settings apply writes nothing without update_existing, and that max_writes exhaustion explains why a re-run still has work. It says nothing about session, expect_hash or allow_partial beyond what the schema already states, which caps it short of 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?

The first clause gives a specific verb and resource ('apply the applicable parts of a blueprint to this site') and immediately positions itself relative to a named sibling ('the write side of wp_blueprint_diff'). An agent can distinguish it from wp_blueprint_diff, wp_blueprint_export and the individual wp_create_*/wp_update_* tools 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 states the default mode (dry run without apply=true), when to escalate to writes (update_existing), and explicitly routes the read-only planning case to wp_blueprint_diff via the shared plan_hash. It also explains the repeat-run case ('writes only what earlier runs left undone') so an agent knows re-invocation is safe rather than duplicative.

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