Skip to main content
Glama

Create model

create_model

Create a new model from a declarative ModelSpec. The spec carries the JSON schema plus derivations (computed fields), constraints (invariants), and optional effects. Returns the created id. Fails (isError) on an invalid spec. If the requested id is already taken, a numeric postfix (-2, -3, …) is appended so the create still succeeds — always read the returned id, it may differ from the one you sent. When paired with a browser (remote_with_browser mode), ALWAYS include a viewDefinition in the spec so the model is immediately visible/usable in the sandbox — do not omit it and wait to be asked for one afterward. See the valem://guide/view-system resource for the component catalog.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
specYesA full ModelSpec document (id, schema, derivations, constraints, effects, defaultValues, views).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoThe model id.
versionNoThe spec version.
effectCountNoNumber of effects.
constraintCountNoNumber of constraints.
derivationCountNoNumber of derivations.
metaDerivationCountNoNumber of meta-derivations.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Annotations provide only basic hints (not read-only, not idempotent, not destructive). The description adds substantial behavioral context: it returns an id, fails with isError on invalid specs, appends numeric postfix on id collisions, and instructs the agent to always read the returned id. The browser-mode viewDefinition requirement is also a meaningful behavioral disclosure.

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 a single paragraph that front-loads the core purpose, then delivers critical gotchas (id postfix, isError, viewDefinition requirement) without redundancy. Every sentence adds essential information, and the referral to a guide for the component catalog is a useful pointer rather than filler.

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?

Given the tool's complexity, the description covers return behavior, error semantics, collision handling, and a mode-specific requirement. The rich input schema and output schema handle structural details, and the description properly alerts the agent to behaviors that structured data cannot convey. It is thorough for a create operation.

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%, so the baseline is 3. The description adds value beyond the schema by summarizing the spec's role ('JSON schema plus derivations, constraints, and optional effects') and highlighting the viewDefinition requirement in browser mode. This helps the agent understand the semantic weight of the spec parameter without reading nested schema details.

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 clearly states 'Create a new model from a declarative ModelSpec' with a specific verb and resource, and outlines what the spec contains (schema, derivations, constraints, effects). It doesn't explicitly contrast with sibling tools like patch_model or evolve_spec, but 'new model' and the resource type make the purpose unambiguous.

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 concrete context for when to include a viewDefinition (remote_with_browser mode) and warns against omitting it, but it does not provide explicit when-to-use/when-not-to-use guidance versus alternatives. Usage is implied rather than stated with exclusions.

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.

TDQS

A3.9/5.0
Disambiguation4/5

Most tools have clearly distinct purposes, but get_audit explicitly subsumes get_history and explain, and get_state with paths overlaps get_field, creating minor selection ambiguity. The detailed descriptions help, but an agent could still reach for the wrong getter.

Naming Consistency4/5

Naming is overwhelmingly consistent: snake_case with verb_noun structure and coherent get_/create_/delete_ clusters. Minor deviations like bare verbs (mutate, explain, restore, snapshot) and eval instead of evaluate prevent a perfect score.

Tool Count3/5

27 tools is above the comfortable range and feels heavy, especially with several overlapping audit/state getters that could be consolidated. That said, the domain is broad enough that the count is defensible, so it is heavy but not chaotic.

Completeness4/5

The tool set covers the full model lifecycle well: create, validate, test, mutate, evolve, read, delete, plus snapshot/restore, audit, blobs, views, library, and expression evaluation. Minor gaps like explicit export/import or separate view-management tools are workable around.