Skip to main content
Glama
alberthild

ShieldAPI MCP

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',
    },
Behavior3/5

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

Annotations fully cover the safety profile (readOnly, idempotent, openWorld). The description adds valuable context that this queries the external HIBP (Have I Been Pwned) database and uses the k-Anonymity privacy model. It does not mention rate limits, authentication requirements, or what data is returned.

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?

Single sentence, 10 words. Front-loaded with the action verb. Every word serves a purpose (identifies the operation, the specific hash type, the parameter format, and the target database). Zero waste.

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?

Given the single parameter with 100% schema coverage and complete annotations, the description is appropriately complete. The mention of 'HIBP' and 'k-Anonymity' provides sufficient domain context. Minor gap: no output schema exists and the description doesn't describe the return value (list of hash suffixes), though this is somewhat implied by the lookup operation.

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 coverage is 100%, fully documenting the 'prefix' parameter as the first 5 characters of a SHA-1 hash. The description references 'SHA-1 hash prefix', reinforcing the schema semantics, and adds the HIBP context to explain why this specific format is required. Baseline 3 is appropriate given schema completeness.

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 uses a specific verb ('Look up') and resource ('SHA-1 hash prefix' in 'HIBP k-Anonymity database'). It distinguishes from sibling 'check_password' by explicitly mentioning 'hash prefix' and 'k-Anonymity', signaling this is for range-based privacy queries rather than full hash checks.

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 through technical specificity ('k-Anonymity', 'prefix'), suggesting when to use this range-based approach versus full password checks. However, it lacks explicit when-to-use guidance or named alternatives (e.g., when to prefer check_password over this tool).

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/alberthild/shield-api-mcp'

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