Skip to main content
Glama

Create collection

create_collection

Stand up a new collection on an existing site in one call: append a collections[] entry (with contentType, pathPrefix, template, and optional items[]), optionally create the index page that hosts the matching <collection-list>, and seed initial items into the content_items table. After this call:

  • /{path_prefix}/{slug} resolves each item via Mustache substitution

  • the index page's <collection-list> iterates the seeded items

  • add_content_item / edit_content_item / delete_content_item manage rows afterward.

Use this when the user asks 'add a blog to my site', 'set up case studies', 'add a careers section', etc. Schemas are per-site — pick a contentType slug that's unique within the site (call list_content_types to see what's already declared) and ship the fields[] schema inline. Writes a new draft version; call publish to push live.

Input Schema

NameRequiredDescriptionDefault
itemsNoInitial items to seed into content_items. Each row's content must satisfy the collection's `fields` (required fields populated, declared types matched). The index page's <collection-list> will iterate these.
fieldsYesPer-item field schema. Each field becomes a form input AND a write-time validation rule. Include every field the `template` references (placeholders like {{title}}, {{body}}, {{image.url}} map to field keys). The schema is per-site and per-collection — there is no global catalog.
enabledNoDefaults to true. Set false to ship the collection definition (template + items) without serving detail URLs or rendering index iteration.
site_idYes
templateYesPer-item template Node tree with {{field}} placeholders. The template is rendered for each detail URL with the row's content substituted in. See the canonical examples in lib/fixtures/templates/lanyard.json, prive.json, axel.json for the shape.
index_pageNoOptional index page to create at the same time. If the site already has an index page at the prefix (e.g. /blog), omit this and patch its tree separately.
path_prefixYesURL prefix for detail pages. Single segment, kebab-case, with leading and trailing slashes. Examples: '/blog/', '/projects/', '/searches/', '/case-studies/'.
content_typeYesThe collection's per-site identifier (its content_type slug). Lowercase kebab-case. Each site owns its catalog — pick whatever name fits the brief (project, blog, recipe, episode, gift, …).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare non-readonly, non-destructive, non-idempotent, closed-world. The description adds real context beyond that: it writes a draft version rather than publishing, describes the post-conditions (detail URLs resolve via Mustache, the <collection-list> iterates seeded rows), and warns that the content type must be unique within the site. It stops short of stating what happens on content_type collision or whether an existing collection is replaced.

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?

The opening sentence front-loads the core action, and the bulleted post-conditions are scannable. It is longer than strictly necessary for a single tool, but nearly every sentence (uniqueness rule, inline fields schema, publish follow-up) carries operational information rather than filler.

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?

For an 8-parameter tool with nested template and index-page trees and no output schema, the description supplies the workflow context an agent needs: preconditions (list_content_types), post-call state, and publish sequencing. The template Node tree shape is delegated to fixture file paths rather than described, which is the only real gap.

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 88%, so the baseline is 3, and the description still adds value: it ties fields[] to template placeholders ('include every field the template references'), flags the uniqueness constraint on contentType, and routes the agent to list_content_types. It does not improve on the schema's own detailed notes for image fields or path_prefix, so it is not a 5.

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 ('Stand up a new collection on an existing site in one call') and enumerates exactly what gets created: the collections[] entry, the optional index page, and seeded content_items rows. It also explicitly distinguishes itself from the row-level siblings (add_content_item / edit_content_item / delete_content_item) that manage items afterward.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives concrete trigger phrases ('add a blog to my site', 'set up case studies', 'add a careers section') and names the adjacent tools to call at each stage: list_content_types beforehand to check the catalog, publish afterward to go live. That is explicit when-to-use plus alternatives.

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