Skip to main content
Glama
Cyreslab-AI

Have I Been Pwned MCP Server

get_breach_details

Retrieve detailed information about a specific data breach by providing the breach name, helping users assess potential risks and exposure.

Instructions

Get details about a specific data breach

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
breach_nameYesName of the breach to get details for

Implementation Reference

  • The main execution logic for the get_breach_details tool. Validates input, fetches breach details from the Have I Been Pwned API, formats the response as markdown, and includes recommendations.
    private async handleGetBreachDetails(args: any) {
      if (!args.breach_name || typeof args.breach_name !== "string") {
        throw new McpError(
          ErrorCode.InvalidParams,
          "Breach name is required"
        );
      }
    
      const response = await this.axiosInstance.get(`/breach/${encodeURIComponent(args.breach_name)}`);
    
      if (!response.data) {
        return {
          content: [
            {
              type: "text",
              text: `No information found for breach: ${args.breach_name}`,
            },
          ],
        };
      }
    
      const breach = response.data;
    
      // Format the breach data for better readability
      let details = `# ${breach.Name} Data Breach\n\n`;
      details += `**Date:** ${breach.BreachDate}\n`;
      details += `**Domain:** ${breach.Domain}\n`;
      details += `**Accounts affected:** ${breach.PwnCount.toLocaleString()}\n`;
      details += `**Verified:** ${breach.IsVerified ? "Yes" : "No"}\n`;
      details += `**Data leaked:** ${breach.DataClasses.join(", ")}\n\n`;
      details += `**Description:**\n${breach.Description}\n\n`;
    
      if (breach.IsFabricated) {
        details += "⚠️ Note: This breach has been flagged as potentially fabricated.\n\n";
      }
    
      if (breach.IsSensitive) {
        details += "⚠️ Note: This breach contains sensitive information.\n\n";
      }
    
      if (breach.IsRetired) {
        details += "ℹ️ Note: This breach has been retired from active display.\n\n";
      }
    
      if (breach.IsSpamList) {
        details += "ℹ️ Note: This breach is from a spam list.\n\n";
      }
    
      details += "**Recommendations:**\n";
      details += "- If you had an account on this service, change your password\n";
      details += "- If you used the same password elsewhere, change those too\n";
      details += "- Monitor your accounts for suspicious activity\n";
      details += "- Be cautious of phishing attempts that may use this leaked information";
    
      return {
        content: [
          {
            type: "text",
            text: details,
          },
        ],
      };
    }
  • Input schema defining the required 'breach_name' parameter for the tool.
    inputSchema: {
      type: "object",
      properties: {
        breach_name: {
          type: "string",
          description: "Name of the breach to get details for",
        },
      },
      required: ["breach_name"],
    },
  • src/index.ts:118-131 (registration)
    Registration of the get_breach_details tool in the ListTools response, including name, description, and input schema.
    {
      name: "get_breach_details",
      description: "Get details about a specific data breach",
      inputSchema: {
        type: "object",
        properties: {
          breach_name: {
            type: "string",
            description: "Name of the breach to get details for",
          },
        },
        required: ["breach_name"],
      },
    },
  • src/index.ts:169-170 (registration)
    Dispatch case in the CallToolRequest handler that routes calls to the specific handler function.
    case "get_breach_details":
      return await this.handleGetBreachDetails(request.params.arguments);
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. It states it 'Get details' but doesn't describe what details are returned, if it's a read-only operation, any rate limits, authentication needs, or error conditions. 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 that directly states the tool's purpose with zero waste. It's appropriately sized and front-loaded, making it easy to parse quickly.

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 the lack of annotations and no output schema, the description is incomplete. It doesn't explain what details are returned, the format of the response, or any behavioral traits. For a tool that fetches data, this leaves critical gaps in understanding how to use it effectively.

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, with the parameter 'breach_name' clearly documented. The description doesn't add any meaning beyond the schema (e.g., it doesn't explain what constitutes a valid breach name or provide examples), so it meets the baseline of 3 where the schema does the heavy lifting.

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 tool's purpose with a specific verb ('Get') and resource ('details about a specific data breach'), making it easy to understand what it does. However, it doesn't explicitly differentiate from sibling tools like 'list_all_breaches' (which likely lists breaches vs. getting details for one), so it misses full sibling distinction.

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. It doesn't mention when to use it over 'list_all_breaches' or other siblings, nor does it specify prerequisites or exclusions, leaving the agent with no usage context.

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