Skip to main content
Glama

Save app

save_app
Idempotent

Create or update a persistent UI app with its HTML, manifest, and AI usage skill, saving each change as a new version for reuse.

Instructions

Create or update a UI app in the persistent registry. Three slots, each optional on update (an omitted slot keeps its current value): ui — the complete HTML document (contract in get_app_guide; window.oma, loads only from the guide's CDN allowlist or manifest.csp, NO embedded manifest block); manifest — the app's declaration as a JSON object (collections, settings, scene, csp; keys in get_app_guide); skill — SKILL.md text telling an AI how to USE the app. null clears manifest or skill. Creating needs ui. Every save snapshots all slots as one new version (history kept). After saving, open it IMMEDIATELY with open_app.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uiNocomplete self-contained HTML document using window.oma; omit on update to keep the current one
nameYesapp name, ^[a-z][a-z0-9-]{0,31}$ (e.g. 'kanban', 'habit-tracker')
skillNoSKILL.md text (whole-value replace), null to clear, omit to keep
manifestNodeclaration object (whole-value replace), null to clear, omit to keep
command_idNoidempotency key (uuid); auto-generated if omitted
descriptionNoone line: what this app shows and what data fields it uses
expected_versionNoREQUIRED when overwriting an existing app: the version you read (get_app). Creating a new name needs none

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
eotNo
nameNo
noteNo
sizeNo
reasonNo
appliedNo
createdNo
versionNo
prev_sizeNo
manifest_actionNo
expected_versionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.10.1
    • addedInput schema / properties / skill
      Added value: +{
      +  "description": "SKILL.md text (whole-value replace), null to clear, omit to keep",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
  2. Changed2 schema fields changedv0.6.0
    • removedOutput schema / properties / prev_size / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / prev_size / type
      Added value: +[
      +  "number",
      +  "null"
      +]
  3. First observedv0.5.7

TDQS

A4.3/5.0
Behavior5/5

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

Substantially exceeds the annotations (readOnlyHint=false, idempotentHint=true, destructiveHint=false): it discloses version-snapshot behavior ('Every save snapshots all slots as one new version (history kept)'), null-clears semantics, the no-embedded-manifest constraint plus CDN allowlist fallback, and the expected_version precondition for overwrites. This is exactly the write/auth/state context annotations alone cannot convey.

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 then the slot semantics, with no filler sentences. The parentheticals and mid-sentence constraint packing make it dense, but each clause carries actionable information.

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?

Given an output schema exists and annotations cover the safety profile, the description supplies everything else an agent needs: slot semantics, creation vs. update rules, versioning/rollback context, and the required post-save open_app step. Nothing material is missing for correct invocation.

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 meaning the schema lacks: which slots exist conceptually, that 'Creating needs ui', and the HTML contract dependency on get_app_guide with the manifest-block prohibition. It still doesn't elaborate on command_id or expected_version beyond what the schema text already says.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource and scope: 'Create or update a UI app in the persistent registry,' and enumerates the three slots it writes (ui, manifest, skill). It does not, however, differentiate itself from the sibling edit_app, leaving ambiguity about why an agent would choose one over the other.

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 conditions ('Creating needs ui', 'an omitted slot keeps its current value' on update) and a mandated follow-up action ('After saving, open it IMMEDIATELY with open_app'), which is real routing guidance. It stops short of stating when to prefer save_app over edit_app or purge_app, so no exclusion guidance is present.

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