Skip to main content
Glama
mrwyndham

PocketBase MCP Server

import_data

Import data records into a PocketBase collection using create, update, or upsert modes to manage database content.

Instructions

Import data into a collection

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
collectionYesCollection name
dataYesArray of records to import
modeNoImport mode (default: create)

Implementation Reference

  • Input schema for the 'import_data' tool, defining parameters: collection (string), data (array of objects), mode (enum: create/update/upsert).
    inputSchema: {
      type: 'object',
      properties: {
        collection: {
          type: 'string',
          description: 'Collection name',
        },
        data: {
          type: 'array',
          description: 'Array of records to import',
          items: {
            type: 'object',
          },
        },
        mode: {
          type: 'string',
          enum: ['create', 'update', 'upsert'],
          description: 'Import mode (default: create)',
        },
      },
      required: ['collection', 'data'],
    },
  • src/index.ts:608-633 (registration)
    Registration of the 'import_data' tool in the MCP server's tools list via setCallToolHandler. Includes name, description, and inputSchema. No corresponding handler method found in the switch statement.
    {
      name: 'import_data',
      description: 'Import data into a collection',
      inputSchema: {
        type: 'object',
        properties: {
          collection: {
            type: 'string',
            description: 'Collection name',
          },
          data: {
            type: 'array',
            description: 'Array of records to import',
            items: {
              type: 'object',
            },
          },
          mode: {
            type: 'string',
            enum: ['create', 'update', 'upsert'],
            description: 'Import mode (default: create)',
          },
        },
        required: ['collection', 'data'],
      },
    },
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 'import' which implies a write/mutation operation, but doesn't disclose behavioral traits like permissions needed, whether it overwrites existing data, error handling, rate limits, or what happens on partial failures. For a mutation tool with zero annotation coverage, this is inadequate.

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?

Extremely concise with a single sentence that directly states the tool's purpose. No wasted words or redundant information. Perfectly front-loaded with the core action.

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

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with 3 parameters, no annotations, and no output schema, the description is insufficient. It doesn't cover important contextual aspects like what the tool returns, error conditions, side effects, or how it differs from similar tools. The agent would struggle to use this effectively without trial and error.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so parameters are fully documented in the schema. The description adds no additional meaning about parameters beyond the basic action. It doesn't explain the implications of different 'mode' values or provide examples of data format. Baseline 3 is appropriate when schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Import data into a collection' clearly states the action (import) and target resource (collection), distinguishing it from sibling tools like create_record or update_record which handle individual records. However, it doesn't specify what type of data or format, leaving some ambiguity compared to more specific alternatives.

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

Usage Guidelines2/5

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

No explicit guidance on when to use this tool versus alternatives like create_record, update_record, or create_collection. The description implies bulk operations but doesn't clarify prerequisites, constraints, or comparative advantages over sibling tools.

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

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