Skip to main content
Glama

create_field

Adds a database column and its Directus interface metadata to an existing collection. Use it for plain fields, create_relationship for relational ones, and update_field to modify a field that already exists.

Instructions

Adds a field to an existing collection: a database column plus its Directus interface metadata. Use create_relationship for relational fields, since this tool creates a plain column and no foreign key, and update_field for a field that already exists. The column is added immediately; on a non-empty table a required field without default_value can fail or leave existing rows invalid, so add it optional first and backfill. type is the Directus type (string, integer, boolean, dateTime, json, uuid and so on) while interface only affects how the admin app renders it. Returns the created 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>",
      "type": "<type>"
    },
    "name": "create_field"
  }
}

Input Schema

NameRequiredDescriptionDefault
noteNoField note
typeYesField 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.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false and openWorldHint=true, so the safety profile and mutating nature are known. The description adds genuinely useful context beyond that: the column is added immediately and a required field without default_value can fail or leave existing rows invalid on a non-empty table. It does not cover permissions or whether the change is reversible, so it is good but not fully transparent.

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 and the sibling routing are front-loaded and nothing is filler. The final sentence is overloaded, packing type-vs-interface semantics, the backfill warning and the return value into one run, which slightly hurts scannability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 10 parameters including nested objects (options, validation) and no output schema, the description does well on the creation semantics and the return value. It says nothing about the unique, validation or options parameters, which are the most complex parts of the schema, leaving an agent to infer their behavior entirely from terse schema labels.

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 real meaning: type is the Directus type with concrete examples (string, integer, dateTime, json, uuid), and interface only affects admin rendering. That distinction between type and interface is not conveyed by the schema's one-line 'Field type'/'Field interface' entries, though unique, validation and options are left to the schema.

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 ('Adds a field to an existing collection') plus what is actually created ('a database column plus its Directus interface metadata'). It also names the two siblings it is not (create_relationship, update_field), so an agent can separate it from neighbors without opening schemas.

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 alternatives: use create_relationship for relational fields because this tool creates no foreign key, and update_field for a field that already exists. It also gives operational guidance for the risky case (add required fields optional first, then backfill).

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