Skip to main content
Glama

ScriptGrain

Save the final edit of a draft

save_edit
Idempotent

Save the user's FINAL edited version of a generated draft. Call this when the user has finished editing a draft (in conversation or elsewhere) and is happy with it — the diff against the original feeds ScriptGrain's closed-loop voice learning, so future drafts in that profile improve. Needs a generation with status 'drafted' (an 'outline' id has no draft to diff against); afterwards its status is 'edited'. Optional voice_rating (1-5): how well the ORIGINAL draft matched their voice. Saving again for the same generation replaces the previous edit. Free.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
final_textYesThe user's final version of the text.
voice_ratingNoUser's 1-5 rating of how well the original draft matched their voice.
generation_idYesThe generation the user edited.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing the status transition ('drafted' -> 'edited'), the replace-on-resave behavior, the downstream voice-learning effect of the diff, and the cost ('Free'). Annotations already declare idempotent/non-destructive; the description enriches this with operational context.

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 primary action is stated first, then conditions, then side effects and cost in tight parentheticals. Dense but every clause carries necessary information with no 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?

With no output schema, the description carries return-value burden and does so by explaining the resulting status and the diff/learning consequence. Preconditions, side effects, idempotency, and cost are all covered for a 3-param mutation 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 100%, so baseline is 3, but the description adds meaning: it clarifies voice_rating rates the ORIGINAL draft (not the edit) and that generation_id must reference a 'drafted' generation. This adds real state semantics beyond the field descriptions.

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 specific verb+resource ('Save the user's FINAL edited version of a generated draft') and distinguishes itself from siblings like restore_draft_version and list_draft_versions by scoping to the final edited version. An agent can tell exactly what this does.

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 explicit when-to-use ('when the user has finished editing a draft and is happy with it') and states a hard prerequisite (generation must have status 'drafted', not 'outline'). It doesn't name competing tools such as restore_draft_version as alternatives, so it stops just short of 5.

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