Skip to main content
Glama

context_update

DestructiveIdempotent

Update a saved project context record's text, kind, tags, delivery, or expiry with revision-safe compare-and-swap; only passed fields change and conflicts prompt a re-read.

Instructions

Change a saved context record of the current project: its text, kind, tags, delivery or expiry. Only the fields you pass change; an empty string clears review_after, expires_at or superseded_by. Get context_id and the current revision from context_list; the update fails with revision_conflict if the record changed since, so read it again and retry. To retire a record in favour of a newer one, set superseded_by to the replacement's id.

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": {
      "context_id": "<context_id>",
      "expected_revision": "<expected_revision>"
    },
    "name": "context_update"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyNoOptional replacement body.
kindNoOptional replacement kind: note, decision, instruction, or constraint.
tagsNoOptional replacement tags.
scopeNoOptional replacement instruction scope.
titleNoOptional replacement title; must not be blank when provided.
sourceNoOptional replacement source: user, agent, or import.
deliveryNoOptional replacement delivery mode: always, ranked, or manual.
priorityNoOptional replacement instruction priority.
context_idYesCanonical UUIDv7 context record identifier.
expires_atNoOptional replacement RFC3339 expiry timestamp; empty clears it.
visibilityNoOptional replacement visibility: shared or local_only.
sensitivityNoOptional replacement sensitivity: normal or private.
review_afterNoOptional replacement RFC3339 review timestamp; empty clears it.
superseded_byNoOptional replacement UUIDv7; empty clears it.
expected_revisionYesPositive current context revision required for compare-and-swap.

Output Schema

NameRequiredDescriptionDefault
errorNo
contextNo
schema_versionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations declare a destructive, idempotent mutation, and the description adds real context beyond that: partial-update semantics (only passed fields change), the empty-string clearing convention for review_after, expires_at and superseded_by, and the optimistic-concurrency failure mode. That explains exactly how the destructive capability manifests and how to recover from it.

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?

Four tight sentences, front-loaded with the mutation scope, then the field semantics, then the revision protocol, then the supersede workflow. No filler or restated boilerplate.

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 a 15-parameter mutation tool with an output schema already documenting returns, the description covers the remaining agent-critical facts: partial-update behavior, clearing syntax, the compare-and-swap failure mode, and record retirement. Field-level detail lives in the fully covered schema, so 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%, so the baseline is 3, but the description goes further by explaining that omitted fields are untouched and that empty strings clear the three nullable timestamp/link fields — a convention the schema only partially documents. It does not cover the semantics of the remaining fields (priority, visibility, sensitivity), hence 4 rather than 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?

States a specific verb and resource (change a saved context record of the current project) and enumerates the affected fields, while naming context_list as the sibling that supplies the identifiers. An agent can distinguish this from context_add and context_list 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 Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit workflow: fetch context_id and current revision from context_list, and on revision_conflict re-read and retry. It also names the concrete alternative path for retiring a record (set superseded_by to the replacement's id), so the when-and-how is fully specified.

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