Skip to main content
Glama

update_item

DestructiveIdempotent

Updates selected fields of a single Directus item by primary key while leaving omitted fields unchanged; pass a draft version for versioned collections.

Instructions

Updates fields of one item by primary key and leaves fields absent from data untouched: a PATCH, not a replace. Use create_item for a new row, bulk_operations for many rows, delete_items to remove them. In versioned collections the published item is read-only, so pass version with a draft key to write into a draft; without it Directus refuses the write. Overwrites whatever the field held, so read it with get_collection_items first when the previous value matters. Returns the updated item.

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": {
      "collection": "<collection>",
      "id": "<id>",
      "data": "<data>"
    },
    "name": "update_item"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesItem ID
dataYesUpdated data
versionNoDraft version key to write into. Published items in versioned collections cannot be edited directly.
collectionYesCollection name

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv12.3.3

TDQS

A4.9/5.0
Behavior5/5

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

Annotations declare the safety profile (destructiveHint true, idempotentHint true, openWorldHint true), and the description adds real context beyond that: PATCH rather than replace semantics, published items being read-only in versioned collections, Directus refusing the write without a version key, and the fact that field values are overwritten. It also notes the return value, which matters with no output schema.

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 sentences, no filler, and the most decision-relevant facts come first: what it does, how it differs from a replace, and which siblings to use instead. The conditional caveats are packed into the trailing clauses rather than padded out.

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?

Covers everything an agent needs to call this correctly: partial-update semantics, the draft-version prerequisite and failure mode, the destructive overwrite risk with a mitigation, and the return value in lieu of an output schema. Nothing material is left to inference for a four-parameter mutation tool.

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 baseline is 3, but the description adds meaning the schema lacks: the version key is not merely 'a draft version key' but is required to write at all in versioned collections, and the data object is defined as a partial patch whose absent fields survive. That is genuine semantic lift over the structured fields.

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, resource, and key semantics: 'Updates fields of one item by primary key and leaves fields absent from data untouched: a PATCH, not a replace.' It also names the siblings it is not (create_item, bulk_operations, delete_items), so an agent can separate it from lookalikes without opening any 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 explicit when-to-use routing ('Use create_item for a new row, bulk_operations for many rows, delete_items to remove them'), plus two conditional rules: pass version with a draft key in versioned collections, and read with get_collection_items first when the previous value matters. Alternatives and exclusions are both covered.

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