Skip to main content
Glama
nahmanmate

Better Auth MCP Server

by nahmanmate

generate_migration_plan

Create a step-by-step migration plan to transition from existing authentication systems to Better-Auth for enhanced security and management.

Instructions

Create step-by-step migration plan from existing auth to Better-Auth

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectPathYesPath to the project root
currentAuthTypeYesCurrent authentication system type

Implementation Reference

  • Handler for the 'generate_migration_plan' tool. Extracts 'projectPath' and 'currentAuthType' from arguments, logs the action, and returns a placeholder response indicating a migration plan has been generated.
    case "generate_migration_plan": {
      const { projectPath, currentAuthType } = request.params.arguments as {
        projectPath: string,
        currentAuthType: string
      };
      logger.info(`Generating migration plan for ${currentAuthType}`);
      // Implementation would create migration steps based on current auth
      return {
        content: [{
          type: "text",
          text: `Migration plan generated for ${currentAuthType}`
        }]
      };
    }
  • Input schema definition for the 'generate_migration_plan' tool, specifying 'projectPath' and 'currentAuthType' as required string properties.
    inputSchema: {
      type: "object",
      properties: {
        projectPath: {
          type: "string",
          description: "Path to the project root"
        },
        currentAuthType: {
          type: "string",
          description: "Current authentication system type",
          enum: ["auth.js", "next-auth"]
        }
      },
      required: ["projectPath", "currentAuthType"]
    }
  • src/index.ts:113-131 (registration)
    Registration of the 'generate_migration_plan' tool in the ListToolsRequestHandler response, including name, description, and input schema.
    {
      name: "generate_migration_plan",
      description: "Create step-by-step migration plan from existing auth to Better-Auth",
      inputSchema: {
        type: "object",
        properties: {
          projectPath: {
            type: "string",
            description: "Path to the project root"
          },
          currentAuthType: {
            type: "string",
            description: "Current authentication system type",
            enum: ["auth.js", "next-auth"]
          }
        },
        required: ["projectPath", "currentAuthType"]
      }
    },
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool creates a plan, implying a read-only or advisory operation, but doesn't clarify if it modifies files, requires specific permissions, has side effects, or details the output format (e.g., markdown, JSON). For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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, efficient sentence that front-loads the core purpose without unnecessary details. Every word earns its place, making it highly concise and well-structured for quick understanding.

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

Completeness3/5

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

Given the tool's complexity (migration planning with 2 parameters) and lack of annotations/output schema, the description is minimally adequate but incomplete. It covers the basic purpose but misses behavioral details, usage context, and output expectations, leaving the agent to infer too much. A score of 3 reflects this as the minimum viable level.

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 the schema already documents both parameters ('projectPath' and 'currentAuthType' with enum values). The description adds no additional meaning beyond what the schema provides, such as explaining how the path is used or what the auth types entail. Baseline 3 is appropriate when the 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 clearly states the action ('Create step-by-step migration plan') and target resource ('from existing auth to Better-Auth'), providing a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like 'analyze_current_auth' or 'setup_better_auth', which might have overlapping migration-related functions.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., should 'analyze_current_auth' be run first?), exclusions, or how it relates to siblings like 'setup_better_auth' (which might handle implementation vs. planning). Usage is implied but not explicitly stated.

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/nahmanmate/better-auth-mcp-server'

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