verify_claim
Verify factual claims against real-time web sources to determine truthfulness with confidence scores and source attribution.
Instructions
Verify a factual claim against real-time web sources. Returns verdict (TRUE/FALSE/UNCERTAIN/OUTDATED/DISPUTED), confidence 0-1, and source. Cost: $0.002 USDC. Service: groundtruth.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| claim | Yes | The factual claim to verify | |
| context | No | Optional surrounding context |
Implementation Reference
- src/index.ts:166-223 (handler)The `CallToolRequestSchema` handler dynamically resolves tools by name from a registry fetched at runtime. The "verify_claim" tool is not hardcoded but is fetched from the registry URL, and this handler routes the request to the appropriate API endpoint defined in the registry.
server.setRequestHandler(CallToolRequestSchema, async (request) => { const { name, arguments: args } = request.params; let registry: Registry; try { registry = await fetchRegistry(); } catch (error) { return { content: [ { type: "text", text: JSON.stringify({ error: "Failed to fetch tool registry", detail: String(error) }), }, ], }; } const tool = registry.tools.find((t) => t.name === name); if (!tool) { return { content: [ { type: "text", text: JSON.stringify({ error: `Tool '${name}' not found`, available_tools: registry.tools.map((t) => t.name), }), }, ], }; } try { const result = await callTool(tool, args as Record<string, unknown>); return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; } catch (error) { return { content: [ { type: "text", text: JSON.stringify({ error: "Tool call failed", tool: name, service: tool.service, detail: String(error), }), }, ], }; } });