Skip to main content
Glama

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
NameRequiredDescriptionDefault
policy_idYesThe policy ID to update
coverage_changesYesObject describing the coverage changes to make

Implementation Reference

  • 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: {
Behavior2/5

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

No annotations provided, so description carries full burden of behavioral disclosure. 'Update' implies mutation but does not specify if changes are immediate, reversible, trigger billing adjustments, or require additional approval. Critical gaps for a financial mutation tool.

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

Conciseness4/5

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

Single sentence of 7 words with no redundancy. Information is front-loaded. Deduction from 5 due to extreme brevity given the lack of annotations and output schema, which creates an incomplete picture despite the concise phrasing.

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

Completeness2/5

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

Given zero annotations, no output schema, and nested object complexity, the description is insufficient. For an insurance policy mutation, it should disclose side effects (billing, effective dates) or refer to the nested coverage_changes structure, but it provides only nominal identification.

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 description coverage is 100%, establishing baseline 3. The description adds minimal param context beyond the schema—only the 'Lemonade' domain reference slightly enriches the policy_id semantics, but no syntax or format details are added.

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 verb (Update), resource (coverage), and scope (existing Lemonade insurance policy). The word 'existing' distinguishes it from get_quote (new policies), while 'coverage' distinguishes it from file_claim or view_policy.

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?

No explicit guidance on when to use versus alternatives. The word 'existing' provides weak implicit context that this is not for new policies, but lacks explicit exclusions like 'Do not use for filing claims—use file_claim instead.'

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