Skip to main content
Glama

view_policy

Retrieve details of an existing Lemonade insurance policy by providing your email address and policy ID to access coverage information and documents.

Instructions

View details of an existing Lemonade insurance policy

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
policy_idNoThe policy ID to retrieve
emailYesEmail address associated with the policy

Implementation Reference

  • The handler function that implements the logic for 'view_policy'.
    async function handleViewPolicy(args: {
      policy_id?: string;
      email: string;
    }): Promise<string> {
      return withBrowser(async (browser, page) => {
        await page.goto(`${LEMONADE_BASE_URL}/login`, {
          waitUntil: "domcontentloaded",
          timeout: 30000,
        });
        await page.waitForTimeout(1500);
    
        const title = await page.title();
    
        return JSON.stringify({
          status: "action_required",
          message:
            "To view your policy, you need to log in to your Lemonade account.",
          login_url: `${LEMONADE_BASE_URL}/login`,
          email: args.email,
          policy_id: args.policy_id || "Not provided",
          instructions: [
            `1. Visit ${LEMONADE_BASE_URL}/login`,
            `2. Sign in with your email: ${args.email}`,
            "3. Navigate to 'My Policy' to view your policy details",
            args.policy_id
              ? `4. Look for policy ID: ${args.policy_id}`
              : "4. Select your policy from the list",
          ],
          page_title: title,
        });
      });
    }
  • src/index.ts:42-56 (registration)
    Registration of the 'view_policy' tool with its input schema.
    {
      name: "view_policy",
      description: "View details of an existing Lemonade insurance policy",
      inputSchema: {
        type: "object",
        properties: {
          policy_id: {
            type: "string",
            description: "The policy ID to retrieve",
          },
          email: {
            type: "string",
            description: "Email address associated with the policy",
          },
        },

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