Skip to main content
Glama

edit_shape_paragraphs

Replaces a shape's paragraph text body in PowerPoint using raw OOXML while preserving body properties and list styles. Read the XML first, modify it, then write it back to update slide text.

Instructions

Replace paragraph content of a shape with raw OOXML <a:p> XML. Preserves <a:bodyPr> and <a:lstStyle>. Use read_shape_paragraphs first to get the current XML, modify it (using /pptx skill knowledge), then write it back. The slide is exported, modified server-side, and reimported — data never enters Claude's context. NOTE: the reimport deletes and reinserts the slide, but the view is restored to the edited slide afterwards. For text-only changes, execute_officejs still avoids the reimport entirely (in place via shape.textFrame.textRange).

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": {
      "slide": "<slide>",
      "shapeId": "<shapeId>",
      "xml": "<xml>"
    },
    "name": "edit_shape_paragraphs"
  }
}

Input Schema

NameRequiredDescriptionDefault
xmlYesThe <a:p> paragraph XML to replace the current text body content with
slideYesSlide number, 1-based (slide 1 = first slide)
shapeIdYesShape ID from inspect_slide results
presentationIdNoTarget presentation ID from list_presentations. Optional when only one presentation is connected.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.7.1
    • addedInput schema / properties / slide
      Added value: +{
      +  "description": "Slide number, 1-based (slide 1 = first slide)",
      +  "maximum": 9007199254740991,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • removedInput schema / properties / slideIndex
      Removed value: -{
      -  "description": "Zero-based slide index",
      -  "maximum": 9007199254740991,
      -  "minimum": 0,
      -  "type": "integer"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "slideIndex",
      -  "shapeId",
      -  "xml"
      -]New value: +[
      +  "slide",
      +  "shapeId",
      +  "xml"
      +]
  2. First observedv0.6.0

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full behavioral burden and does: it discloses the server-side export/modify/reimport pipeline, that data never enters Claude's context, and the destructive side effect — 'the reimport deletes and reinserts the slide' — with the mitigation that the view is restored. It also states what is preserved (<a:bodyPr> and <a:lstStyle>), which is exactly the kind of fidelity detail an agent cannot infer.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core action and the prerequisite immediately after, with no filler sentences. Slightly dense — the preservation note, the architecture note, and the execute_officejs routing tip are packed with parentheticals — but each clause carries independent decision-relevant information.

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?

Covers the workflow, side effects, and preservation rules for a mutation tool with no annotations and no output schema. It does not say what success looks like or how invalid <a:p> XML is reported, a minor gap given the high-risk raw-XML input.

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 is 3; the description still adds meaning by specifying that the xml parameter must be <a:p> paragraph XML and must be derived from read_shape_paragraphs output interpreted with /pptx skill knowledge. That constrains how to construct the highest-risk parameter beyond the schema's 'string' typing.

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?

States a specific verb and resource ('Replace paragraph content of a shape') plus the exact payload format ('raw OOXML <a:p> XML'), and names the sibling it differs from (set_paragraph_text via the execute_officejs mention, read_shape_paragraphs as the prerequisite). An agent can tell this apart from set_paragraph_text and edit_slide_xml without opening either 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?

Explicitly prescribes the workflow ('Use read_shape_paragraphs first to get the current XML, modify it ... then write it back') and gives an explicit alternative with its selection condition ('For text-only changes, execute_officejs still avoids the reimport entirely'). When-to-use and when-to-use-something-else are both stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.