Skip to main content
Glama

legal_add_section

Append a heading and HTML body section to a legal document, creating it when empty and preserving the section across regenerations. Returns the resolved slug used by shortcodes.

Instructions

Append a section to a legal document (creates the document if it is still empty). On a generated document the section is kept across regenerations. Returns { slug }, the resolved slug, which is what shortcodes address.

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>",
      "heading": "<heading>",
      "body": "<body>"
    },
    "name": "legal_add_section"
  }
}

Input Schema

NameRequiredDescriptionDefault
docYesDocument type
bodyYesHTML body, filtered through wp_kses_post
siteYesSite id (see list_sites)
slugNoStable slug; derived from the heading when omitted, de-duplicated against existing sections
levelNoHeading level, 2 (H2) or 3 (H3); default 2
headingYesSection heading (plain text)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv3.14.0
    • changedInput schema / properties / body / description
      Previous value: -"HTML body"New value: +"HTML body, filtered through wp_kses_post"
    • addedInput schema / properties / heading / description
      Added value: +"Section heading (plain text)"
    • changedInput schema / properties / level / description
      Previous value: -"2 or 3, default 2"New 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"
    • addedInput schema / properties / slug / description
      Added value: +"Stable slug; derived from the heading when omitted, de-duplicated against existing sections"
  2. Addedv3.4.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose two real behavioral traits a schema cannot: the document is auto-created when empty, and the section survives later regenerations. It does not mention permission requirements, ordering/position of the appended section, or failure modes, leaving some gaps.

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 short sentences, front-loaded with the action and immediately followed by the non-obvious creation and persistence behavior. Nothing is redundant or padded.

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?

There is no output schema, and the description usefully states the return shape ({ slug }) and its meaning, which is exactly what would otherwise be missing. For a mutation tool with no annotations, it could still say more about permissions or ordering, but the core call-relevant facts are present.

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 description coverage is 100%, so the schema already documents doc, site, heading, body, slug and level, including slug derivation and de-duplication. The description's only added semantic is that the resolved slug is the identifier shortcodes address, which explains the return value more than the input parameters.

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 uses a specific verb+resource pair ("Append a section to a legal document") and adds the non-obvious side effect of creating the document when empty. It clearly separates this from update/delete siblings by nature of "append", though it never names those siblings explicitly.

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: call this to add a new section rather than modify one, and the empty-document case is spelled out. However, there is no explicit when-not or pointer to legal_update_section/legal_delete_section for the adjacent operations, so the agent must infer the routing.

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