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
| Name | Required | Description | Default |
|---|---|---|---|
| policy_id | Yes | The policy ID to update | |
| coverage_changes | Yes | Object describing the coverage changes to make |
Implementation Reference
- src/index.ts:373-425 (handler)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: {