Skip to main content
Glama

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

TableJSON Schema
NameRequiredDescriptionDefault
actionNoBilling actionstatus

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"] } },
  • 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"] } },
  • 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,
        };
      }
    });
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must carry the burden. It indicates only read-like actions (check, open) but does not disclose if any action has side effects (e.g., opening portal might redirect). The description is adequate but lacks depth.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that efficiently conveys the core purpose and actions. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (one optional parameter, no output schema), the description is sufficient for an agent to understand its purpose. Could briefly note that it returns billing information, but not required.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, and the description adds value by listing the three enum actions in a human-readable sentence, complementing the schema's formal definition.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's actions: check credit balance, subscription status, or open billing portal. This distinguishes it from sibling tools which cover different domains like agents, datasets, etc.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies use for billing-related queries but does not explicitly state when to use this tool vs alternatives. There is no guidance on prerequisites or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/embeddedlayers/mcp-analytics'

If you have feedback or need assistance with the MCP directory API, please join our Discord server