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
| Name | Required | Description | Default |
|---|---|---|---|
| promptId | Yes | The ID of the secure prompt to verify |
Implementation Reference
- src/index.ts:537-553 (handler)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), }, ], }; }
- src/index.ts:303-336 (helper)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", }; } }
- src/index.ts:428-437 (schema)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"], }, },