Skip to main content
Glama

Replace a pad

set_document
Destructive

Replace the entire content of a pad. For non-empty pads, call once to receive a confirmation token, then call again with that token to apply the change.

Instructions

Replaces the entire content of a pad. Replacing a non-empty pad requires confirmation: call once to receive a token, then again with that token. For targeted changes prefer replace_in_document, which leaves concurrent edits elsewhere in the pad intact.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesId of the pad, the part after # in its URL
textYesPlain text content (up to 256 KiB, the Rustpad document limit)
confirm_tokenNoConfirmation token from a previous call of this tool with the same arguments. Omit on the first call.
Behavior5/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false. The description adds crucial context beyond annotations: it explains the confirmation token mechanism for non-empty pads, including the two-call workflow. This fully discloses the tool's behavioral traits for mutation.

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 concise sentences with no fluff. The first sentence states the core purpose. The second explains the critical workflow. The third provides usage guidance. Every sentence earns its place.

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?

Despite having no output schema, the description is complete given the tool's complexity and rich annotations. It covers the purpose, workflow, and alternatives. The required vs. optional parameters are clear from the schema, and the confirmation token mechanism is fully explained.

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 all three parameters. The description does not add new meaning about individual parameters beyond stating the confirmation token workflow, which is already implied by the schema's description of the confirm_token field. Baseline 3 is appropriate.

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 uses a specific verb ('Replaces') and explicitly names the resource ('entire content of a pad'). It clearly distinguishes from the sibling 'replace_in_document' by highlighting the scope difference (whole content vs. targeted changes).

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?

The description provides clear guidance on when to use this tool (replacing entire content) vs. the alternative 'replace_in_document' (targeted changes, preserves concurrent edits). It also explains the confirmation workflow for non-empty pads, enabling correct agent reasoning.

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/ni-c/rustpad-mcp'

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