Skip to main content
Glama

Save Spec Template

save_spec_template
Destructive

Create or edit one spec template: a named, reusable set of cost-driver attribute values (e.g. "Standard Paperback" = Perfect binding, 6×9 trim, Mono text) that apply_spec_fill(templateId=...) applies to many items at once. Omit templateId to create: name and spec are required. Pass templateId to edit, where every omitted value keeps its current value, a spec replaces the whole stored spec, and an empty description clears it. Names are unique per account, ignoring case. Spec values are keyed by item custom field fieldName and validated against those fields; the preview shows them as they will be stored. Editing a template does not change items already filled from it. Requires an operator (unpinned) credential and an Admin user.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "save_spec_template"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoTemplate name (e.g. "Standard Paperback"); required to create.
specNoAttribute values keyed by item custom field fieldName (e.g. {"binding": "Perfect", "trim_width": 6}); required to create, and replaces the entire spec on an edit.
previewNoStep 1 of the required two-step write: set true to validate and receive a structured preview plus a single-use previewReceipt. Nothing changes until the commit call.
templateIdNoThe template id (GUID) to edit; omit to create a template.
descriptionNoOptional description of this production configuration; empty clears it.
idempotencyKeyNoCaller-generated idempotency key; required with previewReceipt to commit.
previewReceiptNoStep 2 of the required two-step write: the receipt returned by the preview call. Supply together with a fresh idempotencyKey to commit; calls without it are refused.

Output Schema

NameRequiredDescriptionDefault
okNo
deletedNo
previewNo
templateNo
expiresAtNo
actionItemIdNo
confirmationNo
correlationIdNo
approvalResultNo
idempotencyKeyNo
previewReceiptNo
idempotentReplayNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations (which only flag destructiveHint=true, readOnlyHint=false): it discloses merge semantics on edit (omitted values keep current), that spec wholesale-replaces the stored spec, that an empty description clears it, case-insensitive per-account name uniqueness, validation against item custom fieldNames, and that edits do not retroactively affect already-filled items. It also states the auth prerequisites (operator/unpinned credential plus an Admin user), which is the kind of operational context annotations cannot carry.

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?

Information-dense and front-loaded: it opens with the resource definition, then the create/edit branch, then behavioral rules, then credentials. Each clause carries distinct semantics, though the run-on sentence packing edit rules together is slightly harder to scan than a short bulleted structure would be.

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 7-parameter destructive write with a required two-step preview/commit flow, the description covers the create-vs-edit decision, merge semantics, validation, uniqueness, non-retroactive behavior, and auth requirements. An output schema exists, so it need not describe return values, and the two-step receipt flow is corroborated by the schema.

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 and the schema already documents the two-step preview/previewReceipt/idempotencyKey flow. The description still adds cross-parameter logic the schema states only piecemeal: the templateId-absence-means-create rule, which fields are required on create, and the edit-time partial-update semantics for name/spec/description.

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 resource (create or edit one spec template) and defines what a template IS — a named, reusable set of cost-driver attribute values — with a concrete example. It also distinguishes the create path from the edit path and points to the consuming sibling apply_spec_fill(templateId=...), so an agent can place the tool without opening schemas.

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?

Explicit branching guidance: omit templateId to create (name and spec required), pass templateId to edit. It also names the downstream alternative that applies templates. It does not cover the other obvious siblings (delete_spec_template, list_spec_templates) or when a caller should prefer preview_spec_fill, so it stops short of full alternative routing.

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