Skip to main content
Glama

analyze_collection_schema

Read-only

Inspect one collection's fields, types, and constraints, optionally including relationships and schema problems, to guide querying or extending it. Read-only.

Instructions

Inspects one collection and reports its fields with types and constraints, optionally mapped against its relationships and checked for schema problems. Use it when deciding how to query or extend a collection; get_collection_schema returns the raw field list alone, validate_collection_schema returns only the problems, analyze_relationships gives the cross-collection view. Read-only. includeRelations adds inbound and outbound relations and validateConstraints adds constraint findings; each costs extra requests against Directus, so leave them off for a quick look.

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": "analyze_collection_schema"
  }
}

Input Schema

NameRequiredDescriptionDefault
collectionYesCollection name
includeRelationsNoInclude relationship analysis
validateConstraintsNoValidate schema constraints

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv12.3.3

TDQS

A4.5/5.0
Behavior4/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' line is redundant, but it adds real context annotations do not carry: the two optional flags each incur extra requests against Directus. That cost signal is exactly the kind of behavioral detail an agent needs before enabling flags. It stops short of describing the shape of the findings or any pagination/limits behavior.

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?

Two sentences, front-loaded with the core behavior followed by sibling differentiation and then flag trade-offs. Dense but every clause carries load; the only waste is the 'Read-only' phrase already covered by annotations.

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

Completeness4/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 does state what comes back (fields with types and constraints, optionally relations and problems), which is the key missing piece. For a 3-parameter read-only inspection tool this is close to complete; only the format of the findings report is unspecified.

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 explaining what each flag actually produces (inbound and outbound relations vs. constraint findings) and what it costs, which the one-line schema descriptions ('Include relationship analysis') do not convey. The required 'collection' parameter is left to the schema, which is fine given full 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 ('Inspects one collection and reports its fields with types and constraints') and immediately scopes the optional behaviors. It explicitly separates itself from three named siblings by describing what each of those returns instead, so an agent can pick correctly 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?

Gives an explicit when-to-use condition ('deciding how to query or extend a collection') plus a direct routing table: get_collection_schema for the raw field list, validate_collection_schema for problems only, analyze_relationships for the cross-collection view. It also states when to leave the flags off ('for a quick look'), covering both use and non-use.

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