Skip to main content
Glama
InDesign MCP

InDesign MCP

indesign_uxp_set_text_frame

DestructiveIdempotent

Replace the entire contents of a specific InDesign text frame via UXP by supplying its document and frame IDs. Use this to update frame text programmatically while the frame is unlocked.

Instructions

Replaces the entire contents of one explicitly identified text frame through UXP. The frame must not be locked; this modifies the document and can affect its saved state. Use IDs returned by inspection. After a timeout, the panel may still have completed the write; inspect the frame before retrying and do not retry blindly.

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": {
      "document_id": "<document_id>",
      "text_frame_id": "<text_frame_id>",
      "text": "<text>"
    },
    "name": "indesign_uxp_set_text_frame"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesText content; maximum 50,000 characters
timeout_msNoOptional wait in milliseconds; defaults to 30,000 and is limited to 1,000–120,000
document_idYesPositive numeric Document.id from the inspection result
text_frame_idYesPositive numeric TextFrame.id from the inspection result

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.3/5.0
Behavior5/5

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

Goes well beyond the supplied annotations by disclosing a precondition (frame must not be locked), a side effect (modifies the document and can affect its saved state), and the crucial timeout ambiguity where the write may have landed anyway. This is exactly the context annotations cannot express, and it is consistent with destructiveHint=true and idempotentHint=true (whole-content replacement is repeat-safe).

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?

Four tight sentences with the operation stated first, followed by preconditions, then the timeout caveat in priority order. Slight overlap between 'Use IDs returned by inspection' and the schema's own wording on document_id/text_frame_id, but nothing is wasted overall.

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 destructive mutation with no output schema, it covers preconditions, side effects, and retry semantics well. The remaining gap is the return value: with no output schema present, the description could say what a successful call yields (e.g., updated frame state) so the agent knows what to verify after the timeout case.

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 IDs, text length cap, and timeout range/default are already documented in structured fields. The description only echoes that IDs come from inspection, adding no new meaning about parameter behavior or interactions. Baseline 3 applies.

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 precise verb and resource ('Replaces the entire contents of one explicitly identified text frame through UXP'), scoping it to a single frame so it is distinguishable from create_text_frame or read_text_frame siblings. The word 'entire' also clarifies that existing content is overwritten rather than appended or merged.

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?

Gives concrete preconditions ('frame must not be locked', 'Use IDs returned by inspection') and explicit retry guidance after a timeout ('inspect the frame before retrying and do not retry blindly'). It does not name an alternative tool or state when to prefer a different write path, so it falls short of full when/when-not coverage.

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