Skip to main content
Glama

PocketBase MCP Server

by fadlee
MIT License
0

create_collection

Create a new collection in PocketBase with defined fields, access rules, and configuration options for organizing database records.

Instructions

Create a new collection in PocketBase

Input Schema

NameRequiredDescriptionDefault
createRuleNoRule for creating records
deleteRuleNoRule for deleting records
fieldsYesCollection fields configuration
indexesNoCollection indexes
listRuleNoRule for listing records
nameYesCollection name
passwordAuthNoPassword authentication settings for auth collections
typeNoCollection type (base, auth, view)base
updateRuleNoRule for updating records
viewQueryNoSQL query for view collections
viewRuleNoRule for viewing records

Input Schema (JSON Schema)

{ "properties": { "createRule": { "description": "Rule for creating records", "type": "string" }, "deleteRule": { "description": "Rule for deleting records", "type": "string" }, "fields": { "description": "Collection fields configuration", "items": { "properties": { "autogeneratePattern": { "description": "Pattern for autogenerating field values (for text fields)", "type": "string" }, "cascadeDelete": { "description": "Whether to delete related records when the parent is deleted", "type": "boolean" }, "collectionId": { "description": "Target collection ID for relation fields", "type": "string" }, "hidden": { "description": "Whether the field is hidden in the UI", "type": "boolean" }, "id": { "description": "Unique identifier for the field", "type": "string" }, "max": { "description": "Maximum text length or numeric value", "type": "number" }, "maxSelect": { "description": "Maximum number of relations or select options (1 for single relation, > 1 for multiple)", "type": "number" }, "min": { "description": "Minimum text length or numeric value", "type": "number" }, "name": { "description": "Field name", "type": "string" }, "onCreate": { "description": "Whether to set date on record creation (for autodate fields)", "type": "boolean" }, "onUpdate": { "description": "Whether to update date on record update (for autodate fields)", "type": "boolean" }, "pattern": { "description": "Validation regex pattern for text fields", "type": "string" }, "presentable": { "description": "Whether the field can be used as a presentable field in the UI", "type": "boolean" }, "required": { "description": "Whether the field is required", "type": "boolean" }, "system": { "description": "Whether this is a system field", "type": "boolean" }, "type": { "description": "Field type", "enum": [ "text", "number", "bool", "email", "url", "date", "select", "relation", "file", "json", "editor", "autodate" ], "type": "string" }, "unique": { "description": "Whether the field should have unique values", "type": "boolean" }, "values": { "description": "Predefined values for select fields (direct property)", "items": { "type": "string" }, "type": "array" } }, "required": [ "name", "type" ], "type": "object" }, "type": "array" }, "indexes": { "description": "Collection indexes", "items": { "type": "string" }, "type": "array" }, "listRule": { "description": "Rule for listing records", "type": "string" }, "name": { "description": "Collection name", "type": "string" }, "passwordAuth": { "description": "Password authentication settings for auth collections", "properties": { "enabled": { "type": "boolean" }, "identityFields": { "items": { "type": "string" }, "type": "array" } }, "type": "object" }, "type": { "default": "base", "description": "Collection type (base, auth, view)", "enum": [ "base", "auth", "view" ], "type": "string" }, "updateRule": { "description": "Rule for updating records", "type": "string" }, "viewQuery": { "description": "SQL query for view collections", "type": "string" }, "viewRule": { "description": "Rule for viewing records", "type": "string" } }, "required": [ "name", "fields" ], "type": "object" }

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/fadlee/pocketbase-mcp'

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