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",
          },
        },
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but only offers minimal information. While 'view' implies read-only access, the description fails to specify error handling (e.g., policy not found), data scope (what specific details are returned), or whether this operation is safe/non-destructive.

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?

The description is a single, efficient sentence of nine words with the action verb front-loaded. There is no redundant or wasteful text; every word contributes to understanding the tool's function.

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 tool's simplicity (two flat parameters, no output schema), the description is minimally adequate. However, without an output schema, it could improve by specifying what policy details are returned (e.g., coverage amounts, effective dates) to set appropriate expectations for the agent.

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?

The input schema has 100% description coverage, establishing a baseline score of 3. The description does not add meaningful constraints or clarify the relationship between parameters (e.g., that 'email' is required but 'policy_id' is optional for lookup), but the schema documentation is sufficient.

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

Purpose4/5

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

The description clearly states the action ('View') and resource ('details of an existing Lemonade insurance policy'), including the specific provider context. However, it does not explicitly differentiate from the sibling tool 'get_documents', which could also return policy-related information, preventing a perfect score.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'get_documents' (which may return policy files) or 'check_claim_status' (for claim-related lookups). There are no stated prerequisites or conditions for use.

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