Skip to main content
Glama
@cmssy/mcp-server

@cmssy/mcp-server

Official

Update model

update_model
Destructive

Update a data model by ID or slug—including fields, statuses, product/account/company settings, delivery access, and URL patterns—to keep content and commerce structures aligned.

Instructions

Update a data model by id or slug: name, slug, description, icon, color, displayField, defaultSort, statusField, fields, product capability config, uniqueFields (replaces the whole list; refused while records already share a value), deliveryAccess ("public" lets the user's app read the model through the delivery API; "none" is admin only), or urlPattern (where its records live on the storefront, e.g. /p/{slug} - their url is built from it; null removes it). fields is a PATCH - listed fields are added or replaced by key, unlisted fields stay untouched; use removeFields to delete fields and fieldOrder (every remaining key, in order) to reorder them. product is also a PATCH of the commerce capability config (enabled, priceField, skuField, inventoryField, variantAxes) - omitted keys keep their stored values. While the product is enabled, a call that changes product, fields, removeFields or displayField is graded against every product role, and refused when one would name a missing field or a field of a type it cannot read. auth is a PATCH of the accounts config (enabled, identityField, companyField for B2B companies over customers - a relation to a model with Company enabled, registration, email, verification, lockout) - omitted keys keep their stored values, null unlinks the company. auth.registration "closed" stops self sign-up (siteMember.register refuses; admins still create accounts) - existing pending accounts can still verify their email, so suspend or delete those; "open" lets anyone sign up again. auth.email is a PATCH of the account emails cmssy sends itself: enabled true needs the workspace's default email configuration (refused without one) and the account.* webhooks still fire, so an app that mails too sends a second email; links merges URL templates by kind ({token} required, {siteUrl}, {locale}); templates replaces every copy override (call get_model first and send the full list to change one). Which fields a member may change on their own account and send at sign-up is each field's memberCanSet (registration accepts only those; password fields and the company field never). company is a PATCH of the Company capability ({ enabled }) - a model is at most one of product, account (auth) or company; turning it off is refused while an accounts model's companyField links it.

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": {
      "idOrSlug": "<idOrSlug>"
    },
    "name": "update_model"
  }
}

Input Schema

NameRequiredDescriptionDefault
authNoAccounts config PATCH: omitted keys keep their stored values, null unlinks the company. enabled turns the model into an accounts (customer) model.
iconNo
nameNo
slugNo
colorNo
fieldsNoFields to ADD or UPDATE, matched by key. A listed key replaces that field's whole definition, its rules (minLength, maxLength, minValue, maxValue, pattern, minItems, maxItems, maxDecimals, maxSize, validationMessage) included - copy the field from get_model and change only what the user asked. null clears minItems, maxItems, maxDecimals, maxSize or validationMessage; leave out minLength, maxLength, minValue, maxValue or pattern to drop it. Fields not listed are kept untouched. To remove a field use removeFields.
companyNoCompany capability PATCH: an omitted enabled keeps the stored value. A model is at most one of product, account (auth) or company. Turning it off is refused while an accounts model's companyField links this model.
productNoProduct capability config PATCH: omitted keys keep their stored values (defaults on first enable: skuField 'sku', priceField 'price', inventoryField 'inventory', variantAxes [], name/image/taxRate overrides null). A product is priced in the workspace's defaultCurrency through priceField; prices in additional currencies are set with set_product_currency_prices and set_product_variants, never through a field. The cart reads every product field through these roles - there is no per-cart field mapping. While the product is enabled, every role is graded against the key it resolves to on any call that changes product, fields, removeFields or displayField, so a fields-only update can be refused for a role it never named; a disabled product is not graded until it is enabled. Each role below names the types it accepts and when its field must exist. String-valued types: text, textarea, richText, markdown, color, url, email, select, radio, phone, link, file, form, hidden. A translatable field is one with localized: true on the model. E.g. {variantAxes: []} clears the axes without touching anything else.
idOrSlugYesThe model's id or slug (from list_models)
fieldOrderNoEvery field key of the model, in the order the fields should appear - after fields and removeFields are applied. Must name each remaining field exactly once; a missing, unknown or repeated key is refused. Omit to keep the current order (new fields go last).
urlPatternNoWhere this model's records live on the storefront, appended to the site's public site URL, e.g. /p/{slug} or /{locale}/shop/{category.slug}/{slug}. Must start with /. Tokens: {fieldKey} (a visible text, number, date, select or radio field of this model), {relationField.fieldKey} (that field of the record a single relation links to) and {locale}. Unknown fields or bad token syntax are refused. null removes it.
defaultSortNo
descriptionNo
statusFieldNo
displayFieldNo
removeFieldsNoKeys of existing fields to REMOVE. Removing a field abandons its data on existing records - only pass keys the user explicitly asked to remove.
uniqueFieldsNoKeys of top-level text, email, url, phone or number fields whose value no two records may share (not translatable fields, not the product price/stock fields). Replaces the whole list; [] removes every constraint. Refused while existing records already share a value - the error lists them.
deliveryAccessNoWho can read this model through the delivery API: "public" (any app with the workspace endpoint - required for a content API), "members" (signed-in site members only), "none" (admin only, the default).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed35 schema fields changedv0.73.2
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / definitions / __schema0 / properties / defaultValue / description
      Added value: +"Default value, always a string. It seeds only a field that holds one string, number or boolean - a structured type (media, multiselect, repeater, list, pageSelector, object, table, json) or a hasMany relation is refused on save."
    • addedInput schema / definitions / __schema0 / properties / description / additionalProperties
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / definitions / __schema0 / properties / description / description
      Added value: +"Help text under the field, per language."
    • addedInput schema / definitions / __schema0 / properties / description / propertyNames
      Added value: +{
      +  "minLength": 1,
      +  "type": "string"
      +}
    • changedInput schema / definitions / __schema0 / properties / description / type
      Previous value: -"string"New value: +"object"
    • addedInput schema / definitions / __schema0 / properties / label / additionalProperties
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / definitions / __schema0 / properties / label / description
      Added value: +"The field's label per language code of the workspace: { en: 'Size', pl: 'Rozmiar' }. At least one language."
    • removedInput schema / definitions / __schema0 / properties / label / minLength
      Removed value: -1
    • addedInput schema / definitions / __schema0 / properties / label / propertyNames
      Added value: +{
      +  "minLength": 1,
      +  "type": "string"
      +}
    • changedInput schema / definitions / __schema0 / properties / label / type
      Previous value: -"string"New value: +"object"
    • addedInput schema / definitions / __schema0 / properties / maxDecimals
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maximum": 9007199254740991,
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "For a 'number' field: most digits after the decimal point (0 = whole numbers). null clears the rule."
      +}
    • addedInput schema / definitions / __schema0 / properties / maxItems
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maximum": 9007199254740991,
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Most items a list-valued field accepts (same types as minItems). null clears the rule."
      +}
    • addedInput schema / definitions / __schema0 / properties / maxSize
      Added value: +{
      +  "anyOf": [
      +    {
      +      "exclusiveMinimum": 0,
      +      "maximum": 9007199254740991,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "For a 'media' field: largest accepted asset, in bytes. null clears the rule."
      +}
    • addedInput schema / definitions / __schema0 / properties / memberCanSet
      Added value: +{
      +  "description": "On an accounts model: opens the field to the member - they may change it on their own account and send it at sign-up (registration accepts only these fields; password fields and the company field never, whatever the flag). Top-level fields only, never a hidden or company field. On the login field it opens the login change flow, on the password field the password change.",
      +  "type": "boolean"
      +}
    • addedInput schema / definitions / __schema0 / properties / minItems
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maximum": 9007199254740991,
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Fewest items a list-valued field accepts (repeater, list, multiselect, hasMany relation, media with multiple: true). Ignored on a single-value field. null clears the rule."
      +}
    • changedInput schema / definitions / __schema0 / properties / options / description
      Previous value: -"Choices for a 'select' or 'multiselect' field. Required (non-empty) for those types."New value: +"Choices for a 'select' or 'multiselect' field: [{ value: 's', label: { en: 'Small' } }]. Required (non-empty) for those types; values must be distinct."
    • addedInput schema / definitions / __schema0 / properties / options / items / properties
      Added value: +{
      +  "label": {
      +    "additionalProperties": {
      +      "type": "string"
      +    },
      +    "description": "What the editor sees, per language: { en: 'Small', pl: 'Mały' }.",
      +    "propertyNames": {
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "type": "object"
      +  },
      +  "value": {
      +    "description": "The stored value - what a record holds and filters match.",
      +    "minLength": 1,
      +    "type": "string"
      +  }
      +}
    • addedInput schema / definitions / __schema0 / properties / options / items / required
      Added value: +[
      +  "value",
      +  "label"
      +]
    • changedInput schema / definitions / __schema0 / properties / options / items / type
      Previous value: -"string"New value: +"object"
    • addedInput schema / definitions / __schema0 / properties / validationMessage
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Shown instead of the default message when any rule on this field fails. null clears it."
      +}
    • addedInput schema / properties / auth
      Added value: +{
      +  "description": "Accounts config PATCH: omitted keys keep their stored values, null unlinks the company. enabled turns the model into an accounts (customer) model.",
      +  "properties": {
      +    "companyField": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Relation field (hasOne) naming the customer's company; it must link a model with the Company capability enabled (company: { enabled: true }). null unlinks the company."
      +    },
      +    "email": {
      +      "description": "Account emails PATCH: omitted keys keep their stored values, links merge, templates replace the list.",
      +      "properties": {
      +        "enabled": {
      +          "description": "true: cmssy sends verification, password reset and login change emails itself through the workspace's default email configuration (refused when there is none). false (default): the app's webhook sends them. The account.* webhook events fire either way, so an app that also mails sends a second email.",
      +          "type": "boolean"
      +        },
      +        "links": {
      +          "description": "URL template per email, merged into the stored ones. Placeholders: {siteUrl} (site config publicSiteUrl), {token} (required), {locale}; must give an absolute http(s) URL, and {siteUrl} needs the site's public URL set. Defaults: {siteUrl}/verify-email?token={token}, {siteUrl}/reset-password?token={token}, {siteUrl}/confirm-login-change?token={token}.",
      +          "properties": {
      +            "loginChange": {
      +              "maxLength": 500,
      +              "minLength": 1,
      +              "type": "string"
      +            },
      +            "passwordReset": {
      +              "maxLength": 500,
      +              "minLength": 1,
      +              "type": "string"
      +            },
      +            "verification": {
      +              "maxLength": 500,
      +              "minLength": 1,
      +              "type": "string"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "templates": {
      +          "description": "Copy overrides per kind and locale; replaces every stored override ([] drops them all). Variables: {{siteName}}, {{login}}, {{expiresIn}}. A kind/locale without one uses the built-in copy (en, de, es, pl, fr).",
      +          "items": {
      +            "properties": {
      +              "body": {
      +                "maxLength": 5000,
      +                "minLength": 1,
      +                "type": "string"
      +              },
      +              "ctaLabel": {
      +                "description": "Button label",
      +                "maxLength": 60,
      +                "minLength": 1,
      +                "type": "string"
      +              },
      +              "heading": {
      +                "maxLength": 200,
      +                "minLength": 1,
      +                "type": "string"
      +              },
      +              "kind": {
      +                "enum": [
      +                  "verification",
      +                  "passwordReset",
      +                  "loginChange"
      +                ],
      +                "type": "string"
      +              },
      +              "locale": {
      +                "description": "Language code the copy is for, e.g. en, pl, de-AT",
      +                "maxLength": 16,
      +                "pattern": "^[a-zA-Z]{2,3}(-[a-zA-Z0-9]{2,8})*$",
      +                "type": "string"
      +              },
      +              "subject": {
      +                "maxLength": 200,
      +                "minLength": 1,
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "kind",
      +              "locale",
      +              "subject",
      +              "heading",
      +              "body",
      +              "ctaLabel"
      +            ],
      +            "type": "object"
      +          },
      +          "maxItems": 60,
      +          "type": "array"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "enabled": {
      +      "type": "boolean"
      +    },
      +    "identityField": {
      +      "description": "Email or text field that identifies the account (default 'email')",
      +      "type": "string"
      +    },
      +    "lockout": {
      +      "properties": {
      +        "enabled": {
      +          "type": "boolean"
      +        },
      +        "lockMinutes": {
      +          "maximum": 9007199254740991,
      +          "minimum": 1,
      +          "type": "integer"
      +        },
      +        "maxAttempts": {
      +          "maximum": 9007199254740991,
      +          "minimum": 1,
      +          "type": "integer"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "registration": {
      +      "description": "Who may sign up. 'open' (the default on a new model): anyone, through siteMember.register. 'closed': siteMember.register refuses every new sign-up; admins still create accounts. Closing does not touch accounts already registered - a pending one can still verify its email, so suspend or delete those.",
      +      "enum": [
      +        "open",
      +        "closed"
      +      ],
      +      "type": "string"
      +    },
      +    "strategy": {
      +      "enum": [
      +        "local",
      +        "oauth",
      +        "external"
      +      ],
      +      "type": "string"
      +    },
      +    "verification": {
      +      "properties": {
      +        "required": {
      +          "type": "boolean"
      +        }
      +      },
      +      "type": "object"
      +    }
      +  },
      +  "type": "object"
      +}
    • addedInput schema / properties / company
      Added value: +{
      +  "description": "Company capability PATCH: an omitted enabled keeps the stored value. A model is at most one of product, account (auth) or company. Turning it off is refused while an accounts model's companyField links this model.",
      +  "properties": {
      +    "enabled": {
      +      "description": "true makes the model's records companies an accounts model's companyField can link.",
      +      "type": "boolean"
      +    }
      +  },
      +  "type": "object"
      +}
    • addedInput schema / properties / fieldOrder
      Added value: +{
      +  "description": "Every field key of the model, in the order the fields should appear - after fields and removeFields are applied. Must name each remaining field exactly once; a missing, unknown or repeated key is refused. Omit to keep the current order (new fields go last).",
      +  "items": {
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  "minItems": 1,
      +  "type": "array"
      +}
    • changedInput schema / properties / fields / description
      Previous value: -"Fields to ADD or UPDATE, matched by key. A listed key replaces that field's whole definition; fields not listed are kept untouched. To remove a field use removeFields."New value: +"Fields to ADD or UPDATE, matched by key. A listed key replaces that field's whole definition, its rules (minLength, maxLength, minValue, maxValue, pattern, minItems, maxItems, maxDecimals, maxSize, validationMessage) included - copy the field from get_model and change only what the user asked. null clears minItems, maxItems, maxDecimals, maxSize or validationMessage; leave out minLength, maxLength, minValue, maxValue or pattern to drop it. Fields not listed are kept untouched. To remove a field use removeFields."
    • changedInput schema / properties / product / description
      Previous value: -"Product capability config PATCH: omitted keys keep their stored values (defaults on first enable: skuField 'sku', priceField 'price', inventoryField 'inventory', variantAxes []). E.g. {variantAxes: []} clears the axes without touching anything else."New value: +"Product capability config PATCH: omitted keys keep their stored values (defaults on first enable: skuField 'sku', priceField 'price', inventoryField 'inventory', variantAxes [], name/image/taxRate overrides null). A product is priced in the workspace's defaultCurrency through priceField; prices in additional currencies are set with set_product_currency_prices and set_product_variants, never through a field. The cart reads every product field through these roles - there is no per-cart field mapping. While the product is enabled, every role is graded against the key it resolves to on any call that changes product, fields, removeFields or displayField, so a fields-only update can be refused for a role it never named; a disabled product is not graded until it is enabled. Each role below names the types it accepts and when its field must exist. String-valued types: text, textarea, richText, markdown, color, url, email, select, radio, phone, link, file, form, hidden. A translatable field is one with localized: true on the model. E.g. {variantAxes: []} clears the axes without touching anything else."
    • addedInput schema / properties / product / properties / imageField
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Field key holding the product image the cart snapshots. null clears the override; unset it resolves to 'image'. The field it resolves to must be a media field, a list of media, or a text or url field. A set key must also exist; only the unset default may be absent."
      +}
    • changedInput schema / properties / product / properties / inventoryField / description
      Previous value: -"Field key holding the stock count (default 'inventory')"New value: +"Field key holding the stock count (default 'inventory'). The field must be a number field. A key other than the default 'inventory' must exist."
    • addedInput schema / properties / product / properties / nameField
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Field key holding the product name the cart shows. null clears the override; unset it resolves to the model's displayField, then 'name'. The key it resolves to must name an existing string-valued field - always, set or not."
      +}
    • changedInput schema / properties / product / properties / priceField / description
      Previous value: -"Field key holding the unit price in minor units (default 'price')"New value: +"Field key holding the unit price in major units - the number a merchant types, 49 = $49.00; the server converts to minor units when pricing (default 'price'). Volume tiers and ad-hoc order lines are minor units - do not mix the two. The field must be a number field. It must exist while variantAxes is empty; a key other than the default 'price' must exist regardless."
    • changedInput schema / properties / product / properties / skuField / description
      Previous value: -"Field key holding the SKU (default 'sku')"New value: +"Field key holding the SKU (default 'sku'). The field must be string-valued and not translatable - the SKU is an identity, mirrored to one value per record and compared by equality. A key other than the default 'sku' must exist."
    • addedInput schema / properties / product / properties / taxRateField
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Field key holding the id of the tax rate (from the cart config) that applies to a record. null clears the override; unset it resolves to 'taxRate'. The field it resolves to must be string-valued and not translatable - the rate id is read from the record as stored, without resolving a locale. A set key must also exist; only the unset default may be absent."
      +}
    • changedInput schema / properties / product / properties / variantAxes / description
      Previous value: -"Field keys used as variant axes (e.g. ['size','color']). Every axis must be an existing select field on the model. Pass [] to clear all axes."New value: +"Field keys used as variant axes (e.g. ['size','color']). Every axis must name a distinct existing select field on the model with at least one option. Pass [] to clear all axes."
    • addedInput schema / properties / urlPattern
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Where this model's records live on the storefront, appended to the site's public site URL, e.g. /p/{slug} or /{locale}/shop/{category.slug}/{slug}. Must start with /. Tokens: {fieldKey} (a visible text, number, date, select or radio field of this model), {relationField.fieldKey} (that field of the record a single relation links to) and {locale}. Unknown fields or bad token syntax are refused. null removes it."
      +}
    • addedInput schema / required
      Added value: +[
      +  "idOrSlug"
      +]
  2. First observedv0.73.1

TDQS

A4.5/5.0
Behavior5/5

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

Annotations declare destructiveHint=true but the description adds the concrete consequences: removeFields abandons record data, uniqueFields replaces the whole list and is refused while records collide, templates replaces every override, closing registration leaves pending accounts able to verify, and enabled email causes a second email alongside webhooks. These are exactly the mutation hazards an agent needs and none are recoverable from the annotations alone.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is front-loaded with a useful enumeration in the first sentence, but the remainder is a dense multi-thousand-character block that mixes capability config, grading rules, registration policy and email templating without headings or line breaks. Nearly every sentence carries information, yet the wall-of-text form makes selective retrieval hard.

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 an 18-parameter nested mutation tool with no output schema, the description covers the cross-field refusal rules (product role grading on fields-only updates, uniqueFields collision refusal, company unlink refusal) and the exclusive product/account/company capability constraint. An agent has enough to avoid the common failures.

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?

With only 56% schema coverage across 18 params, the description compensates by explaining the PATCH semantics of fields/product/auth/company (listed keys replaced, omitted keys kept), the replace-not-merge semantics of uniqueFields and templates, and the deliveryAccess/urlPattern meanings. A few params (name, slug, icon, color, description, defaultSort, statusField) rely entirely on the schema's bare types, so it falls short of full coverage.

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 ('Update a data model by id or slug') and then enumerates the exact editable aspects (name, slug, fields, deliveryAccess, urlPattern, product/auth/company capabilities), which makes it immediately distinguishable from create_model, get_model and delete_model. An agent knows exactly which tool to reach for.

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 strong in-tool guidance on alternatives: use removeFields to delete fields, fieldOrder to reorder, call get_model first before sending templates, and use set_product_currency_prices/set_product_variants for non-default currency prices. It doesn't give an explicit 'use this instead of X sibling' framing at the top, which keeps it short of a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools