Skip to main content
Glama

create_collection

Creates a Directus collection as a real database table or grouping folder, optionally with initial fields, for organizing content or provisioning schema.

Instructions

Creates a collection, either a real database table or a grouping folder. A table gets an auto-increment integer id when no fields are passed; folder: true makes a grouping element, which has no schema and can hold neither items nor fields. Use create_field to add fields afterwards, apply_schema to provision several collections from a snapshot. The table is created immediately and is not rolled back when a later field in the same call fails. A fresh collection can take a moment to become readable: validate_collection_creation confirms it, refresh_collection_cache clears a stale cache. Returns the created collection.

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

Input Schema

NameRequiredDescriptionDefault
metaNoCollection metadata
fieldsNoInitial fields to create
folderNoCreate a grouping folder instead of a table. A folder has no schema, so it cannot hold items and fields cannot be added to it. Default: false.
collectionYesCollection name

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv12.3.3

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false), it discloses non-obvious behavior: auto-increment id assignment when no fields are passed, that a folder has no schema and holds no items or fields, that the table is created immediately and is NOT rolled back if a later field fails, and that a fresh collection may take a moment to become readable. That partial-failure and eventual-consistency disclosure is exactly what 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded and every sentence carries information, but the semicolon-chained clauses make it dense; the caching/validation sentence could be tightened without losing content.

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 mutating, nested-object tool with no output schema, it states return value ('Returns the created collection'), partial-failure behavior, folder limitations, and the follow-up tools needed to make the result usable. Nothing material 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 adds real meaning: the fields parameter drives auto-increment id behavior, and folder=true changes the object's semantics entirely (no schema, no items, no fields). It does not describe the meta parameter's contents, which keeps it below 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?

The first sentence gives a specific verb and resource and immediately splits the behavior into the two modes (real table vs. grouping folder), so an agent can distinguish it from siblings like create_field or apply_schema without opening the 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?

It hands off explicitly: create_field for adding fields afterwards, apply_schema for provisioning several collections from a snapshot, validate_collection_creation to confirm readability, refresh_collection_cache for stale caches. The only minor omission is a stated when-not-to-use case, but the alternatives are named with the conditions that select them.

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