cms.directus | Version: 2.0.0 | Tools: 55
The cms.directus plugin is the primary data layer for all agent-driven writes in GenieHelper. It provides complete Directus 11 REST API coverage so the agent never needs raw fetch() calls to Directus — every operation is available as a named, schema-validated MCP tool.
Authentication
The plugin authenticates using a staticMCP_SERVICE_TOKEN Bearer header. No JWT refresh cycle is required — the service token is long-lived and scoped to the MCP service account. The token is loaded once from the environment by lib/services.mjs and passed to all plugin handlers.
Why 55 tools?
Directus 11 exposes a large surface area — items, users, files, flows, fields, relations, roles, policies, permissions, settings, server info, schema migrations, and audit logs. Before Sprint 5, the plugin covered only 17 tools (basic CRUD + users + files + flows). The expansion to 55 tools means:- The agent can introspect and mutate the schema without SSH access
- RBAC management (roles, policies, permissions) is fully automated
- Schema migrations can be diffed and applied programmatically
- Audit trails (
list-activity,list-revisions) are queryable - Flow lifecycle (create/update/delete) is fully managed
request flow operation is broken — it returns {} regardless of the target URL and payload. This is a known Directus 11 limitation. These MCP tools bypass that entirely by calling the Directus REST API directly.Known flow UUIDs
| Flow | UUID prefix |
|---|---|
| genie-memory-sync | 591a8845 |
| genie-taxonomy-tag | 7506f825 |
| genie-post-create | 50a4dc14 |
| genie-message-generate | a4f083fa |
trigger-flow with these UUIDs to invoke flows from agent context.
Tool reference
Items and collections
list-collections — list all custom collections
list-collections — list all custom collections
directus_* system tables.Returns an array of collection metadata objects including field count, schema info, and access policies.get-collection-schema — get field schema
get-collection-schema — get field schema
/fields/{collection}.Important: Always call this before using read-items with a ?fields= projection. Requesting a non-existent field returns HTTP 403 on the entire request, not a partial result.read-items — paginated collection query
read-items — paginated collection query
GET /items/{collection} endpoint.Supports the full Directus filter syntax: _eq, _in, _contains, _between, logical _and/_or operators.read-item — single item by UUID
read-item — single item by UUID
create-item — create with tier gate
create-item — create with tier gate
media_jobs are tier-gated via rateLimiter.js before insertion — the agent’s user_id field is checked against the creator’s subscription tier to enforce job quota limits.update-item — PATCH by UUID
update-item — PATCH by UUID
delete-item — DELETE by UUID
delete-item — DELETE by UUID
list-revisions to check revision history before deleting if needed.search-items — full-text search
search-items — full-text search
POST /items/{collection}/search endpoint.create-collection — create new collection
create-collection — create new collection
delete-collection — drop collection and data
delete-collection — drop collection and data
Fields and relations
list-fields
list-fields
create-field
create-field
update-field
update-field
delete-field
delete-field
list-relations
list-relations
create-relation
create-relation
delete-relation
delete-relation
Users and auth
get-me
get-me
list-users
list-users
get-user
get-user
create-user
create-user
update-user
update-user
delete-user
delete-user
invite-user
invite-user
Files
list-files
list-files
asset_url.get-file
get-file
asset_url pointing to DIRECTUS_URL/assets/{id} for direct media access.delete-file
delete-file
import-file
import-file
Flows and operations
list-flows
list-flows
trigger-flow.trigger-flow
trigger-flow
request flow operation is broken and returns {}.create-flow / update-flow / delete-flow
create-flow / update-flow / delete-flow
list-operations / create-operation
list-operations / create-operation
Roles, policies, and permissions
list-roles / get-role / create-role / update-role / delete-role
list-roles / get-role / create-role / update-role / delete-role
list-policies / get-policy
list-policies / get-policy
list-permissions / create-permission / update-permission / delete-permission
list-permissions / create-permission / update-permission / delete-permission
user_id=$CURRENT_USER for data isolation).Settings and server
get-settings / update-settings
get-settings / update-settings
server-health
server-health
GET /server/health — returns uptime and status of connected services (database, cache, storage).server-info
server-info
GET /server/info — returns Directus version, Node.js version, and OS details.Activity and revisions
list-activity
list-activity
list-revisions
list-revisions
Schema
get-schema-snapshot
get-schema-snapshot
diff-schema
diff-schema
apply-schema
apply-schema
Configuration
| Setting | Value |
|---|---|
| Auth | MCP_SERVICE_TOKEN Bearer |
| Base URL | http://127.0.0.1:8055 |
| Timeout | 10,000 ms |
| Concurrency | 10 parallel tool calls |