billing
Check your credit balance, view subscription status, or open the account management portal.
Instructions
Check credit balance, subscription status, or open billing portal.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | No | Billing action | status |
Implementation Reference
- src/index.js:61-62 (registration)The 'billing' tool is registered as part of the STATIC_TOOLS array (fallback catalog) on line 61. It has an inputSchema with an 'action' enum (status/portal/usage). The actual handler is not in this file — it is proxied via the remote MCP server at api.mcpanalytics.ai/mcp when an API key is available.
{ name: "billing", description: "Check credit balance, subscription status, or open billing portal.", inputSchema: { type: "object", properties: { action: { type: "string", enum: ["status", "portal", "usage"], description: "Billing action", default: "status" } } } }, { name: "module_request", description: "Request a custom analysis module to be built for your use case.", inputSchema: { type: "object", properties: { description: { type: "string", description: "Describe the analysis you need" } }, required: ["description"] } }, - src/index.js:61-62 (schema)The input schema for 'billing' defines an 'action' property of type string with enum values ['status', 'portal', 'usage'] and a default of 'status'.
{ name: "billing", description: "Check credit balance, subscription status, or open billing portal.", inputSchema: { type: "object", properties: { action: { type: "string", enum: ["status", "portal", "usage"], description: "Billing action", default: "status" } } } }, { name: "module_request", description: "Request a custom analysis module to be built for your use case.", inputSchema: { type: "object", properties: { description: { type: "string", description: "Describe the analysis you need" } }, required: ["description"] } }, - src/index.js:121-146 (handler)The CallToolRequestSchema handler proxies all tool calls, including 'billing', to the remote MCP server via remoteClient.callTool(). This is a generic proxy — there is no local billing-specific logic; the real handler lives on the remote server.
server.setRequestHandler(CallToolRequestSchema, async (request) => { if (!remoteClient) { return { content: [ { type: "text", text: "MCP Analytics API key required. Set MCP_ANALYTICS_API_KEY in your environment.\nGet a free key at https://app.mcpanalytics.ai", }, ], isError: true, }; } try { const result = await remoteClient.callTool({ name: request.params.name, arguments: request.params.arguments || {}, }); return result; } catch (err) { return { content: [{ type: "text", text: `Error: ${err.message}` }], isError: true, }; } });