Skip to main content
Glama

wattpad_update_part

Destructive

Update a Wattpad chapter's title or full text, replacing the previous content only after verifying it hasn't changed and backing up the original to prevent data loss.

Instructions

Actualiza el titulo o el texto de un capitulo, via /apiv2/editstory.

EXPERIMENTAL y destructivo: el texto enviado reemplaza al anterior entero. Antes de escribir (1) respalda el HTML original en disco, (2) comprueba con expected_text_hash que nadie lo modifico, y (3) se niega si el original tiene formato que el markup no representa.

El last_text_hash que exige Wattpad no se calcula: se lee del capitulo justo antes de escribir. Es un candado optimista.

Returns: str: JSON con el resultado, la ruta del respaldo y los avisos.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textNoNuevo texto COMPLETO; REEMPLAZA el anterior entero. Texto en markup. Parrafos separados por una LINEA EN BLANCO (un salto simple es <br> dentro del mismo parrafo). *cursiva*, **negrita**, __subrayado__, --- en su linea para separar escenas, [imagen: URL]. Un asterisco, guion bajo, corchete o barra literales se escapan con una barra invertida. Para un corte de escena use --- , nunca * * *.
forceNoEscribir aunque el original tenga formato que el markup no representa, o aunque el texto encoja mucho.
titleNoNuevo titulo.
dry_runNoDevuelve la peticion sin enviarla.
part_idYesID del capitulo a modificar.
story_idNoID de la historia. Si se omite se deduce del capitulo.
expected_text_hashNoEl text_hash que devolvio wattpad_get_part_text. Si el capitulo cambio desde entonces, la escritura se rechaza.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.5/5.0
Behavior5/5

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

Even though annotations already declare destructiveHint=true, the description goes beyond: it explains that the text REPLACES the previous one entirely, requires a backup, uses an optimistic lock via expected_text_hash, and mentions refusal conditions. This adds rich behavioral context about side effects and safety, which is valuable beyond the annotation.

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?

The description is concise and front-loaded with the core purpose and destructive warning. It then lists required safety steps and then explains the hash. It's well-structured with short paragraphs. However, it uses a bullet list and a return type note that could be more compact, but it's efficient for the complexity.

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?

Given the destructiveness and experimental nature, the description covers critical safety procedures, return type, and parameter behavior. It lacks explicit mention of rate limits or authentication, but those are likely not necessary for an agent to call it. The output schema exists, so return details are not needed. It's complete for an expert agent, though a novice might need more examples.

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 description coverage is 100%, so the schema already documents all parameters. However, the description adds critical semantics for the 'text' parameter: it explains markup syntax, paragraph separation, escape characters, and scene break examples. This is beyond the schema's description and essential for correct use. Other parameters like expected_text_hash are also clarified in the description. Slight deduction because the description doesn't detail 'story_id' deduction, but schema covers it.

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 states the specific action (update title or text of a chapter) and the endpoint (/apiv2/editstory). It clearly differentiates this from sibling tools like wattpad_get_part_text and wattpad_create_part. The title 'Editar capitulo (experimental)' is consistent and adds clarity.

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 description explicitly warns about the destructive nature and gives clear preconditions (backup, check hash, refuse if formatting is lost). It implies use after reading the part with wattpad_get_part_text (since expected_text_hash comes from there), but does not explicitly name that sibling or say when not to use it. The context is clear enough.

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