Skip to main content
Glama
alberthild

ShieldAPI MCP

by alberthild

shieldapi.check_password_range

Read-onlyIdempotent

Check if a password hash prefix appears in breach databases using the HIBP k-Anonymity API to identify compromised credentials.

Instructions

Look up a SHA-1 hash prefix in the HIBP k-Anonymity database.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
prefixYesFirst 5 characters of the SHA-1 password hash

Implementation Reference

  • The tool 'shieldapi.check_password_range' is registered dynamically within a loop that iterates over the 'TOOLS' configuration object. It uses the 'callShieldApi' function as its handler to perform the API request.
    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>))
      );
    }
  • Definition of the 'shieldapi.check_password_range' tool within the 'TOOLS' configuration object.
    'shieldapi.check_password_range': {
      description: 'Look up a SHA-1 hash prefix in the HIBP k-Anonymity database.',
      param: 'prefix',
      paramDesc: 'First 5 characters of the SHA-1 password hash',
      endpoint: 'check-password-range',
    },

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.0

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so safety is covered. The description adds the specific backend (HIBP k-Anonymity) and prefix semantics, but does not disclose additional behavioral aspects like response format or privacy attributes beyond what the schema already provides.

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?

A single, focused sentence that immediately conveys the tool's purpose. No filler, fluff, or redundant phrasing. It is front-loaded with the key action and object.

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

Completeness4/5

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

For a simple one-parameter lookup tool with clear schema and annotations, the description is sufficiently complete. It identifies the resource and operation, but lacks detail about the response format or how to interpret results; still, given the simplicity, it is mostly complete.

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% ('First 5 characters of the SHA-1 password hash') and thoroughly explains the parameter. The description merely restates 'SHA-1 hash prefix' without adding extra meaning or usage details, so it stays at the baseline.

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

Purpose5/5

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

The description clearly states a specific action ('Look up') and a specific resource ('SHA-1 hash prefix in the HIBP k-Anonymity database'). The inclusion of 'prefix' distinguishes it from sibling tools like check_password, which likely handles full hashes.

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 the tool is used for prefix-based HIBP lookups but does not explicitly contrast it with alternative tools or state when NOT to use it. No alternatives are mentioned, so the context is implied rather than explicit.

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