Skip to main content
Glama

legal_update_section

Update a legal document section's heading or HTML body while keeping its slug stable, so existing shortcodes on the page continue to work after edits.

Instructions

Update a section. The slug is never rewritten, so shortcodes already placed on a page keep working when a heading is renamed.

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>",
      "doc": "<doc>",
      "slug": "<slug>"
    },
    "name": "legal_update_section"
  }
}

Input Schema

NameRequiredDescriptionDefault
docYesDocument type
bodyNoNew HTML body, filtered through wp_kses_post
siteYesSite id (see list_sites)
slugYesSection slug
levelNoHeading level, 2 (H2) or 3 (H3); default 2
headingNoNew heading (plain text)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv3.14.0
    • addedInput schema / properties / body / description
      Added value: +"New HTML body, filtered through wp_kses_post"
    • addedInput schema / properties / heading / description
      Added value: +"New heading (plain text)"
    • addedInput schema / properties / level / description
      Added value: +"Heading level, 2 (H2) or 3 (H3); default 2"
    • addedInput schema / properties / level / maximum
      Added value: +3
    • addedInput schema / properties / level / minimum
      Added value: +2
    • changedInput schema / properties / level / type
      Previous value: -"number"New value: +"integer"
  2. Addedv3.4.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does disclose one genuinely non-obvious mutation trait — the slug is immutable so existing shortcodes keep resolving when a heading is renamed — which is real added value. But it omits permissions/auth needs, whether omitted fields are cleared or preserved, and whether body replaces or merges, all critical for a write operation.

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?

Two short sentences with zero filler, the action stated first and the non-obvious slug constraint given immediately after. Nothing is padded or redundant.

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?

For a six-parameter mutation tool with no annotations and no output schema, the description should clarify partial versus full update semantics and any permission requirements; it covers only slug stability. What it does say is accurate and useful, but the mutation contract is under-specified.

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 baseline would be 3, and the description goes beyond it by explaining the semantics of the slug parameter: it is a stable identifier that is never rewritten on update. The other five parameters, including the partial-update behavior of heading/body/level, are left entirely to the schema.

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 ("Update a section") and adds a meaningful scope note about slug stability. It is distinguishable from legal_add_section and legal_delete_section by implication, but it never says explicitly that it modifies an existing section rather than creating one.

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

Usage Guidelines2/5

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

No guidance on when to choose this over legal_add_section or legal_put_document, and no prerequisites stated (site id resolution via list_sites, whether the section must already exist). The one behavioral note given is about slug behavior, not about tool selection.

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