Skip to main content
Glama

put_collection_schema

DestructiveIdempotent

Replace the whole field schema (draft; publish makes it live). Edit what get_collection_schema returns; keys as list_collections gives them ("blog/" or an id). Field: { key, type, label?, help?, required?, unique?, inCard?, default? } — type text (multiline, minLength, maxLength) | number (min, max, integer) | boolean | option (options[] required) | multiOption (options[] required, max) | link | email | phone | color. Keys: letter then letters/digits/_ (≤40), not a built-in post field (author: text, or a reference to authors/ with the Authors feature), not secret-looking. ≤60 fields per collection. settings.defaultSort: date:desc|date:asc|title:asc|slug:asc. Removing a collection's entry drops its definitions (post values stay). Values go in put_post meta.custom (fieldWarnings are soft). 400 invalid_collection_schema lists issues; 409 conflict = stale ifMatch.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "site": "<site>",
      "schema": "<schema>"
    },
    "name": "put_collection_schema"
  }
}

Input Schema

NameRequiredDescriptionDefault
siteYesSite slug, e.g. acme-studio
schemaYesWhole schema file: { "v": 1, "collections": { "<key>": { "fields": [...], "settings"?: {...} } } }.
contextNoWhy you're calling this (activity log).
ifMatchNohash from get_collection_schema (stale → 409 conflict). null = the schema must not exist yet. Omit to write unconditionally.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / schema / additionalProperties
      Previous value: -{}New value: +true
    • addedInput schema / properties / schema / properties
      Added value: +{}
  2. Changed2 schema fields changed
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • changedInput schema / properties / context / description
      Previous value: -"Optional: one sentence on why you are calling this (shown in the site's activity log; no personal data)."New value: +"Why you're calling this (activity log)."
  3. Changed3 schema fields changed
    • changedInput schema / properties / context / description
      Previous value: -"One sentence: why you are calling this tool and what you are trying to accomplish. Stored on the site's activity log and visible to everyone on the site — never put secrets or personal data here."New value: +"Optional: one sentence on why you are calling this (shown in the site's activity log; no personal data)."
    • removedInput schema / properties / guestToken
      Removed value: -{
      -  "description": "Guest token from start_site. Send it on every call until claim_site. Omit when this chat is already signed in to Dotsy.",
      -  "minLength": 20,
      -  "type": "string"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "site",
      -  "schema",
      -  "context"
      -]New value: +[
      +  "site",
      +  "schema"
      +]
  4. Added

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the annotations (destructive, idempotent, not read-only), the description discloses the specific destructive consequence — 'Removing a collection's entry drops its definitions (post values stay)' — so an agent knows exactly what is lost and what survives. It also documents the failure surface: 400 invalid_collection_schema lists issues, 409 means a stale ifMatch, and fieldWarnings are soft. Draft-vs-live semantics add a mutation-lifecycle detail annotations cannot express.

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?

Purpose and draft semantics are front-loaded in the first clause, and nearly every later sentence is functional reference (types, limits, error codes) rather than filler. The type enumeration is a dense run-on with telegraphic parentheticals that takes effort to parse, but trimming it would remove constraints an agent needs to build a valid schema.

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 destructive whole-document replace with a free-form nested payload and no output schema, the definition supplies the value grammar, hard limits, reserved-key rules, draft lifecycle, related write path, and expected error codes. An agent can construct a valid call and interpret the main failure modes without consulting another tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is already 100%, so the baseline is 3, but the description goes far past the schema: it defines the nested field grammar ({ key, type, label?, help?, required?, unique?, inCard?, default? }), per-type constraints for text/number/option/multiOption/link/email/phone/color, key naming rules and reserved-field exclusions, the 60-field cap, the settings.defaultSort allowed values, and the three-way meaning of ifMatch (hash, null, omit). The nested schema object itself has empty properties, so this prose carries real semantic weight.

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?

The description opens with a specific verb and resource: 'Replace the whole field schema', and immediately qualifies the scope as draft-only ('publish makes it live'). It anchors the payload to 'Edit what get_collection_schema returns', which tells an agent where the current value comes from. It stops short of naming a sibling such as update_collection or infer_collection_schema, so the contrast between whole-replace and partial update is inferred rather than stated.

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

Usage Guidelines3/5

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

There is rich how-to-use material — where to source the current schema, how keys map from list_collections, how values are written via put_post meta.custom. But nothing tells the agent when to choose this tool over update_collection, infer_collection_schema, or inspect_collection, and no precondition (e.g., permissions or publish step ordering) is spelled out beyond the draft note. Usage is implied by context rather than routed explicitly.

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