Skip to main content
Glama

update_coverage

Modify insurance coverage details on existing Lemonade policies by adjusting coverage amounts, deductibles, or add-ons to align with changing protection needs.

Instructions

Update coverage on an existing Lemonade insurance policy

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
policy_idYesThe policy ID to update
coverage_changesYesObject describing the coverage changes to make

Implementation Reference

  • The handler function that implements the logic for updating coverage on a policy.
    async function handleUpdateCoverage(args: {
      policy_id: string;
      coverage_changes: {
        coverage_amount?: number;
        deductible?: number;
        add_ons?: string[];
      };
    }): Promise<string> {
      return withBrowser(async (browser, page) => {
        await page.goto(`${LEMONADE_BASE_URL}/login`, {
          waitUntil: "domcontentloaded",
          timeout: 30000,
        });
        await page.waitForTimeout(1500);
    
        const changes = [];
        if (args.coverage_changes.coverage_amount) {
          changes.push(
            `Coverage amount: $${args.coverage_changes.coverage_amount}`
          );
        }
        if (args.coverage_changes.deductible) {
          changes.push(`Deductible: $${args.coverage_changes.deductible}`);
        }
        if (
          args.coverage_changes.add_ons &&
          args.coverage_changes.add_ons.length > 0
        ) {
          changes.push(`Add-ons: ${args.coverage_changes.add_ons.join(", ")}`);
        }
    
        return JSON.stringify({
          status: "action_required",
          message: "Coverage updates require authentication.",
          policy_id: args.policy_id,
          requested_changes: changes,
          instructions: [
            `1. Visit ${LEMONADE_BASE_URL}/login`,
            "2. Sign in to your account",
            "3. Go to 'My Policy' > 'Edit Coverage'",
            `4. Select policy: ${args.policy_id}`,
            "5. Make the following changes:",
            ...changes.map((c) => `   - ${c}`),
            "6. Review and confirm the changes",
            "Note: Coverage changes may affect your premium.",
          ],
        });
      });
    }
    
    async function handleGetDocuments(args: {
      policy_id: string;
      document_type?: string;
  • src/index.ts:108-126 (registration)
    MCP tool registration for update_coverage.
    {
      name: "update_coverage",
      description: "Update coverage on an existing Lemonade insurance policy",
      inputSchema: {
        type: "object",
        properties: {
          policy_id: {
            type: "string",
            description: "The policy ID to update",
          },
          coverage_changes: {
            type: "object",
            description: "Object describing the coverage changes to make",
            properties: {
              coverage_amount: {
                type: "number",
                description: "New coverage amount in dollars",
              },
              deductible: {

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/markswendsen-code/mcp-lemonade'

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