Skip to main content
Glama

list_migrations

Identify and display all migration files in the PocketBase migrations directory, enabling users to track and manage database schema updates efficiently using the MCP server.

Instructions

List all migration files found in the PocketBase migrations directory.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that executes the list_migrations tool, calling listMigrations() and formatting the result.
    async function handleListMigrations(args: ListMigrationsArgs): Promise<ToolResult> { const files = await listMigrations(); if (files.length === 0) { return { content: [{ type: 'text', text: 'No migration files found.' }] }; } return { content: [{ type: 'text', text: `Found migration files:\n${files.join('\n')}` }], }; }
  • Type definition for the input arguments of list_migrations (no arguments required).
    interface ListMigrationsArgs {} // No arguments
  • Tool registration including name, description, and input schema.
    name: 'list_migrations', description: 'List all migration files found in the PocketBase migrations directory.', inputSchema: { type: 'object', properties: {}, additionalProperties: false, }, },
  • Top-level tool registration including migration tools.
    export function registerTools(): { tools: ToolInfo[] } { // Use ToolInfo[] const tools: ToolInfo[] = [ // Use ToolInfo[] ...listRecordTools(), ...listCollectionTools(), ...listFileTools(), ...listMigrationTools(), // Uncommented ...listLogTools(), // Add log tools ...listCronTools(), // Add cron tools ]; return { tools }; }
  • Helper function that lists migration files, called by the handler.
    export async function listMigrations(): Promise<string[]> { return helpers.listMigrationFiles(); }

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