Skip to main content
Glama

update_field

DestructiveIdempotent

Modify an existing Directus field's metadata or database schema, such as interface, validation, type, required, unique, or default value, and return the updated definition.

Instructions

Changes an existing field, either its Directus metadata (interface, note, validation, options) or its database schema (type, required, unique, default_value). Metadata changes are safe; a type change rewrites the column and can fail or lose precision on existing data, and turning on required or unique fails on rows that already violate it. Idempotent: the same body applied twice leaves the same result. Use create_field to add a field, delete_field to remove one, and update_field with a hidden interface to retire a field without destroying data. Returns the updated field definition.

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>",
      "field": "<field>"
    },
    "name": "update_field"
  }
}

Input Schema

NameRequiredDescriptionDefault
noteNoField note
typeNoField type
fieldYesField name
uniqueNoIs field unique
optionsNoInterface options
requiredNoIs field required
interfaceNoField interface
collectionYesCollection name
validationNoValidation rules
default_valueNoDefault value

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 already declare destructiveHint=true and idempotentHint=true, but the description specifies exactly what is destroyed and when: a type change rewrites the column and can fail or lose precision, and enabling required/unique fails on already-violating rows. Calling out that metadata changes are safe while schema changes are not is precisely the behavioral context annotations cannot convey.

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?

Front-loaded with what the tool does, then risk, then siblings, then return value — a logical order with no filler. The idempotency sentence partially repeats an annotation, but it adds the clarifying condition ("the same body applied twice"), so it still earns its place.

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?

With 10 parameters, a nested object, and no output schema, the description covers the risk profile, the retirement alternative, and the return value ("the updated field definition"). Nothing an agent needs to call it safely or interpret the result 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; the description earns above that by grouping parameters into a safe metadata set (interface, note, validation, options) and a risky schema set (type, required, unique, default_value), which conveys risk semantics rather than just repeating names. It stops short of explaining formats for nested `options` or `validation`, but that is a minor gap given full schema coverage.

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 ("Changes an existing field") and immediately splits the operation into its two concrete modes: Directus metadata versus database schema, naming the fields belonging to each. That framing lets an agent distinguish update_field from create_field and delete_field 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?

Explicitly routes to siblings: create_field to add, delete_field to remove, and a non-obvious third path (update_field with a hidden interface to retire a field without data loss). It also gives the when-not condition implicitly via the risk callouts for type/required/unique changes.

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