import_data
Import multiple records into a PocketBase collection using the Model Context Protocol, with options to create, update, or upsert data for efficient database management.
Instructions
Import data into a collection
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| collection | Yes | Collection name | |
| data | Yes | Array of records to import | |
| mode | No | Import mode (default: create) |
Implementation Reference
- src/index.ts:608-633 (registration)Registration of the 'import_data' tool in the listTools response. Includes name, description, and input schema. Note: No corresponding handler in the CallToolRequestSchema 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'], }, },
- src/index.ts:611-631 (schema)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:695-695 (handler)No specific handler for 'import_data'; falls to default case in CallToolRequestSchema handler, throwing MethodNotFound error.default: