kya_reportBadgeOutcome
Report the merchant's response to a user's badge, specifying whether access was granted, denied, or unparseable.
Instructions
[DEPRECATED — outcomes are now tracked automatically via the verify endpoint. This tool will be removed in a future version.]
Report how the merchant responded when you presented your Badge.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| verification_token | Yes | The verification_token returned by kya_getAgentIdentity | |
| merchant | Yes | The merchant where you presented (e.g., 'starbucks.com') | |
| outcome | Yes | not_denied = merchant did not block you; denied = blocked/bot-walled; unparseable = unknown or timed out | |
| trip_id | No | Trip ID from kya_getAgentIdentity — links events in this shopping session |
Implementation Reference
- src/index.ts:113-146 (handler)Handler function for the kya_reportBadgeOutcome tool. It is a deprecated MCP tool that acknowledges the outcome (not_denied/denied/unparseable) at a merchant. It merely prints a deprecation warning once on first call and returns an acknowledgment message. No actual API call is made — outcomes are now auto-tracked.
server.tool( "kya_reportBadgeOutcome", `[DEPRECATED — outcomes are now tracked automatically via the verify endpoint. This tool will be removed in a future version.] Report how the merchant responded when you presented your Badge.`, { verification_token: z.string().describe( "The verification_token returned by kya_getAgentIdentity" ), merchant: z.string().max(200).describe( "The merchant where you presented (e.g., 'starbucks.com')" ), outcome: z .enum(["not_denied", "denied", "unparseable"]) .describe( "not_denied = merchant did not block you; denied = blocked/bot-walled; unparseable = unknown or timed out" ), trip_id: z.string().uuid().optional().describe( "Trip ID from kya_getAgentIdentity — links events in this shopping session" ), }, async ({ merchant, outcome }) => { if (!_warnedOutcome) { process.stderr.write("[badge] WARNING: kya_reportBadgeOutcome is deprecated. Outcomes are now tracked automatically.\n"); _warnedOutcome = true; } return { content: [{ type: "text", text: `Outcome acknowledged: ${outcome} at ${merchant} (deprecated — auto-tracking active).`, }], }; } ); - src/index.ts:118-132 (schema)Zod schema defining the input parameters for kya_reportBadgeOutcome: verification_token (required string), merchant (required string, max 200 chars), outcome (required enum: not_denied/denied/unparseable), and trip_id (optional UUID string).
{ verification_token: z.string().describe( "The verification_token returned by kya_getAgentIdentity" ), merchant: z.string().max(200).describe( "The merchant where you presented (e.g., 'starbucks.com')" ), outcome: z .enum(["not_denied", "denied", "unparseable"]) .describe( "not_denied = merchant did not block you; denied = blocked/bot-walled; unparseable = unknown or timed out" ), trip_id: z.string().uuid().optional().describe( "Trip ID from kya_getAgentIdentity — links events in this shopping session" ), - src/index.ts:113-146 (registration)Registration of the 'kya_reportBadgeOutcome' tool on the MCP server via server.tool(), making it available to MCP clients.
server.tool( "kya_reportBadgeOutcome", `[DEPRECATED — outcomes are now tracked automatically via the verify endpoint. This tool will be removed in a future version.] Report how the merchant responded when you presented your Badge.`, { verification_token: z.string().describe( "The verification_token returned by kya_getAgentIdentity" ), merchant: z.string().max(200).describe( "The merchant where you presented (e.g., 'starbucks.com')" ), outcome: z .enum(["not_denied", "denied", "unparseable"]) .describe( "not_denied = merchant did not block you; denied = blocked/bot-walled; unparseable = unknown or timed out" ), trip_id: z.string().uuid().optional().describe( "Trip ID from kya_getAgentIdentity — links events in this shopping session" ), }, async ({ merchant, outcome }) => { if (!_warnedOutcome) { process.stderr.write("[badge] WARNING: kya_reportBadgeOutcome is deprecated. Outcomes are now tracked automatically.\n"); _warnedOutcome = true; } return { content: [{ type: "text", text: `Outcome acknowledged: ${outcome} at ${merchant} (deprecated — auto-tracking active).`, }], }; } );