Skip to main content
Glama

get_schema_snapshot

Read-only

Exports the Directus data model as a snapshot for schema diffing, backups, environment migration, or git versioning. Use it to capture collections, fields, and relations before destructive changes.

Instructions

Exports the data model (collections, fields and relations, with no item data) as a snapshot object that diff_schema and apply_schema accept. Use it to back up the model before a destructive change, to move a model between environments, or to version it in git. Read-only. include_collections and exclude_collections are mutually exclusive and produce a partial snapshot, which on apply can read as a request to delete everything left out, so prefer a full snapshot for migrations.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_schema_snapshot"
  }
}

Input Schema

NameRequiredDescriptionDefault
exclude_collectionsNoExclude these collections. Mutually exclusive with include_collections.
include_collectionsNoRestrict the snapshot to these collections. Mutually exclusive with exclude_collections.

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 readOnlyHint=true, so the description's "Read-only" is consistent rather than additive; the real value is disclosure that no item data is included and that a partial snapshot can be interpreted on apply as a request to delete everything omitted. That downstream deletion hazard is precisely the kind of consequence an agent could not infer from annotations or 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?

Three sentences, front-loaded with what the tool produces, then consumers, then use cases, then the one caveat that matters. No filler and no restatement of the name or title; the final warning is placed where it will be read before the parameters are filled in.

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 no output schema, the description still specifies the snapshot's contents (collections, fields, relations, no item data) and which tools accept it, which is enough for correct invocation. Combined with the partial-snapshot warning and the readOnly annotation, nothing an agent needs to call this safely 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% and the schema already states the mutual exclusivity of include_collections and exclude_collections, so the description earns credit mainly for the consequence: a partial snapshot is a destructive instruction on apply. It stops short of describing what a fully empty or unknown-name collection list does, leaving a small gap beyond the schema baseline of 3.

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?

"Exports the data model (collections, fields and relations, with no item data) as a snapshot object" names a specific verb, resource, and exact scope. It also distinguishes itself from diff_schema and apply_schema by naming them as consumers rather than alternatives, so an agent can tell which tool produces versus consumes the snapshot.

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?

Three concrete use cases are given — backup before a destructive change, moving a model between environments, and versioning in git — plus an explicit preference ("prefer a full snapshot for migrations") that resolves the main decision an agent faces. Alternatives for applying and diffing are named rather than left to inference.

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