Skip to main content
Glama
jphyqr

HashBuilds Secure Prompts

by jphyqr

verify_secure_prompt

Check prompt security by ID to identify injection risks, data exfiltration patterns, and jailbreak attempts, returning scan results and verification status.

Instructions

Verify an existing secure prompt by its ID. Returns the security scan results, risk level, and verification status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptIdYesThe ID of the secure prompt to verify

Implementation Reference

  • MCP CallToolRequest handler case for 'verify_secure_prompt'. Validates the promptId argument and delegates to the verifyPrompt helper function, returning the result as MCP content.
    case "verify_secure_prompt": { const typedArgs = args as { promptId: string }; if (!typedArgs.promptId) { throw new McpError(ErrorCode.InvalidParams, "promptId is required"); } const result = await verifyPrompt(typedArgs); return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; }
  • Core helper function that makes the API request to HashBuilds to verify a secure prompt by ID, handling errors and parsing the response.
    async function verifyPrompt(args: { promptId: string }): Promise<{ valid: boolean; id?: string; riskLevel?: string; verified?: boolean; normalizedText?: string; scanResults?: object; lastVerified?: string; error?: string; }> { try { const response = await fetch(`${API_BASE}/verify/${args.promptId}`); const result = await response.json(); if (!response.ok) { return { valid: false, error: result.error || "Verification failed" }; } return { valid: true, id: result.id, riskLevel: result.riskLevel, verified: result.verified, normalizedText: result.normalizedText, scanResults: result.scanResults, lastVerified: result.lastVerified, }; } catch (error) { return { valid: false, error: error instanceof Error ? error.message : "Network error", }; } }
  • Input schema definition for the verify_secure_prompt tool, specifying the required 'promptId' parameter.
    inputSchema: { type: "object", properties: { promptId: { type: "string", description: "The ID of the secure prompt to verify", }, }, required: ["promptId"], },
  • src/index.ts:424-438 (registration)
    Registration of the verify_secure_prompt tool in the ListToolsRequest handler, including name, description, and input schema.
    name: "verify_secure_prompt", description: "Verify an existing secure prompt by its ID. " + "Returns the security scan results, risk level, and verification status.", inputSchema: { type: "object", properties: { promptId: { type: "string", description: "The ID of the secure prompt to verify", }, }, required: ["promptId"], }, },

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/jphyqr/secure-prompts-mcp'

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