Skip to main content
Glama

Rewrite script

rewrite_script
DestructiveIdempotent

Validate or save complete script content produced from get_script_rewrite_context by the LLM in this MCP session. Paragraphs may be added, removed, moved, merged or rewritten. Keep every protected token exactly once and in relative order; keyframe labels explain where their tokens belong. Existing slide narration and on-screen text may change; slide structure is read-only and belongs to the slide tools.

Input Schema

NameRequiredDescriptionDefault
dryRunNoWhen true, validate and return the normalized preview without writing anything.
contentYesThe complete rewritten content, including all protected tokens.
projectUidYes

Output Schema

NameRequiredDescriptionDefault
changedYes
previewNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true and idempotentHint=true, but the description adds real substance: existing slide narration and on-screen text may be overwritten, while slide structure is untouched. It also discloses the invariant the validator enforces (each protected token exactly once, in relative order) and how keyframe labels map tokens. It does not state explicitly that prior script content is fully replaced, which would close the loop on destructiveness.

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 sentences, front-loaded with the verb and the source tool, then constraints, then scope boundaries. Dense but every sentence carries a distinct rule. Terms like 'protected token' and 'keyframe labels' are used without definition, which forces some inference.

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?

With an output schema present, return values need not be explained, and the description covers modes, edit latitude, token invariants, and tool boundaries. The remaining omission is the meaning/format of projectUid and any failure behavior for validation errors, which matters for a destructive write tool.

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 coverage is 67% and the schema already documents dryRun and content. The description goes beyond it by constraining content semantics: it must be complete, must include every protected token exactly once and in relative order, and may restructure paragraphs freely. projectUid remains unexplained in both places, a minor residual gap.

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 specific verbs (validate or save) against a specific resource (complete script content) and ties the input to get_script_rewrite_context, so the agent knows this is the write-back counterpart to that read tool. It also explicitly cedes slide structure to the slide tools, separating it from update_slide/add_slide without opening either schema.

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 names the prerequisite source (content produced from get_script_rewrite_context in this session) and the two modes implied by 'validate or save'. It also draws the exclusion boundary: 'slide structure is read-only and belongs to the slide tools.' It stops short of explicitly recommending a dryRun pass before saving, which would be the natural next guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources