Skip to main content
Glama

sha224

Calculate SHA-224 cryptographic hash values for data verification and integrity checking within the Crypto_MCP server's security toolkit.

Instructions

Calculate SHA-224 hash of a string

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputYesThe input string to hash

Implementation Reference

  • MCP tool handler that invokes DigestUtil.sha224 on the input and formats the result as MCP text content.
    ({ input }) => {
      const hash = DigestUtil.sha224(input);
      return {
        content: [{ type: "text", text: hash }],
      };
    }
  • Zod input schema defining a single string parameter for the string to hash.
    {
      input: z.string().describe("The input string to hash"),
    },
  • Registration of the sha224 tool on the MCP server, specifying name, description, schema, and handler.
    server.tool(
      "sha224",
      "Calculate SHA-224 hash of a string",
      {
        input: z.string().describe("The input string to hash"),
      },
      ({ input }) => {
        const hash = DigestUtil.sha224(input);
        return {
          content: [{ type: "text", text: hash }],
        };
      }
    );
  • Static utility method in DigestUtil class that computes the SHA-224 hash using CryptoJS.
     * Calculate SHA-224 hash of a string
     * @param input The input string to hash
     * @returns 56-character hexadecimal SHA-224 hash
     */
    static sha224(input: string): string {
      const hash = CryptoJS.SHA224(input);
      return hash.toString();
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states what the tool does (calculate a hash) but lacks details on behavioral traits such as whether it's deterministic, idempotent, or has any side effects. It doesn't mention output format (e.g., hex string), performance characteristics, or error handling, which are important for a cryptographic tool.

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 without any fluff or redundancy. It is front-loaded with the core action ('Calculate SHA-224 hash'), making it easy for an agent to parse quickly. Every word earns its place, contributing to clarity without unnecessary elaboration.

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?

Given the tool's low complexity (a single input parameter) and high schema coverage, the description is minimally complete. However, with no output schema and no annotations, it lacks details on the return value (e.g., hash format) and behavioral aspects. For a hashing tool, this leaves gaps in understanding how to interpret results, but the simplicity of the operation keeps it from being severely inadequate.

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 schema description coverage is 100%, with the parameter 'input' clearly documented as 'The input string to hash'. The description adds no additional meaning beyond this, as it doesn't specify constraints like string length, encoding, or special characters. With high schema coverage, the baseline score of 3 is appropriate, as the schema adequately handles parameter documentation.

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 the specific verb ('calculate') and resource ('SHA-224 hash of a string'), making the purpose immediately understandable. It distinguishes this tool from its siblings by specifying the exact hash algorithm (SHA-224) rather than MD5, SHA-1, SHA-256, etc., which helps the agent select the correct cryptographic function.

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 hashing strings with SHA-224, but does not explicitly state when to use this tool versus alternatives like sha256 or md5. It provides no guidance on prerequisites, exclusions, or specific contexts where SHA-224 is preferred over other hash functions, leaving the agent to infer based on the tool name alone.

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/1595901624/crypto-mcp'

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