Skip to main content
Glama

Create collection

create_collection

Create a new PocketBase collection with a chosen name and type. Provide fields, API rules, indexes, view query, or auth options in the data payload.

Instructions

Create a new collection. Provide name and type ('base', 'auth' or 'view'). Use data for the rest of the collection payload: fields (array of field definitions), API rules (listRule, viewRule, createRule, updateRule, deleteRule — string or null), indexes (array of CREATE INDEX statements), viewQuery (for view collections), and auth options for auth collections. Tip: call get_collection_scaffolds first to see the expected shape. Example field: { "name": "title", "type": "text", "required": true }. IMPORTANT (PocketBase 0.23+): 'created'/'updated' timestamps are NOT added automatically — add them explicitly as autodate fields if you need them, e.g. { "name": "created", "type": "autodate", "onCreate": true } and { "name": "updated", "type": "autodate", "onCreate": true, "onUpdate": true }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNoRest of the collection payload (fields, rules, indexes, viewQuery, auth options...).
nameYesCollection name.
typeNoCollection type (default 'base').

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.0.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and discloses a non-obvious behavior: PocketBase 0.23+ does not add created/updated timestamps automatically, and shows exactly how to add them. It also explains how API rules and indexes are supplied. It could add error/conflict behavior, but the key behavioral caveat is covered.

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?

The description is dense but well-structured: the core instruction comes first, followed by the payload details, a usage tip, an example, and a highlighted compatibility caveat. No sentence is filler; the length is justified by the complexity of the payload.

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?

Given a nested-object payload and no output schema, the description covers the required name, the type enum with defaults, the data sub-payload, an example field, and auth/view specifics. It provides enough context for an agent to call the tool correctly without external lookup.

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%, but the description goes beyond the schema by elaborating the data object's subfields (fields, rules, indexes, viewQuery, auth options), giving a concrete field example, and explaining the timestamp workaround. This materially helps an agent construct a valid payload.

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 the specific action 'Create a new collection' and immediately distinguishes collection types (base/auth/view). The payload description clarifies this is about creating a collection, not records or other resources, which separates it from siblings like create_record and update_collection.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Clear that the tool is for new collections only, and the explicit tip to call get_collection_scaffolds first gives an actionable prerequisite. It does not explicitly mention when to prefer update_collection or import_collections, but the create-scoped context is unmistakable.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nestebe/pocketbase-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server