Skip to main content
Glama

check_allowance

Check remaining daily API calls for EskomSePush. Monitor your usage to avoid exceeding the 50-call free tier limit.

Instructions

Check how many EskomSePush API calls you have remaining today. Free tier allows 50 calls per day.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The tool handler function that calls client.getAllowance() and formats the response showing API quota usage (count, limit, remaining, type).
    server.tool(
      "check_allowance",
      "Check how many EskomSePush API calls you have remaining today. Free tier allows 50 calls per day.",
      {},
      async () => {
        const data = await client.getAllowance();
        const { count, limit, type } = data.allowance;
        const remaining = limit - count;
        const pct = Math.round((remaining / limit) * 100);
    
        return {
          content: [
            {
              type: "text",
              text: [
                "## 📊 API Allowance",
                "",
                `Plan: **${type}**`,
                `Used today: **${count} / ${limit}**`,
                `Remaining: **${remaining}** (${pct}%)`,
                "",
                remaining < 10
                  ? "⚠️ Running low — use `test: true` on tools to avoid burning quota."
                  : "✅ You have plenty of quota left.",
              ].join("\n"),
            },
          ],
        };
      }
  • src/index.ts:198-228 (registration)
    Registration of 'check_allowance' tool via server.tool() with empty schema (no input params) and a description.
    // ── Tool 5: Check API quota ──────────────────────────────────────────────────
    server.tool(
      "check_allowance",
      "Check how many EskomSePush API calls you have remaining today. Free tier allows 50 calls per day.",
      {},
      async () => {
        const data = await client.getAllowance();
        const { count, limit, type } = data.allowance;
        const remaining = limit - count;
        const pct = Math.round((remaining / limit) * 100);
    
        return {
          content: [
            {
              type: "text",
              text: [
                "## 📊 API Allowance",
                "",
                `Plan: **${type}**`,
                `Used today: **${count} / ${limit}**`,
                `Remaining: **${remaining}** (${pct}%)`,
                "",
                remaining < 10
                  ? "⚠️ Running low — use `test: true` on tools to avoid burning quota."
                  : "✅ You have plenty of quota left.",
              ].join("\n"),
            },
          ],
        };
      }
    );
  • The getAllowance() method on EskomSePushClient that makes an HTTP GET to /api_allowance endpoint and returns the Allowance response.
    async getAllowance(): Promise<Allowance> {
      const { data } = await this.http.get<Allowance>("/api_allowance");
      return data;
    }
  • The Allowance interface defining the response shape: { allowance: { count, limit, type } }.
    export interface Allowance {
      allowance: {
        count: number;
        limit: number;
        type: string;
      };
    }
Behavior4/5

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

No annotations are provided, so the description carries full burden. It discloses that the operation is a read (check) and mentions the free tier limit (50 calls per day). It does not detail side effects because none exist.

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?

Two sentences, front-loaded with key action and resource, and no wasted words. Highly concise.

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

Completeness5/5

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

Given no parameters, no output schema, and simple purpose, the description provides all necessary context, including the free tier limit. No critical gaps.

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?

The input schema has zero parameters, so baseline is 4. The description inherently says no parameters are needed, which is sufficient.

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 checks remaining API calls, using a specific verb ('Check') and resource ('allowance'). It distinguishes from siblings like get_area_schedule which deal with area data.

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 usage for checking quota but does not explicitly state when to use or when not to use alternatives. Since no sibling tool serves this purpose, the context is clear but lacks direct guidance.

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/zukhanyendiki9-code/eskomsepush-mcp'

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