insumer_merchant_status
Retrieve full private merchant details including credits, token configurations, NFT collections, directory status, verification status, and payment settings. Owner-only access.
Instructions
Get full private merchant details: credits, token configs, NFT collections, directory status, verification status, payment settings. Owner only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Merchant ID |
Implementation Reference
- src/index.ts:525-538 (registration)Registration of the 'insumer_merchant_status' tool via `server.tool()`. Defines name, description, schema (id: string), and handler that calls the API.
server.tool( "insumer_merchant_status", "Get full private merchant details: credits, token configs, NFT collections, directory status, verification status, payment settings. Owner only.", { id: z.string().describe("Merchant ID"), }, async (args) => { const result = await apiCall( "GET", `/merchants/${encodeURIComponent(args.id)}/status` ); return formatResult(result); } ); - src/index.ts:531-537 (handler)Handler function for 'insumer_merchant_status'. Makes a GET request to /merchants/{id}/status and returns formatted result.
async (args) => { const result = await apiCall( "GET", `/merchants/${encodeURIComponent(args.id)}/status` ); return formatResult(result); } - src/index.ts:528-530 (schema)Input schema for 'insumer_merchant_status'. Takes a single 'id' parameter of type string.
{ id: z.string().describe("Merchant ID"), }, - src/index.ts:17-40 (helper)The `apiCall` helper function used by the handler to make HTTP requests with the API key.
async function apiCall( method: string, path: string, body?: Record<string, unknown> ): Promise<{ ok: boolean; data?: unknown; error?: unknown; meta?: unknown }> { if (!apiKey) { return { ok: false, error: "INSUMER_API_KEY is not set. Call the insumer_setup tool to generate a free API key instantly, then add it to your MCP config as INSUMER_API_KEY and restart." }; } const url = `${API_BASE}${path}`; const res = await fetch(url, { method, headers: { "Content-Type": "application/json", "X-API-Key": apiKey, }, body: body ? JSON.stringify(body) : undefined, }); return res.json() as Promise<{ ok: boolean; data?: unknown; error?: unknown; meta?: unknown; }>; } - src/index.ts:61-76 (helper)The `formatResult` helper function used by the handler to format the API response.
function formatResult(result: { ok: boolean; data?: unknown; error?: unknown; meta?: unknown; }) { if (result.ok) { return { content: [{ type: "text" as const, text: JSON.stringify(result, null, 2) }], }; } return { content: [{ type: "text" as const, text: JSON.stringify(result, null, 2) }], isError: true, }; }