Skip to main content
Glama
mabeldata

PocketBase MCP Server

by mabeldata

list_collections

Retrieve a list of all collections in your PocketBase instance to view schema structure and manage data tables.

Instructions

List all collections in the PocketBase instance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The actual implementation of the list_collections tool: calls pb.collections.getFullList() and returns the result as JSON text.
    async function listCollections(args: ListCollectionsArgs, pb: PocketBase): Promise<ToolResult> {
        // Args are ignored for this tool
        const result = await pb.collections.getFullList({ sort: '-created' });
        return {
            content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
        };
    }
  • Input schema definition for list_collections: tool name, description, and an empty inputSchema (no arguments needed).
    {
        name: 'list_collections',
        description: 'List all collections in the PocketBase instance.',
        inputSchema: {
            type: 'object',
            properties: {}, // No arguments needed
            additionalProperties: false,
        },
    },
  • Routing logic inside handleCollectionToolCall that dispatches to listCollections for the 'list_collections' case.
    case 'list_collections':
        // No args expected for list_collections, but pass anyway for consistency
        return listCollections(args as ListCollectionsArgs, pb);
  • Registration in the main tool router: routes 'list_collections' to handleCollectionToolCall.
    if (name === 'fetch_record' || name === 'list_records' || name === 'create_record' || name === 'update_record') {
        return handleRecordToolCall(name, toolArgs, pb);
    } else if (name === 'get_collection_schema' || name === 'list_collections') {
        return handleCollectionToolCall(name, toolArgs, pb);
  • TypeScript type definition for ListCollectionsArgs, an empty interface (no arguments).
    export interface ListCollectionsArgs {} // No arguments
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states the operation is a list, implying read-only, but does not mention any behavioral traits such as safety, performance, or pagination beyond the obvious.

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 a single sentence that is direct and contains no wasted words. It is appropriately sized for the tool's simplicity.

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?

Given the tool is a simple list with no parameters and no output schema, the description is fairly complete. It clearly states what the tool does, though it could optionally mention response format.

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?

The input schema has zero parameters, so there is nothing to describe. The description does not add parameter semantics, but the baseline for zero parameters is 4 as schema coverage is trivially 100%.

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?

The description clearly states the tool lists all collections in the PocketBase instance. It uses a specific verb 'List' and resource 'collections', and it is distinct from sibling tools like 'get_collection_schema' which targets a single collection.

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

Usage Guidelines3/5

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

The description does not provide any guidance on when to use this tool versus alternatives. It implicitly suggests usage for retrieving all collections but lacks explicit exclusions or context compared to siblings.

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

Install Server

Other Tools

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

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