Skip to main content
Glama

Save a preview as a draft

claim_preview
Idempotent

Save an unexpired anonymous preview into the authenticated organization as a draft. Requires an org API key or OAuth sign-in with the forms:write scope. Same save as POST /api/v1/tools/previews/{id}/claim. previewId is the token in previewUrl (/tools/p/{previewId}). Returns formId and editorUrl (/app/forms/{formId}). An unknown or expired preview is an error. A preview already saved by another organization is refused. Claiming the same preview again for this organization returns the same draft.

Input Schema

NameRequiredDescriptionDefault
previewIdYesPreview id from previewUrl (/tools/p/{previewId}).

Output Schema

NameRequiredDescriptionDefault
formIdYesDraft form id saved from the preview.
graderNoGrade of the saved draft, when one was stored.
editorUrlYesEditor URL, /app/forms/{formId}.
versionIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • addedInput schema / properties / previewId / description
      Added value: +"Preview id from previewUrl (/tools/p/{previewId})."
    • addedInput schema / properties / previewId / minLength
      Added value: +22
    • addedInput schema / required
      Added value: +[
      +  "previewId"
      +]
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "editorUrl": {
      +      "description": "Editor URL, /app/forms/{formId}.",
      +      "format": "uri",
      +      "type": "string"
      +    },
      +    "formId": {
      +      "description": "Draft form id saved from the preview.",
      +      "type": "string"
      +    },
      +    "grader": {
      +      "additionalProperties": true,
      +      "description": "Grade of the saved draft, when one was stored.",
      +      "properties": {
      +        "grade": {
      +          "enum": [
      +            "A",
      +            "B",
      +            "C",
      +            "D",
      +            "F"
      +          ],
      +          "type": "string"
      +        },
      +        "recommendations": {
      +          "items": {
      +            "additionalProperties": true,
      +            "properties": {
      +              "detail": {
      +                "type": "string"
      +              },
      +              "id": {
      +                "type": "string"
      +              },
      +              "severity": {
      +                "type": "string"
      +              },
      +              "title": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "id",
      +              "severity",
      +              "title",
      +              "detail"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "score": {
      +          "maximum": 100,
      +          "minimum": 0,
      +          "type": "integer"
      +        }
      +      },
      +      "required": [
      +        "score",
      +        "grade",
      +        "recommendations"
      +      ],
      +      "type": "object"
      +    },
      +    "versionId": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "formId",
      +    "editorUrl"
      +  ],
      +  "type": "object"
      +}
  3. Added

TDQS

A4.5/5.0
Behavior5/5

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

Annotations cover safety (readOnlyHint=false, destructiveHint=false, openWorldHint=false) but not the operational semantics the description supplies: required credentials/scope, error behavior for unknown, expired, or cross-organization previews, and the idempotent replay guarantee that re-claiming returns the same draft. This is substantive context the structured fields do not carry.

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?

Six dense sentences, front-loaded with the action and credential requirement, followed by API mapping, parameter origin, return values, and failure/passivation behavior. No sentence is filler and nothing is buried.

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 one-parameter mutation tool with an output schema and full annotation coverage, the description covers credentials, error modes, idempotency, and even names the return fields. An agent has everything needed to call it correctly.

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% and the single parameter's derivation (previewId as the token in previewUrl /tools/p/{previewId}) is already stated in the schema. The description restates the same information with no added format or edge-case detail, so the baseline of 3 applies.

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 and transformation: save an unexpired anonymous preview into the authenticated organization as a draft. This clearly separates it from siblings like get_preview (read), discard_form (delete), and preview_volunteer_form (render), so an agent can route without opening a 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?

Gives concrete preconditions (org API key or OAuth with forms:write scope) and precise failure conditions (unknown/expired preview is an error, preview already saved by another org is refused). It stops short of naming which sibling to use instead when the preview is already claimed or when the goal is just to view it.

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