Skip to main content
Glama
alberthild

ShieldAPI MCP

by alberthild

shieldapi.check_password

Read-onlyIdempotent

Check SHA-1 password hashes against known data breaches via Have I Been Pwned to identify compromised credentials.

Instructions

Check if a password hash (SHA-1) has been exposed in known data breaches via HIBP.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hashYesSHA-1 hash of the password (40 hex chars)

Implementation Reference

  • The tool 'shieldapi.check_password' is registered dynamically within this loop, which delegates the execution to the 'callShieldApi' function using the endpoint definition.
    for (const [name, def] of Object.entries(TOOLS)) {
      server.tool(
        name,
        def.description,
        { [def.param]: z.string().describe(def.paramDesc) },
        { ...readOnlyAnnotations, title: TOOL_TITLES[name] || name },
        async (params) => formatResult(await callShieldApi(def.endpoint, params as Record<string, string>))
      );
  • This is the actual handler logic that performs the network request to the ShieldAPI endpoint.
    async function callShieldApi(endpoint: string, params: Record<string, string>): Promise<unknown> {
      const url = new URL(`${SHIELDAPI_URL}/api/${endpoint}`);
      for (const [key, value] of Object.entries(params)) {
        url.searchParams.set(key, value);
      }
      if (demoMode) {
        url.searchParams.set('demo', 'true');
      }
    
      const response = await paymentFetch(url.toString());
      if (!response.ok) {
        const body = await response.text();
        throw new Error(`ShieldAPI ${endpoint} failed (${response.status}): ${body.substring(0, 200)}`);
      }
      return response.json();
    }
  • Definition of the 'shieldapi.check_password' tool parameters and endpoint.
    'shieldapi.check_password': {
      description: 'Check if a password hash (SHA-1) has been exposed in known data breaches via HIBP.',
      param: 'hash',
      paramDesc: 'SHA-1 hash of the password (40 hex chars)',
      endpoint: 'check-password',
    },

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already provide readOnlyHint, openWorldHint, idempotentHint, and destructiveHint, covering the safety profile. The description adds the HIBP external service context, which is useful, but does not disclose details like return format or rate limits. No contradiction with annotations is present.

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, precise sentence with no unnecessary words. It front-loads the key action and resource, making it immediately understandable and earning its place without redundancy.

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?

The tool is simple with one parameter and good annotations, but it lacks an output schema and the description does not specify what the tool returns (e.g., boolean, breach count). This gap in return-value transparency means the agent may be uncertain about the result format, so completeness is adequate but not strong.

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 fully describes the single 'hash' parameter with format constraints (SHA-1, 40 hex chars), and the description reiterates this. Since schema coverage is 100%, the description adds no extra meaning beyond the schema, placing it at the baseline.

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 it checks if a SHA-1 password hash has been exposed in known data breaches via HIBP, using a specific verb and resource. It does not explicitly distinguish itself from the sibling check_password_range, which likely uses a different method (e.g., range query), so it lacks full sibling differentiation.

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?

The description implies usage for password breach checks but does not explicitly state when to choose this tool over alternatives like check_password_range or other check tools. There is no mention of exclusions or preferred contexts, leaving the guidance implicit rather than explicit.

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