Skip to main content
Glama

Save draft

save_draft
DestructiveIdempotent

Save a landing page as a draft and get back a private preview URL to show the user. NOTHING is public until you call publish: a draft is not indexed and records no analytics. Call get_skill_publish BEFORE first use (the workflow, and how to store pageId locally) and get_skill_page_structure BEFORE writing the HTML — saving validates against that spec and rejects the page if it does not comply. A page is ONE HTML document with its CSS and JS inline. Images must be hosted URLs from generate_image or upload_asset — never separate files, never base64 data URIs. The first save creates the page and returns its pageId: SAVE IT (see get_skill_publish) and pass it on every later save, or you will create a second page instead of updating this one. Saving again replaces the draft in place and keeps the same preview URL, so a link you already gave the user keeps working.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "html": "<html>"
    },
    "name": "save_draft"
  }
}

Input Schema

NameRequiredDescriptionDefault
htmlYesThe complete page: one HTML document, CSS in a <style> tag and JS in a <script> tag. Always send the whole thing — a save replaces the draft, it does not patch it.
slugNoSubdomain for a NEW page (lowercase letters, digits, hyphens — e.g. "acme-launch"). The user chooses it: ask before the first save. Ignored when pageId is set.
pageIdNoThe pageId returned by the first save. REQUIRED when working on an existing page; omit only when creating a new one.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, so the safety profile is covered; the description adds genuinely new behavior: drafts are not indexed, record no analytics, keep a stable private preview URL across saves, and are validated against the page-structure spec with rejection on non-compliance. It does not contradict the destructive hint, though it softens the framing by emphasizing that the public surface is untouched, so it stops short of describing what exactly is lost when a draft is replaced (e.g., prior HTML versioning via list_versions).

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?

Front-loaded with purpose and public-visibility guarantee, then prerequisites, then the content contract, then the update semantics — a sensible order. Minor redundancy: the 'SAVE IT (see get_skill_publish)' instruction repeats the earlier pointer to get_skill_publish for the same local-storage workflow.

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?

For a 3-parameter mutation tool with no output schema and no return-format documentation, the description covers everything an agent needs: the preview URL return, pageId persistence, replacement vs creation, validation failure mode, and asset hosting rules. No output schema is needed because the two returned values (preview URL, pageId) are stated inline.

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 the baseline is 3, but the description adds cross-parameter meaning the schema does not: omitting pageId after the first save creates a second page rather than updating, and the slug must be chosen by the user before the first save. It also adds content constraints on `html` (single document, inline CSS/JS, hosted image URLs only, no base64).

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?

Opens with a specific verb and resource ('Save a landing page as a draft') plus the outcome ('get back a private preview URL'), and explicitly separates the operation from the sibling `publish`. The agent can distinguish save_draft from discard_draft/publish without opening any schema.

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?

Gives ordered prerequisites ('Call get_skill_publish BEFORE first use', 'get_skill_page_structure BEFORE writing the HTML') with the reason each is needed, and states the condition for moving to `publish` ('NOTHING is public until you call publish'). It also names the create-vs-update branch explicitly via pageId.

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.