Skip to main content
Glama

Frontman for WordPress

wp_set_post_language

Destructive

Assigns a configured Polylang language to an existing editable post. Refuses to change the language of a post already linked to translations. Does not link posts as translations; concurrent changes elsewhere can race with this best-effort linked-post check.

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>",
      "id": "<id>",
      "lang": "<lang>"
    },
    "name": "wp_set_post_language"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYes
langYesConfigured Polylang language slug.
site_idYesThe connected site's id returned by list_sites. Call list_sites first; do not use a URL or WordPress post ID.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already disclose destructive=true, idempotent=false, and openWorld=true, so the safety profile is known. The description adds real behavior beyond that: a precondition failure mode (linked posts are refused) and a disclosed concurrency race in the best-effort check. It does not explain reversibility or what state change the destructive hint refers to.

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 tightly packed sentences: purpose first, then the refusal rule, then the non-goal and race caveat. Every clause carries distinct information and nothing is repeated.

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 three-parameter mutation tool with annotations and no output schema, the description covers purpose, refusal semantics, scope limits, and concurrency risk. The main residual gap is that, absent an output schema, it never indicates what a successful call returns or how refusal is signaled.

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 67%, with site_id and lang well documented in the schema and `id` undocumented there. The description partially compensates, clarifying that `id` targets an 'existing editable post' and that `lang` must be a 'configured' Polylang language, but it adds nothing about site_id and gives no format or validation detail.

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?

The description states a specific verb+resource: assigning a configured Polylang language to an existing editable post. It is distinguishable from the read counterpart (wp_read_post_language) by the verb 'assigns', though no sibling is named explicitly.

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?

It gives a clear negative condition ('Refuses to change the language of a post already linked to translations') and a scope exclusion ('Does not link posts as translations'), which implies a different tool handles linking. It stops short of naming that alternative tool, so the agent must infer it.

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.