superdoc_format
Change text and paragraph formatting. To format multiple items at once, use superdoc_mutations with format.apply steps instead of calling this tool repeatedly. Use require "all" with a node selector to format every heading or paragraph in one batch. Use this tool for single-item formatting when y...
This record as markdown: /tools/superdoc-mcp/superdoc-format.md
What superdoc_format does on Superdoc
AI agents invoke superdoc_format to trigger actions in Superdoc. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call: builds kicked off, notifications sent, workflows started.
| Parameter | Type | Required | Description |
|---|---|---|---|
in | object | — | Story scope. Defaults to document body when omitted. Use {kind:'story', storyType:'body'} for body, or other storyType values for headers, footers, footnotes, e |
ref | string | — | Handle ref string from a superdoc_search result. Pass the handle.ref value directly (e.g. 'text:eyJ...'). Preferred over 'target' for inline formatting. Only fo |
left | integer | — | Left indentation in twips (1440 = 1 inch). Only for action 'set_indentation'. Omit for other actions. |
line | integer | — | Line spacing value. Meaning depends on lineRule. Must be provided together with lineRule. Only for action 'set_spacing'. Omit for other actions. |
role | object | — | Semantic built-in style intent, resolved to the document authored style identity. Only for action 'set_style'. Omit for other actions. |
after | integer | — | Space after paragraph in twips (20 twips = 1pt). Only for action 'set_spacing'. Omit for other actions. |
force | boolean | — | Bypass confirmation checks. |
right | integer | — | Right indentation in twips (1440 = 1 inch). Only for action 'set_indentation'. Omit for other actions. |
action | string | Yes | The action to perform. One of: inline, set_alignment, set_direction, set_flow_options, set_indentation, set_spacing, set_style, set_style_ref. |
before | integer | — | Space before paragraph in twips (20 twips = 1pt). Only for action 'set_spacing'. Omit for other actions. |
dryRun | boolean | — | Preview the result without applying changes. |
inline | object | — | Inline formatting properties to apply. Set a property to apply it, use null to clear it. Example: {bold: true, italic: true} or {bold: null} to remove bold. Onl |
Parameters from the server's own tool schema.
Why superdoc_format is rated High
superdoc_format triggers real processes with real consequences. An agent gone sideways doesn't fire it once. It starts dozens of builds, sends mass notifications, or burns through compute before anyone looks up.
Risk signalsHigh parameter count (72 properties) · Bulk/mass operation — affects multiple targets
Attacks that exploit this kind of access
The rule that runs superdoc_format safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Superdoc, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For superdoc_format, this is the rule to start with:
superdoc_format stays usable, but rate-capped: a runaway agent can't fire it dozens of times a minute. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Superdoc, apply this rule, and every superdoc_format call is checked against it from then on.
Questions about superdoc_format
Change text and paragraph formatting. To format multiple items at once, use superdoc_mutations with format.apply steps instead of calling this tool repeatedly. Use require "all" with a node selector to format every heading or paragraph in one batch. Use this tool for single-item formatting when you have a valid ref or nodeId. Action "inline" applies character formatting (bold, italic, underline, color, fontSize, fontFamily, highlight, strike, vertAlign) to a text range via "ref". Action "set_style" applies a named paragraph style by styleId (get available styles from superdoc_get_content info). Actions "set_alignment", "set_indentation", "set_spacing", "set_direction", and "set_flow_options" change paragraph-level properties and require a block target: {kind:"block", nodeType:"paragraph", nodeId:"<nodeId>"}, NOT a ref. Use "set_flow_options" with pageBreakBefore:true to start a paragraph on a new page. Supports "dryRun" and "changeMode: tracked" for inline formatting. Paragraph-level actions do NOT support tracked changes. Do NOT use a search ref for paragraph-level actions; they require a block target with nodeId. Do NOT use {kind:"block", start:{kind:"nodeEdge",...}} or selection-like structures for paragraph actions. ONLY {kind:"block", nodeType, nodeId} is accepted. Do NOT issue multiple superdoc_format calls in parallel; each call invalidates refs for subsequent calls. EXAMPLES: 1. {"action":"inline","ref":"<handle.ref>","inline":{"bold":true}} 2. {"action":"inline","ref":"<create.handle.ref>","inline":{"fontFamily":"Calibri","fontSize":11,"color":"#000000","bold":false}} 3. {"action":"set_alignment","target":{"kind":"block","nodeType":"paragraph","nodeId":"<nodeId>"},"alignment":"center"} 4. {"action":"set_flow_options","target":{"kind":"block","nodeType":"paragraph","nodeId":"<nodeId>"},"pageBreakBefore":true} 5. {"action":"set_spacing","target":{"kind":"block","nodeType":"paragraph","nodeId":"<nodeId>"},"lineSpacing":{"rule":"auto","value":1.5}}. It is categorised as a Execute tool in the Superdoc MCP Server, which means it can trigger actions or run processes. Use rate limits and argument validation.
superdoc_format accepts 12 parameters: in, ref, left, line, role, after, force, right, action, before, dryRun, inline. Required: action. The full parameter table on this page comes from the server's own tool schema.
Register the Superdoc MCP server in PolicyLayer and add a rule for superdoc_format: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Superdoc. Nothing to install.
superdoc_format is a Execute tool with high risk. Execute tools should be rate-limited and have argument validation enabled.
Yes. Add a rate_limit block to the superdoc_format rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for superdoc_format. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
superdoc_format is provided by the Superdoc MCP server (@superdoc/mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Superdoc, and thousands of servers like it.
Across the catalogue