Skip to main content
Glama

correct

Create a priority-1000 correction observation to override lower-priority extracted fields. A correction stays authoritative on its field, whatever the field's merge rule and whatever the priority or source kind of any other write, until a…

Instructions

Create a priority-1000 correction observation to override lower-priority extracted fields. A correction stays authoritative on its field, whatever the field's merge rule and whatever the priority or source kind of any other write, until a later correction replaces it; among corrections the later one wins by deterministic recency, and on a merge_array field it replaces the whole array (merge_array_by_key fields excepted: corrections combine by key). Read back the entity snapshot and field provenance before claiming the correction took effect. On a merge_array field send the complete list you want, not just the change (pass [] to clear it, and expected_version if another writer may change it concurrently).

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": {
      "entity_id": "<entity_id>",
      "entity_type": "<entity_type>",
      "field": "<field>",
      "value": "<value>",
      "idempotency_key": "<idempotency_key>"
    },
    "name": "correct"
  }
}

Input Schema

NameRequiredDescriptionDefault
fieldYesField name to correct
valueYesCorrected value
user_idNoOptional. Inferred from authentication if omitted.
entity_idYesEntity ID to correct
overwriteNoApply even when expected_version is stale. Ignored when it is omitted.
entity_typeYesEntity type
idempotency_keyYesRequired. Client-provided idempotency key for replay-safe corrections.
expected_versionNoOptional opaque entity_version from a current entity read. A stale token returns ERR_FIELD_VERSION_CONFLICT and writes nothing.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.25.0
    • addedInput schema / properties / expected_version
      Added value: +{
      +  "description": "Optional opaque entity_version from a current entity read. A stale token returns ERR_FIELD_VERSION_CONFLICT and writes nothing.",
      +  "type": "string"
      +}
    • addedInput schema / properties / overwrite
      Added value: +{
      +  "description": "Apply even when expected_version is stale. Ignored when it is omitted.",
      +  "type": "boolean"
      +}
  2. Addedv0.15.0
  3. Removedv0.14.0
  4. Addedv0.12.1
  5. Removedv0.11.0
  6. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and succeeds: it explains precedence (authoritative until a later correction replaces it), tie-breaking by deterministic recency, merge_array full-array replacement versus merge_array_by_key key-wise combining, and the read-back verification step. This is exactly the behavioral context an agent needs before mutating data.

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 is front-loaded and every clause carries information — no filler. The dense semicolon-and-parenthetical chaining of precedence rules, array semantics, and verification guidance makes it slightly harder to scan than a cleanly segmented version would be.

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?

For an 8-parameter mutation tool with no annotations and no output schema, the description covers precedence, array handling, concurrency, and verification well. Gaps remain around idempotency replay behavior and what the correction response contains, though the read-back instruction partially compensates for the missing output schema.

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 exceeds it by explaining that `value` on an array field must be the complete desired list (and [] clears it) and that `expected_version` is for concurrent-writer protection. It does not add semantics for `overwrite` or `idempotency_key` beyond the schema, so not a 5.

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?

Opens with a specific verb and resource ("Create a priority-1000 correction observation") and immediately scopes its role: overriding lower-priority extracted fields. The precedence contrast with other writes makes it distinguishable from other write paths without opening a schema.

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 clear conditional guidance: send the complete list on merge_array fields, pass [] to clear, supply expected_version when concurrent writers may exist, and read back the entity snapshot before claiming success. Lacks an explicit when-not-to-use or a named alternative (e.g. transaction-style correction), which keeps it from a 5.

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