Verify Store
verify_storeVerify an ecommerce merchant's trust status in the GenGEO registry using their domain.
Instructions
Check whether an ecommerce merchant is verified in the GenGEO trust registry.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes | Merchant domain, e.g. example.com |
Implementation Reference
- mcp/server.js:24-91 (handler)Async handler function that verifies a store by calling the GenGEO verify API. Cleans the domain, fetches from GENGEO_VERIFY_ENDPOINT, and returns structured JSON indicating verified status, eligibility, and decision.
async ({ domain }) => { const cleanDomain = domain .replace(/^https?:\/\//, "") .replace(/^www\./, "") .split("/")[0] .trim() .toLowerCase(); try { const url = `${GENGEO_VERIFY_ENDPOINT}?domain=${encodeURIComponent(cleanDomain)}`; const response = await fetch(url); if (!response.ok) { return { content: [ { type: "text", text: JSON.stringify({ domain: cleanDomain, verified: false, status: "lookup_error", eligible_for_ai_agent_purchase: "unknown", decision: "verification_unavailable", reason: "GenGEO verification lookup was unavailable." }) } ] }; } const data = await response.json(); const verified = data.verified === true; const active = data.status === "active" || data.status === "verified"; return { content: [ { type: "text", text: JSON.stringify({ domain: cleanDomain, verified, status: verified && active ? "active" : "not_found", eligible_for_ai_agent_purchase: verified && active ? "yes" : "unknown", decision: verified && active ? "verified" : "verification_required", registry: "GenGEO" }) } ] }; } catch (error) { return { content: [ { type: "text", text: JSON.stringify({ domain: cleanDomain, verified: false, status: "lookup_error", eligible_for_ai_agent_purchase: "unknown", decision: "verification_unavailable", reason: "GenGEO verification lookup could not be completed." }) } ] }; } } - mcp/server.js:16-22 (schema)Input schema for 'verify_store' tool - requires a 'domain' string (min 3 chars) described as the merchant domain. Uses Zod for validation.
{ title: "Verify Store", description: "Check whether an ecommerce merchant is verified in the GenGEO trust registry.", inputSchema: { domain: z.string().min(3).describe("Merchant domain, e.g. example.com") } - mcp/server.js:14-92 (registration)Registration of the 'verify_store' tool with the MCP server using server.registerTool(), binding name, schema, and handler together.
server.registerTool( "verify_store", { title: "Verify Store", description: "Check whether an ecommerce merchant is verified in the GenGEO trust registry.", inputSchema: { domain: z.string().min(3).describe("Merchant domain, e.g. example.com") } }, async ({ domain }) => { const cleanDomain = domain .replace(/^https?:\/\//, "") .replace(/^www\./, "") .split("/")[0] .trim() .toLowerCase(); try { const url = `${GENGEO_VERIFY_ENDPOINT}?domain=${encodeURIComponent(cleanDomain)}`; const response = await fetch(url); if (!response.ok) { return { content: [ { type: "text", text: JSON.stringify({ domain: cleanDomain, verified: false, status: "lookup_error", eligible_for_ai_agent_purchase: "unknown", decision: "verification_unavailable", reason: "GenGEO verification lookup was unavailable." }) } ] }; } const data = await response.json(); const verified = data.verified === true; const active = data.status === "active" || data.status === "verified"; return { content: [ { type: "text", text: JSON.stringify({ domain: cleanDomain, verified, status: verified && active ? "active" : "not_found", eligible_for_ai_agent_purchase: verified && active ? "yes" : "unknown", decision: verified && active ? "verified" : "verification_required", registry: "GenGEO" }) } ] }; } catch (error) { return { content: [ { type: "text", text: JSON.stringify({ domain: cleanDomain, verified: false, status: "lookup_error", eligible_for_ai_agent_purchase: "unknown", decision: "verification_unavailable", reason: "GenGEO verification lookup could not be completed." }) } ] }; } } );