Skip to main content
Glama

Create a catalog

create_catalog

Build a catalog from a DSL document: pages, product grids and which fields each product shows. The document needs a template, which supplies the design — without one the catalog has blank covers, no fonts or colours and plain product cells. The template is the merchant's choice (list_templates shows them): a call without one creates nothing and answers requiresTemplateChoice with the choices. A wholesale document (usage: "wholesale" — a line sheet is a wholesale catalog) also needs wholesaleDiscountPercent, the percentage off the regular price the merchant gives wholesale buyers, 0 when there is none; it is the merchant's figure, and without it nothing is created either (requiresWholesaleDiscount). The grammar is foldsquare://schemas/catalog-dsl.json. Products are selected by collection, by id or by search; list_collections and search_products resolve the names a merchant uses into ids. An answer with valid: false lists issues that say exactly what to change. On success, catalog.editorUrl opens what was built — the only link that works before the catalog is published; viewerUrl is null until then.

Input Schema

NameRequiredDescriptionDefault
documentYesA foldsquare.catalog/v1 document
idempotencyKeyNoAny string unique to this build; a retry with the same key returns the first result instead of creating a second catalog
withoutTemplateNotrue builds an undesigned catalog, for a merchant who has seen the templates and wants none.

Output Schema

NameRequiredDescriptionDefault
issuesNo
catalogNoThe catalog built, when created
createdYes
missingNoWhat the merchant still has to decide
summaryNo
replayedNoA retry with the same idempotencyKey: the first result, not a second catalog
templatesNo
schemaIssuesNo
tellTheMerchantNoWarnings on a successful build, to relay
requiresTemplateChoiceNoNothing was built: the merchant must pick one of `templates`
requiresWholesaleDiscountNoNothing was built: the merchant must give their wholesale discount

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?

Annotations only declare the safety profile (readOnly=false, destructive=false, idempotent=false); the description adds the failure modes the agent cannot see elsewhere — a call without a template creates nothing and returns requiresTemplateChoice, a wholesale document without a discount returns requiresWholesaleDiscount, and validation failures come back as valid: false with actionable issues. It also explains the post-creation link semantics, which no annotation covers.

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 the purpose and generally dense with information, but delivered as one long semicolon-linked paragraph with some restatement ('The template is the merchant's choice' / 'it is the merchant's figure'). Structuring the two hard requirements as separate sentences or bullets would improve scanability.

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?

An output schema exists, yet the description still adds the non-obvious fact that `viewerUrl` is null until publishing and `editorUrl` is the only working link — behavioral, not structural, information. Combined with the grammar pointer, the required-field conditions and the error-answer shape, an agent has everything needed to call this 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% and the `document` object is free-form, so the description's explanation of its internals (template, usage: "wholesale", wholesaleDiscountPercent, product selection by collection/id/search) is the only real specification available, plus the grammar URI. It stops short of covering `idempotencyKey` and the `withoutTemplate` escape hatch, which live only in the schema text.

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 ('Build a catalog from a DSL document') and immediately enumerates what the document produces (pages, product grids, per-product fields). An agent can distinguish this from edit_catalog/update_catalog/duplicate_catalog by the name plus the 'build from document' framing.

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 clear conditional prerequisites (a `template` is required; wholesale documents additionally require `wholesaleDiscountPercent`) and routes sub-lookups to list_templates, list_collections and search_products. It does not state when to prefer this over edit_catalog or duplicate_catalog, which is the one remaining routing gap.

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