Skip to main content
Glama

diagnose_collection_access

Read-only

Diagnose why a collection cannot be read or written with the current token by checking existence, active state, and item/field/relation permissions to identify the blocker. Read-only, production-safe.

Instructions

Explains why a collection cannot be read or written with the current token: whether it exists, whether it is active, whether the token holds item, field and relation permissions, and which of those is the blocker. Read-only and safe against production. Reach for it first when a tool returns an empty result or a forbidden error, before concluding the data is missing; validate_collection_schema covers a suspect schema and refresh_collection_cache a collection that was just created. Each include flag adds targeted probe requests against Directus.

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

Input Schema

NameRequiredDescriptionDefault
collectionYesCollection name to diagnose
includeFieldsNoInclude field access tests
includeRelationsNoInclude relation access tests
includePermissionsNoInclude permission checks

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv12.3.3

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so safety is partly pre-covered; the description reinforces it with 'Read-only and safe against production,' which is useful triage context. It adds genuine non-annotation information by disclosing that each include flag issues additional probe requests, warning of extra load/latency. It stops short of describing the response shape or any permission prerequisites for running the diagnosis itself.

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?

Front-loaded with the purpose and the blocker-identification outcome, then routing, then the probe-cost caveat — a logical order with no filler. The middle sentence is dense (two sibling routes packed into one clause), which slightly hurts scanability but wastes no words.

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?

There is no output schema, but the description conveys the return value conceptually — it reports whether the collection exists, is active, and which permission class is the blocker. Combined with clear routing to siblings and a warning about probe cost, an agent has everything needed to call this correctly for a 4-parameter, read-only diagnostic.

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 earns an increment by explaining the consequence of the include flags: they each 'add targeted probe requests against Directus,' implying additional cost rather than just filtering. That tells an agent to omit optional flags unless needed, which the schema's terse 'Include field access tests' does not.

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?

Opens with a specific verb and resource — 'Explains why a collection cannot be read or written with the current token' — and then enumerates the exact checks performed (existence, active state, item/field/relation permissions, and blocker identification). This is far more than a restatement of the name and lets an agent distinguish it from schema-validation or cache tools 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 explicit triggering conditions ('Reach for it first when a tool returns an empty result or a forbidden error, before concluding the data is missing') and names two alternatives with the conditions that select them: validate_collection_schema for a suspect schema, refresh_collection_cache for a just-created collection. Both when-to-use and when-not-to-use are covered.

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