verify_secure_prompt
Check prompt security by ID to identify hidden injections, data exfiltration patterns, and jailbreak attempts, then view risk levels 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 tool handler switch case for 'verify_secure_prompt'. Validates input and delegates to verifyPrompt function.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 implementation function that fetches verification data from the HashBuilds API for the given prompt ID.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)JSON schema defining the input parameters for the verify_secure_prompt tool.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 ListTools response, including name, description, and 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"], }, },