Skip to main content
Glama
Cyreslab-AI

Have I Been Pwned MCP Server

list_all_breaches

Retrieve a comprehensive list of all data breaches stored in the system, optionally filtered by domain, to identify potential security risks to your accounts.

Instructions

List all breaches in the system

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainNoFilter breaches by domain

Implementation Reference

  • The handler function for the 'list_all_breaches' tool. It calls the HIBP API endpoint '/breaches' with optional domain filter, processes the response by sorting breaches by date, formats a detailed text summary, and returns it as MCP content.
    /**
     * Handle the list_all_breaches tool
     */
    private async handleListAllBreaches(args: any) {
      const params: Record<string, any> = {};
    
      if (args && args.domain) {
        params.domain = args.domain;
      }
    
      const response = await this.axiosInstance.get("/breaches", { params });
    
      if (!response.data || response.data.length === 0) {
        return {
          content: [
            {
              type: "text",
              text: args && args.domain
                ? `No breaches found for domain: ${args.domain}`
                : "No breaches found in the system.",
            },
          ],
        };
      }
    
      const breaches = response.data;
    
      // Format the breach list for better readability
      let summary = args && args.domain
        ? `Found ${breaches.length} breaches for domain ${args.domain}:\n\n`
        : `Found ${breaches.length} breaches in the system:\n\n`;
    
      // Sort breaches by date (newest first)
      breaches.sort((a: any, b: any) => {
        return new Date(b.BreachDate).getTime() - new Date(a.BreachDate).getTime();
      });
    
      breaches.forEach((breach: any, index: number) => {
        summary += `${index + 1}. ${breach.Name} (${breach.BreachDate})\n`;
        summary += `   Domain: ${breach.Domain}\n`;
        summary += `   Accounts affected: ${breach.PwnCount.toLocaleString()}\n`;
        summary += `   Compromised data: ${breach.DataClasses.join(", ")}\n`;
    
        if (index < breaches.length - 1) {
          summary += "\n";
        }
      });
    
      return {
        content: [
          {
            type: "text",
            text: summary,
          },
        ],
      };
    }
  • The input schema for the 'list_all_breaches' tool, defining an optional 'domain' string parameter to filter breaches.
    inputSchema: {
      type: "object",
      properties: {
        domain: {
          type: "string",
          description: "Filter breaches by domain",
        },
      },
    },
  • src/index.ts:132-144 (registration)
    Registration of the 'list_all_breaches' tool in the ListTools response, including name, description, and input schema.
    {
      name: "list_all_breaches",
      description: "List all breaches in the system",
      inputSchema: {
        type: "object",
        properties: {
          domain: {
            type: "string",
            description: "Filter breaches by domain",
          },
        },
      },
    },
  • src/index.ts:171-172 (registration)
    Registration in the CallToolRequestSchema switch statement, dispatching 'list_all_breaches' calls to the handleListAllBreaches method.
    case "list_all_breaches":
      return await this.handleListAllBreaches(request.params.arguments);
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. It mentions 'List all breaches' but doesn't describe return format, pagination, rate limits, authentication needs, or whether it's a read-only operation. This is a significant gap for a tool with zero annotation coverage.

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 with no wasted words. It's appropriately sized for a simple tool and front-loads the core purpose immediately.

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 no annotations and no output schema, the description is incomplete. It doesn't explain what 'breaches' entail, the return format, or behavioral traits. For a tool that likely returns sensitive data, more context on scope and usage is needed.

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%, so the schema already documents the 'domain' parameter fully. The description doesn't add any parameter-specific information beyond what's in the schema, such as examples or constraints. Baseline 3 is appropriate when the schema does the heavy lifting.

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

Purpose3/5

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

The description states the tool's purpose ('List all breaches in the system') with a clear verb ('List') and resource ('breaches'), but it's vague about scope and doesn't distinguish from sibling tools like 'get_breach_details'. It doesn't specify whether 'all' means truly comprehensive or limited by some criteria.

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 guidance is provided on when to use this tool versus alternatives like 'get_breach_details' or 'check_email'. The description implies a broad listing function but doesn't clarify use cases, prerequisites, or exclusions, leaving the agent to guess based on tool names alone.

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

Related 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/Cyreslab-AI/hibp-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server