Skip to main content
Glama

get_quote

Obtain insurance quotes for renters, homeowners, pet, or car coverage by providing your ZIP code and desired insurance type.

Instructions

Get an insurance quote from Lemonade for renters, homeowners, pet, or car insurance

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
insurance_typeYesType of insurance to get a quote for
zip_codeYesZIP code for the insurance location
coverage_amountNoDesired coverage amount in dollars (optional)
additional_infoNoAdditional information specific to the insurance type

Implementation Reference

  • The handleGetQuote function performs the logic for the get_quote tool, navigating to the relevant Lemonade insurance page and extracting information.
    async function handleGetQuote(args: {
      insurance_type: string;
      zip_code: string;
      coverage_amount?: number;
      additional_info?: Record<string, unknown>;
    }): Promise<string> {
      const urlMap: Record<string, string> = {
        renters: `${LEMONADE_BASE_URL}/renters-insurance`,
        homeowners: `${LEMONADE_BASE_URL}/homeowners-insurance`,
        pet: `${LEMONADE_BASE_URL}/pet-health-insurance`,
        car: `${LEMONADE_BASE_URL}/car-insurance`,
      };
    
      const url = urlMap[args.insurance_type] || LEMONADE_BASE_URL;
    
      return withBrowser(async (browser, page) => {
        await page.goto(url, { waitUntil: "domcontentloaded", timeout: 30000 });
        await page.waitForTimeout(2000);
    
        const title = await page.title();
        const description = await page
          .$eval('meta[name="description"]', (el) =>
            el.getAttribute("content")
          )
          .catch(() => "No description available");
    
        // Extract key information from the page
        const pageText = await page
          .evaluate(() => {
            const body = document.body;
            const scripts = body.querySelectorAll("script, style");
            scripts.forEach((s) => s.remove());
            return body.innerText.substring(0, 2000);
          })
          .catch(() => "Unable to extract page content");
    
        return JSON.stringify({
          status: "success",
          insurance_type: args.insurance_type,
          zip_code: args.zip_code,
          quote_url: url,
          page_title: title,
          description,
          instructions: `To get a quote for ${args.insurance_type} insurance in ZIP ${args.zip_code}, visit ${url} and complete the online quote form. Coverage amount requested: ${args.coverage_amount ? `$${args.coverage_amount}` : "Not specified"}.`,
          page_content_preview: pageText.substring(0, 500),
        });
      });
    }
  • src/index.ts:13-39 (registration)
    The tool definition and metadata for get_quote.
    const tools: Tool[] = [
      {
        name: "get_quote",
        description:
          "Get an insurance quote from Lemonade for renters, homeowners, pet, or car insurance",
        inputSchema: {
          type: "object",
          properties: {
            insurance_type: {
              type: "string",
              enum: ["renters", "homeowners", "pet", "car"],
              description: "Type of insurance to get a quote for",
            },
            zip_code: {
              type: "string",
              description: "ZIP code for the insurance location",
            },
            coverage_amount: {
              type: "number",
              description: "Desired coverage amount in dollars (optional)",
            },
            additional_info: {
              type: "object",
              description: "Additional information specific to the insurance type",
            },
          },
          required: ["insurance_type", "zip_code"],
  • Input schema for the get_quote tool.
    inputSchema: {
      type: "object",
      properties: {
        insurance_type: {
          type: "string",
          enum: ["renters", "homeowners", "pet", "car"],
          description: "Type of insurance to get a quote for",
        },
        zip_code: {
          type: "string",
          description: "ZIP code for the insurance location",
        },
        coverage_amount: {
          type: "number",
          description: "Desired coverage amount in dollars (optional)",
        },
        additional_info: {
          type: "object",
          description: "Additional information specific to the insurance type",
        },
      },
      required: ["insurance_type", "zip_code"],
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It fails to disclose whether the tool creates persistent quote records, requires authentication, has rate limits, or what errors might occur. It does not indicate if this is a read-only calculation or a write operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single, efficient sentence with no filler. It immediately communicates the action, provider, and applicable insurance types without redundant phrasing.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the presence of a nested object ('additional_info') and no output schema, the description meets minimum viability but lacks elaboration on what specific data belongs in the nested object or what the tool returns. It relies entirely on the schema for parameter documentation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, establishing a baseline of 3. The description mirrors the enum values in the schema (renters, homeowners, pet, car) and adds provider context ('Lemonade'), but does not elaborate on the nested 'additional_info' object or provide syntax examples beyond what the schema specifies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description provides specific verb ('Get'), resource ('insurance quote'), provider ('Lemonade'), and exact insurance types. It clearly distinguishes from siblings which focus on claims (file_claim), existing policies (view_policy), or support (contact_support).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit when-to-use or when-not-to-use guidance is provided. However, the scope is clear enough implicitly (prospective quotes vs existing policy management) that an agent can infer appropriate usage contexts.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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