{
  "$schema": "https://ai.google.dev/api/rest/v1beta/Tool",
  "_doc": "Drop-in Gemini Function Declarations for migratelms.com. Pass the function_declarations array as `tools` in any Gemini generateContent / generate_content / Vertex AI call. The four tools mirror the MCP server at /api/mcp and the REST endpoints documented in /openapi.json — same single source of truth on the server side. Endpoints map at the bottom shows which REST URL each function_declaration wraps so developers know what to fetch when the model returns a tool call.",
  "_provider": {
    "name": "migratelms.com",
    "contact": "hello@migratelms.com",
    "openapi": "https://migratelms.com/openapi.json",
    "mcp_endpoint": "https://migratelms.com/api/mcp",
    "agent_guide": "https://migratelms.com/agents.txt"
  },
  "function_declarations": [
    {
      "name": "get_migration_quote",
      "description": "Estimate price, timeline, and tier for an LMS migration project. Source must be Thinkific or LearnWorlds; destination is one of the supported WordPress LMS plugins or Laravel applications. Returns a quote_id, tier (Starter / Professional / Enterprise), price range in USD, timeline in business days, and a Stripe payment link the user can visit to pay the deposit. No authentication required.",
      "parameters": {
        "type": "object",
        "required": ["source", "destination", "courses", "videos", "users"],
        "properties": {
          "source": {
            "type": "string",
            "enum": ["Thinkific", "LearnWorlds"],
            "description": "Source LMS platform to migrate from. Teachable and Kajabi are NOT supported because their APIs do not provide access to lesson-level content or video URLs."
          },
          "destination": {
            "type": "string",
            "enum": [
              "LearnDash",
              "LifterLMS",
              "Tutor LMS",
              "LearnPress",
              "Sensei LMS",
              "Academy LMS",
              "Edulab LMS",
              "Custom Laravel"
            ],
            "description": "Destination LMS. WordPress family: LearnDash, LifterLMS, Tutor LMS, LearnPress, Sensei LMS. Laravel family: Academy LMS, Edulab LMS, Custom Laravel."
          },
          "courses": {
            "type": "integer",
            "description": "Number of courses to migrate. Must be at least 1."
          },
          "videos": {
            "type": "integer",
            "description": "Approximate number of video lessons. Use 0 if there are no videos."
          },
          "users": {
            "type": "integer",
            "description": "Number of enrolled users to migrate. Use 0 if migrating content only."
          },
          "video_protection": {
            "type": "boolean",
            "description": "Whether to include S3 + CloudFront video-protection setup. Defaults to true."
          },
          "notes": {
            "type": "string",
            "description": "Any additional context for the quote (timeline constraints, custom requirements, etc.)."
          }
        }
      }
    },
    {
      "name": "create_checkout_session",
      "description": "Create a Stripe Checkout session for the deposit on a migration project. Returns a checkout_url the user can open to complete payment. Deposits are taken as 50% of the tier floor: Starter $750, Professional $1,500, Enterprise $2,500. The remaining balance is invoiced after staging approval. Surface the checkout_url to the user — do NOT attempt to enter card details on their behalf.",
      "parameters": {
        "type": "object",
        "required": ["tier", "email"],
        "properties": {
          "tier": {
            "type": "string",
            "enum": ["starter", "professional", "enterprise"],
            "description": "Migration tier — drives the deposit amount."
          },
          "email": {
            "type": "string",
            "description": "Buyer email — Stripe sends the receipt and the post-sale intake link here. Use the user's actual email, not a placeholder."
          },
          "source": {
            "type": "string",
            "description": "Source platform — stored on the Stripe session metadata for context."
          },
          "destination": {
            "type": "string",
            "description": "Destination platform — stored on the Stripe session metadata."
          }
        }
      }
    },
    {
      "name": "list_migration_paths",
      "description": "List every supported (source → destination) migration path with metadata: live/coming status, recommended pricing tier, deep links, and source-API technology. All filters are optional; pass none to get the full catalog. Use this when the user asks 'what do you migrate' or 'do you support X to Y'.",
      "parameters": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string",
            "description": "Filter by source platform (case-insensitive)."
          },
          "destination": {
            "type": "string",
            "description": "Filter by destination platform (case-insensitive)."
          },
          "status": {
            "type": "string",
            "enum": ["live", "coming"],
            "description": "Filter by availability."
          },
          "dest_type": {
            "type": "string",
            "enum": ["WordPress", "Laravel"],
            "description": "Filter by destination platform family."
          }
        }
      }
    },
    {
      "name": "get_status",
      "description": "Operational status: catalog summary, next available project start date, support hours and SLA, deployed worker version, and links to the public discovery surfaces. Useful as a health check before initiating a longer multi-tool workflow.",
      "parameters": {
        "type": "object",
        "properties": {}
      }
    }
  ],
  "endpoints": {
    "_doc": "When Gemini emits a function_call for one of the declarations above, dispatch to these REST endpoints. Same shape as the function arguments; same response as the OpenAPI schema documents.",
    "get_migration_quote": {
      "method": "POST",
      "url": "https://migratelms.com/api/quote",
      "content_type": "application/json"
    },
    "create_checkout_session": {
      "method": "POST",
      "url": "https://migratelms.com/api/checkout",
      "content_type": "application/json"
    },
    "list_migration_paths": {
      "method": "GET",
      "url": "https://migratelms.com/api/migrations",
      "query_params": ["source", "destination", "status", "dest_type"]
    },
    "get_status": {
      "method": "GET",
      "url": "https://migratelms.com/api/status"
    }
  },
  "usage_example_python": "from google import genai\nfrom google.genai import types\nimport json, urllib.request\n\nwith urllib.request.urlopen('https://migratelms.com/.well-known/gemini-tools.json') as r:\n    spec = json.load(r)\n\nclient = genai.Client()\nresponse = client.models.generate_content(\n    model='gemini-2.0-flash',\n    contents='Quote a Thinkific to LearnDash migration with 12 courses, 300 videos, 2000 users.',\n    config=types.GenerateContentConfig(\n        tools=[types.Tool(function_declarations=spec['function_declarations'])]\n    ),\n)\n# Then dispatch each function_call in response.candidates[0].content.parts to the matching endpoint."
}
