Skip to main content
Glama

get_api_usage

Check current API usage statistics for IP geolocation services to monitor query limits and track consumption.

Instructions

Get the usage of the API

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core handler function that executes the HTTP request to retrieve API usage from the IPFind service.
    async getAPIUsage(): Promise<IPFindUsageResponse> {
      return await this.makeRequest<IPFindUsageResponse>(
        `/usage?auth=${this.apiKey}`
      );
    }
  • MCP tool call handler that invokes the getAPIUsage implementation and returns the result as JSON text content.
    if (request.params.name === "get_api_usage") {
      const output = await ipfind.apiRequest.getAPIUsage();
    
      if (!output) {
        throw new Error("Failed to fetch API usage.");
      }
    
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(output, null, 2),
          },
        ],
      };
    }
  • src/index.ts:68-75 (registration)
    Tool registration in the ListTools handler, defining name, description, and input schema (no parameters).
    {
      name: "get_api_usage",
      description: "Get the usage of the API",
      inputSchema: {
        type: "object",
        properties: {},
      },
    },
  • TypeScript type definition for the output schema of the get_api_usage tool response.
    export type IPFindUsageResponse = {
        request_count: number;
        daily_request_limit: number;
        remaining: number;
    };
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It only states what the tool does ('Get the usage of the API') without detailing aspects like whether it requires authentication, returns real-time or historical data, includes rate limits, or what format the usage data is in. This leaves significant gaps in understanding the tool's behavior.

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, efficient sentence ('Get the usage of the API') with no wasted words. It is appropriately sized for a simple tool with no parameters and is front-loaded with the core purpose.

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

Completeness2/5

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

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what 'usage' entails (e.g., metrics, limits, time periods) or the return format, which is crucial for an API usage tool. The simplicity of the tool (0 parameters) doesn't fully compensate for these missing behavioral details.

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 0 parameters with 100% coverage, so no parameter documentation is needed. The description doesn't mention parameters, which is appropriate since there are none. It earns a baseline score of 4 for not needing to compensate for any parameter gaps.

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

Purpose3/5

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

The description states the tool's purpose as 'Get the usage of the API', which is a clear verb+resource combination. However, it doesn't differentiate from sibling tools (get_ip_location, get_my_location), which are unrelated location tools, so there's no need for sibling differentiation. The purpose is straightforward but somewhat generic.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives or in what context. It lacks any mention of prerequisites, timing, or related tools, leaving the agent to infer usage based solely on the tool name and purpose.

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/ipfind/ipfind-mcp-server'

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