Skip to main content
Glama

Apply mutations

mutate

Apply field mutations to a model and run the reactive pipeline (derivations recompute, constraints enforce, effects dispatch). 'mutations' is a flat map keyed by canonical JSON Path address, e.g. {"$.order.qty": 3}. A ROLLBACK constraint violation returns isError with the structured list of violated constraints. Returns the actionable summary (derivedUpdated / flaggedConstraints / dispatchedEffects); pass includeTraces:true for the full derivation/constraint trace (the same payload 'explain' serves — omit it and call explain only when a value looks wrong).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe model id.
mutationsYesMap of canonical JSON Path address to new value, e.g. {"$.order.qty": 3, "$.order.discount": 0.1}.
includeTracesNoInclude the full derivation/constraint trace in the result (default false).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
tracesNoFull derivation/constraint traces (only when includeTraces:true).
successNoTrue when the mutation committed.
metaUpdatedNoMeta paths recomputed.
mutatedPathsNoBase paths written.
derivedUpdatedNoDerived paths recomputed.
dispatchedEffectsNoIds of effects dispatched.
flaggedConstraintsNoIds of FLAG-policy constraints that fired.

Schema Changelog

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

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

The annotations are all negative (readOnly=false, idempotent=false, destructive=false), so they give the agent essentially no safety profile — the description must carry the load. It does: it discloses that mutations are not idempotent (they trigger effects), that a ROLLBACK returns isError with a structured violation list, and how the reactive pipeline cascades. 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.

Conciseness4/5

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

The core purpose and scope are front-loaded in the first half-sentence. Every clause earns its place. The only blemish is the convoluted parenthetical at the end ('the same payload explain serves — omit it…'), which is grammatically tangled and slightly undercuts clarity, though the content is still useful.

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?

The tool is conceptually complex (reactive derivations, constraints, effects, rollback behavior) and the description covers those mechanics well. An output schema exists, so return values need no explanation. The main gap is failing to mention when to use dry_run instead for safe pre-validation, which the sibling list suggests exists; otherwise nothing essential is missing.

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% (the schema documents id, mutations, and includeTraces), so baseline is 3. The description adds genuine value beyond the schema by defining the mutation key convention ('canonical JSON Path address'), by giving a worked example of the flat map, and by clarifying the meaning of includeTraces (returns the same trace payload used by explain). That lifts it a notch above 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 names a specific action ('Apply field mutations to a model') and resource, and pins down the exact behavior: running the reactive pipeline (derivations recompute, constraints enforce, effects dispatch). It clearly distinguishes itself from read-only/lookup siblings and states the mutation key format. Even a cold agent can tell what it does and how it differs from tools like explain or dry_run.

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?

It gives a concrete routing rule for the explain sibling ('call explain only when you need the full trace / when a value looks wrong'), and explains when to pass includeTraces:true. However, it does not contrast with other plausible alternatives such as dry_run (which presumably validates without applying) or patch_model. This is a clear-usage hint, but not an exhaustive when-not mapping, so a 4 rather than a 5.

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.