Skip to main content
Glama

get_api_usage

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

Instructions

Get the usage of the API

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool handler for 'get_api_usage': calls ipfind.apiRequest.getAPIUsage() and formats response as JSON text.
    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), }, ], }; }
  • TypeScript type definition for the output schema of get_api_usage (IPFindUsageResponse).
    export type IPFindUsageResponse = { request_count: number; daily_request_limit: number; remaining: number; };
  • src/index.ts:68-75 (registration)
    Tool registration in ListTools response: defines name, description, and empty input schema for get_api_usage.
    { name: "get_api_usage", description: "Get the usage of the API", inputSchema: { type: "object", properties: {}, }, },
  • Core implementation: makes HTTP request to IPFind API /usage endpoint using the API key.
    async getAPIUsage(): Promise<IPFindUsageResponse> { return await this.makeRequest<IPFindUsageResponse>( `/usage?auth=${this.apiKey}` ); }

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