Skip to main content
Glama

Frontman for WordPress

wp_set_widget_visibility

Destructive

Sets a per-widget WooCommerce visibility rule: all clears the rule; exclude_checkout preserves other routes; cart_only shows only on cart, never checkout. Uses semantic WooCommerce predicates, not URLs. Read back and verify the storefront.

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_id": "<site_id>",
      "widget_id": "<widget_id>",
      "visibility": "<visibility>"
    },
    "name": "wp_set_widget_visibility"
  }
}

Input Schema

NameRequiredDescriptionDefault
site_idYesThe connected site's id returned by list_sites. Call list_sites first; do not use a URL or WordPress post ID.
widget_idYes
visibilityYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Goes beyond the annotations by disclosing mutation consequences: "all" clears the rule and "exclude_checkout" preserves other routes, which tells the agent what state survives the write. The verify-on-storefront instruction usefully flags an externally visible effect consistent with openWorldHint, though it doesn't mention permissions or failure modes.

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?

Three tight sentences, front-loaded with the action and followed by value semantics and the verification step. No filler or restatement of the tool name.

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 destructive three-parameter mutation with no output schema, the description covers the risky semantics of each enum value and the post-write verification step. Minor gaps remain on widget_id meaning and the exact scope of "other routes."

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 only 33%, and the description compensates by defining all three visibility values semantically, including the non-obvious difference between exclude_checkout and cart_only. It also clarifies the rules use semantic predicates rather than URLs, but leaves widget_id entirely unexplained.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ("Sets a per-widget WooCommerce visibility rule") and immediately scopes it with the three supported rule values. It doesn't explicitly distinguish itself from the neighboring wp_update_widget, so an agent must infer that ordinary widget settings go elsewhere.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

Usage is implied through the enum breakdown (when to pick exclude_checkout vs cart_only vs all) and a closing workflow instruction to "Read back and verify the storefront." There is no explicit when-to-use/when-not or named alternative for widget configuration changes.

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.