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; };

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