Skip to main content
Glama
LexiconAlex

Better Auth MCP Server

by LexiconAlex

generate_migration_plan

Create a step-by-step migration plan to transition from existing authentication systems like auth.js or next-auth to Better-Auth's enterprise-grade solution.

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

  • The switch case handler that executes the generate_migration_plan tool: extracts projectPath and currentAuthType, logs the action, and returns a text response with a placeholder migration plan.
    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 for the generate_migration_plan tool, defining required parameters: projectPath (string) and currentAuthType (string enum: auth.js or next-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"]
    }
  • src/index.ts:113-131 (registration)
    Tool registration in the ListTools response, including name, description, and input schema for generate_migration_plan.
    {
      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?

With no annotations provided, 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 output format (e.g., markdown, JSON). For a tool with zero annotation coverage, this is a significant gap in transparency.

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 action ('Create step-by-step migration plan') and specifies the context ('from existing auth to Better-Auth'). There is zero waste or redundancy, 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.

Completeness2/5

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

Given the complexity of migration planning, no annotations, and no output schema, the description is incomplete. It doesn't address behavioral aspects (e.g., whether it generates code snippets or just documentation), output details, or integration with sibling tools. This leaves gaps for an AI agent to understand the tool's full context and usage.

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%, with both parameters well-documented in the schema ('projectPath' and 'currentAuthType' with enum values). The description adds no additional parameter semantics beyond what the schema provides, such as format examples for 'projectPath' or implications of 'currentAuthType' choices. 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 verb ('Create') and resource ('step-by-step migration plan') with the specific context ('from existing auth to Better-Auth'). It distinguishes from siblings like 'analyze_current_auth' or 'setup_better_auth' by focusing on planning rather than analysis or implementation. However, it doesn't explicitly differentiate from all siblings (e.g., 'monitor_auth_flows' or 'test_auth_flows'), keeping it at a 4 rather than a 5.

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 (e.g., not for non-migration scenarios), or comparisons to siblings like 'setup_better_auth' (which might handle implementation). This lack of contextual usage information limits its effectiveness for an AI agent.

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

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