Skip to main content
Glama
laszlopere

mcp-bytesmith

password_hash

Hash a password into a verifiable storage string or check a password against an existing hash. Supports bcrypt, argon2, scrypt, and PBKDF2 schemes.

Instructions

Hash a password into a verifiable storage string, or check one against it.

action=hash (needs scheme) returns encoded, a self-describing string that carries the scheme, its cost params and the salt: bcrypt's $2b$… and argon2's PHC string verbatim, and for the stdlib schemes the PHC-shaped $scrypt$ln=14,r=8,p=1$<salt>$<hash> / $pbkdf2-sha256$i=600000$<salt>$<hash> (base64 fields, padding stripped). action=verify reads the scheme back out of encoded and returns {"valid": true|false} — a wrong password is a result, not an error (§2.0.5); only a malformed encoded raises. The password itself is never echoed (§2.0.6). bcrypt/argon2* need the crypto extra. Example: password_hash("hash", "hunter2", scheme="pbkdf2", params={"iterations": 100000}) -> {"encoded": "$pbkdf2-sha256$i=100000$..."}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
saltNoSalt as hex, for reproducible hashing (action='hash'). bcrypt needs exactly 16 bytes, argon2 at least 8. Omit — the default — to draw 16 fresh CSPRNG bytes, which is what you want in production.
actionYes'hash' derives a storage string from `password` (needs `scheme`); 'verify' checks `password` against `encoded`.
paramsNoCost parameters overriding the scheme's defaults: bcrypt {rounds:12}; argon2 {time_cost:3, memory_cost:65536 (KiB), parallelism:4, hash_len:32}; scrypt {ln:14, r:8, p:1, dklen:32}; pbkdf2 {iterations:600000, prf:'sha256', dklen:32}. Default None.
schemeNoPassword-hashing scheme (required for action='hash'). bcrypt and the argon2 variants need the `crypto` extra; scrypt and pbkdf2 are stdlib. On action='verify' it is read from `encoded`, and if given must agree with it. Default None.
encodedNoThe stored hash string to check against (action='verify'). Default None.
passwordYesThe password, read as UTF-8. Never echoed back.
Behavior5/5

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

Rich disclosure: password never echoed, wrong password is a result not error, malformed encoded raises, encoding format for each scheme, dependency on crypto extra, example output. With no annotations, description carries full burden and exceeds it.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured with action descriptions, encoding details, and an example. Slightly long but each sentence earns its place. Could be slightly more concise but overall efficient.

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

Completeness5/5

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

Very complete given 6 parameters, no output schema, no annotations. Covers both actions, error handling, encoding format, parameter semantics, dependencies. Output shapes are implied. No gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with descriptions, but description adds significant context: salt explains production defaults, params lists scheme-specific cost defaults, scheme mentions crypto extra, encoded explains self-describing format. Provides example usage.

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?

Clear verb+resource: 'Hash a password into a verifiable storage string, or check one against it.' Specifies two distinct actions (hash and verify) with distinct return values. Distinct from sibling tools like hash (general) and derive_key (KDF).

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 explicit guidance on when to use this tool vs alternatives like hash or derive_key. Only mentions that bcrypt/argon2 need the crypto extra, which is a dependency note, not usage guidance.

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/laszlopere/mcp-bytesmith'

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