Skip to main content
Glama

set_textbox_text

Replace the text of a specified text box in a Word document while preserving its first paragraph style and run formatting. Supports multi-paragraph text with \n and refuses non-text boxes.

Instructions

Replace the text of one text box (box_index from get_textbox_text). Keeps the first paragraph's style and first run's formatting; '\n' splits into multiple paragraphs; the mc:Fallback compatibility copy is rewritten to match. Boxes holding non-text content (nested tables, images) are refused rather than flattened. Auto-backup: prev/anchor slots in .ks4w-backups (backup=False skips rotation only); atomic validated save. Refuses documents open in Word.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes
backupNo
box_indexYes
file_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations, the description carries the full burden and covers behavioral traits in detail: style/run preservation, newline splitting, mc:Fallback rewriting, refusal of non-text content, backup rotation semantics, atomic validated save, and refusal when the document is open in Word.

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?

The main action is front-loaded and every subsequent sentence adds a distinct operational constraint or behavior. The description is dense but no sentence is filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity, the description covers selection, formatting behavior, content restrictions, backup behavior, save semantics, and failure conditions. The output schema can handle return-value details, so nothing essential for correct invocation is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, but the description compensates: text semantics are defined ('\n' splits into paragraphs), backup behavior is clarified (backup=False skips rotation only), and box_index is sourced from get_textbox_text. file_path is left to its self-explanatory name.

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?

The description opens with a specific verb and object: 'Replace the text of one text box.' It further clarifies the target resource by referencing 'box_index from get_textbox_text', which distinguishes this from paragraph-level tools like replace_paragraph_text.

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?

The prerequisite is explicit: the caller needs a box_index from get_textbox_text. The description also gives clear usage conditions for special content and Word-open states, though it does not explicitly name alternative tools for when not to use it.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nometalalchemist/KitchenSink4Word'

If you have feedback or need assistance with the MCP directory API, please join our Discord server