Skip to main content
Glama

Verify Attestation

verify_attestation

Confirm pentest authenticity by verifying blockchain-anchored attestations using their hash to ensure tests were performed and results are genuine.

Instructions

Verify a blockchain-anchored pentest attestation by its hash. This is a public endpoint — no API key required. Use this to confirm that a pentest was actually performed and its results are authentic.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hashYesThe attestation hash to verify

Implementation Reference

  • The handler function that executes the logic for 'verify_attestation', including calling the client and formatting the response.
    async ({ hash }) => {
      try {
        const data = await client.getAttestation(hash);
    
        const a = data.attestation;
        const lines = [
          `Attestation: ${hash}`,
          `Verified: ${data.verified ? "YES (blockchain-anchored)" : "PENDING (not yet anchored)"}`,
          "",
          "--- Scan Details ---",
          `  Tier:         ${a.creditTier}`,
          `  Agents:       ${a.agentCount}`,
          `  Agent Hours:  ${a.agentHours}`,
          `  Duration:     ${a.durationMin} minutes`,
          `  Tools Run:    ${a.toolsRun}`,
          `  Risk Score:   ${a.riskScore}`,
          `  Completed:    ${a.completedAt}`,
        ];
    
        if (a.findingSummary) {
          const summary = a.findingSummary as Record<string, number>;
          lines.push(
            "",
            "  Findings:",
            `    Critical: ${summary.critical || 0}`,
            `    High:     ${summary.high || 0}`,
            `    Medium:   ${summary.medium || 0}`,
            `    Low:      ${summary.low || 0}`,
            `    Info:     ${summary.info || 0}`,
          );
        }
    
        if (data.anchor) {
          lines.push(
            "",
            "--- Blockchain Proof ---",
            `  Chain ID:     ${data.anchor.chainId}`,
            `  TX Hash:      ${data.anchor.txHash}`,
            `  Block:        ${data.anchor.blockNumber}`,
            `  Merkle Root:  ${data.anchor.rootHash}`,
          );
        }
    
        return { content: [{ type: "text" as const, text: lines.join("\n") }] };
      } catch (error) {
        const message = error instanceof Error ? error.message : String(error);
        return {
          content: [
            {
              type: "text" as const,
              text: `Failed to verify attestation: ${message}`,
            },
          ],
          isError: true,
        };
      }
    },
  • Input schema definition for the 'verify_attestation' tool.
    inputSchema: z.object({
      hash: z.string().describe("The attestation hash to verify"),
    }),
  • Registration function for the 'verify_attestation' tool.
    export function registerVerifyAttestation(server: McpServer, client: TurboPentestClient): void {
      server.registerTool(
        "verify_attestation",
        {
          title: "Verify Attestation",
          description:
            "Verify a blockchain-anchored pentest attestation by its hash. " +
            "This is a public endpoint — no API key required. " +
            "Use this to confirm that a pentest was actually performed and its results are authentic.",
          inputSchema: z.object({
            hash: z.string().describe("The attestation hash to verify"),
          }),
        },
        async ({ hash }) => {
          try {
            const data = await client.getAttestation(hash);
    
            const a = data.attestation;
            const lines = [
              `Attestation: ${hash}`,
              `Verified: ${data.verified ? "YES (blockchain-anchored)" : "PENDING (not yet anchored)"}`,
              "",
              "--- Scan Details ---",
              `  Tier:         ${a.creditTier}`,
              `  Agents:       ${a.agentCount}`,
              `  Agent Hours:  ${a.agentHours}`,
              `  Duration:     ${a.durationMin} minutes`,
              `  Tools Run:    ${a.toolsRun}`,
              `  Risk Score:   ${a.riskScore}`,
              `  Completed:    ${a.completedAt}`,
            ];
    
            if (a.findingSummary) {
              const summary = a.findingSummary as Record<string, number>;
              lines.push(
                "",
                "  Findings:",
                `    Critical: ${summary.critical || 0}`,
                `    High:     ${summary.high || 0}`,
                `    Medium:   ${summary.medium || 0}`,
                `    Low:      ${summary.low || 0}`,
                `    Info:     ${summary.info || 0}`,
              );
            }
    
            if (data.anchor) {
              lines.push(
                "",
                "--- Blockchain Proof ---",
                `  Chain ID:     ${data.anchor.chainId}`,
                `  TX Hash:      ${data.anchor.txHash}`,
                `  Block:        ${data.anchor.blockNumber}`,
                `  Merkle Root:  ${data.anchor.rootHash}`,
              );
            }
    
            return { content: [{ type: "text" as const, text: lines.join("\n") }] };
          } catch (error) {
            const message = error instanceof Error ? error.message : String(error);
            return {
              content: [
                {
                  type: "text" as const,
                  text: `Failed to verify attestation: ${message}`,
                },
              ],
              isError: true,
            };
          }
        },
      );
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It adds valuable context beyond basic functionality: it specifies this is a 'public endpoint — no API key required', which informs authentication needs, and implies read-only verification without destructive effects, though it doesn't detail rate limits or exact response format.

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 front-loaded with the core purpose, followed by key behavioral details, all in two efficient sentences with zero wasted words. Each sentence earns its place by adding distinct value.

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 tool's low complexity (1 parameter, no output schema, no annotations), the description is largely complete. It covers purpose, usage context, and key behavioral traits like public access. However, without an output schema, it doesn't explain return values (e.g., verification status or error details), leaving a minor gap.

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%, so the parameter 'hash' is already documented in the schema. The description adds marginal meaning by linking the hash to verification of pentest authenticity, but doesn't provide additional syntax or format details beyond what the schema states.

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 action ('verify'), resource ('blockchain-anchored pentest attestation'), and mechanism ('by its hash'). It distinguishes this from sibling tools like 'download_report' or 'get_pentest' by focusing on verification rather than retrieval or listing.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use this tool ('to confirm that a pentest was actually performed and its results are authentic'), but does not explicitly mention when not to use it or name specific alternatives among the sibling tools (e.g., 'get_pentest' for retrieving details).

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/IntegSec/turbopentest-mcp'

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