Skip to main content
Glama

contentrain_model_save

Idempotent

Create or update a content model definition with fields, localization, and content paths. Changes are auto-committed to git, so no manual file edits are needed.

Instructions

Create or update a model definition. Changes are auto-committed to git — do NOT manually edit .contentrain/ files after calling this tool.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesModel ID (kebab-case, e.g. "blog-post")
i18nYesWhether this model supports localization
kindYesModel kind
nameYesHuman-readable name
domainYesContent domain (e.g. "blog", "marketing", "system")
fieldsNoField definitions (not needed for dictionary)
localesNoThe project locales this model's content covers — a subset of config.locales.supported. Omit it (the default) and the model covers every supported locale, which is what validation checks parity against. Declare it only when the content genuinely exists in a subset, e.g. a partially-translated site.
descriptionNoModel description
title_fieldYesName of the field shown as an entry's title in listings, pickers and relation references. Must name a field on this model whose type is string, text, slug, email, url, code, markdown or richtext. Dictionary models have no fields — use "key".
content_pathNoFramework-relative path for content files (e.g. "content/blog", "locales"). When set, content is written here instead of .contentrain/content/
locale_strategyNoHow locale is encoded in file names. Default: "file"

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.0.42
    • addedInput schema / properties / locales
      Added value: +{
      +  "description": "The project locales this model's content covers — a subset of config.locales.supported. Omit it (the default) and the model covers every supported locale, which is what validation checks parity against. Declare it only when the content genuinely exists in a subset, e.g. a partially-translated site.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  2. Addedv1.0.29
  3. Removedv1.0.28
  4. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

The annotations already declare idempotentHint=true and readOnlyHint=false. The description adds valuable context beyond that: it discloses the git auto-commit side effect and warns against manual file edits. This is meaningful behavioral disclosure that helps the agent anticipate consequences. No contradiction with annotations exists.

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

Conciseness5/5

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

The description is two sentences, with the core action front-loaded and the critical warning immediately following. There is zero waste; every word earns its place. It is perfectly sized for the complexity of the tool.

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?

Given the tool's complexity (11 parameters, nested field objects, no output schema), the description plus the rich schema provides enough for an agent to call it correctly. The git side-effect and file-edit warning are crucial and present. It could be more explicit about when to prefer this over delete or validate, but it is not incomplete enough to drop below 4.

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

Parameters3/5

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

The schema has 100% parameter description coverage; every property (including nested field definitions) includes a description. The tool description itself adds no parameter-level information. Per the rubric, with high coverage the baseline is 3, and the description does not exceed that baseline.

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?

The description states a specific verb ('Create or update') and a clear resource ('a model definition'). It is unambiguous and distinct from sibling tools like contentrain_model_delete or contentrain_vocabulary_save, which handle different resources. The purpose is immediately understood without needing to inspect the schema.

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?

The description gives a strong behavioral guideline ('Changes are auto-committed to git — do NOT manually edit .contentrain/ files after calling this tool') which implies when it is appropriate to use it (i.e., when you want changes versioned) but does not explicitly contrast it with alternatives like model_delete or vocabulary_save. Usage is inferred rather than stated directly, so it earns a 3 rather than a 4 or 5.

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