file_claim
Submit insurance claims to Lemonade by providing policy details, incident information, and estimated loss amounts for processing.
Instructions
File a new insurance claim with Lemonade
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| policy_id | Yes | The policy ID for which to file the claim | |
| claim_type | Yes | Type of claim (e.g., theft, damage, medical) | |
| description | Yes | Detailed description of the incident | |
| incident_date | Yes | Date of the incident (YYYY-MM-DD format) | |
| estimated_loss | No | Estimated loss amount in dollars |
Implementation Reference
- src/index.ts:296-342 (handler)The handler function that implements the logic for 'file_claim' by providing navigation instructions and capturing claim details.
async function handleFileClaim(args: { policy_id: string; claim_type: string; description: string; incident_date: string; estimated_loss?: number; }): Promise<string> { return withBrowser(async (browser, page) => { await page.goto(`${LEMONADE_BASE_URL}/claims`, { waitUntil: "domcontentloaded", timeout: 30000, }); await page.waitForTimeout(1500); const title = await page.title(); return JSON.stringify({ status: "action_required", message: "Claim filing requires authentication. Please use the Lemonade app or website.", claims_url: `${LEMONADE_BASE_URL}/claims`, claim_details: { policy_id: args.policy_id, claim_type: args.claim_type, description: args.description, incident_date: args.incident_date, estimated_loss: args.estimated_loss ? `$${args.estimated_loss}` : "Not provided", }, instructions: [ "Option 1 - Lemonade App (Recommended):", " 1. Open the Lemonade app on your phone", " 2. Tap 'File a Claim'", " 3. Follow the AI-guided claims process", "", "Option 2 - Website:", ` 1. Visit ${LEMONADE_BASE_URL}/claims`, " 2. Sign in to your account", " 3. Click 'File a Claim'", ` 4. Select policy: ${args.policy_id}`, ` 5. Describe the incident: ${args.description}`, ` 6. Incident date: ${args.incident_date}`, ], page_title: title, }); }); } - src/index.ts:61-89 (schema)The schema definition for the 'file_claim' tool.
name: "file_claim", description: "File a new insurance claim with Lemonade", inputSchema: { type: "object", properties: { policy_id: { type: "string", description: "The policy ID for which to file the claim", }, claim_type: { type: "string", description: "Type of claim (e.g., theft, damage, medical)", }, description: { type: "string", description: "Detailed description of the incident", }, incident_date: { type: "string", description: "Date of the incident (YYYY-MM-DD format)", }, estimated_loss: { type: "number", description: "Estimated loss amount in dollars", }, }, required: ["policy_id", "claim_type", "description", "incident_date"], }, }, - src/index.ts:550-552 (registration)Registration of 'file_claim' within the tool handler's switch statement.
case "file_claim": result = await handleFileClaim(args as Parameters<typeof handleFileClaim>[0]); break;