Skip to main content
Glama

save_template

Save a user-owned DSL template for later reuse via /api/v1/render. Validates the DSL with the catalog before persisting. Free (no credits). Pass sampleData (any JSON value) so the template's binding shape is preserved — the modify-template flow on /ai/chat round-trips this back into the Render data panel when the user returns. Optional description is a one-sentence summary surfaced on /templates. Returns { templateId, name, createdAt }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dslYesThe builder DSL script (<=512KB).
nameYesHuman-readable template name.
sampleDataNoOptional JSON binding data to persist alongside the template. Round-tripped on get_template / modify-template flow.
descriptionNoOptional one-sentence summary (max 280 chars). Surfaced on /templates list rows.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations provided, the description carries full burden. It discloses validation-before-persist, free (no credits), and the return shape { templateId, name, createdAt }. It also explains the sampleData round-trip behavior. Does not mention permissions or reversibility, but these are less critical for a save operation.

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?

Three sentences with no filler. Purpose is front-loaded, and each sentence adds value: what it does, validation+free, and return shape. Efficient and well-structured.

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?

Given no output schema, it explains the return object. It covers validation, cost, and the sampleData purpose. It does not mention error handling (e.g., what happens if validation fails) or idempotency, but those are minor for a save tool. Overall complete enough for an agent to call it correctly.

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. The description adds meaningful context beyond the schema: it explains sampleData's role in preserving binding shape and its round-trip on /ai/chat, and it clarifies that description is surfaced on /templates. These go beyond the schema 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 a user-owned DSL template') and its purpose (reuse via /api/v1/render), clearly distinguishing it from siblings like get_template, update_template, and delete_template. The mention of validation and free usage adds specific scope.

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?

Implies when to use (saving a new template for later render) and provides context about the modify-template flow on /ai/chat that uses sampleData, but does not explicitly name alternatives or state when not to use it (e.g., vs update_template). Lacks explicit exclusions, so not a 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