Skip to main content
Glama
sgup
by sgup

check_usage

Monitor API usage and limits to track monthly quota, usage count, and remaining requests for icon retrieval operations.

Instructions

Check current API usage and limits. Returns monthly quota information including usage count and remaining requests.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool execution handler for 'check_usage'. Dispatches to api.checkUsage() and returns the result as formatted JSON text content.
    case 'check_usage': { const result = await api.checkUsage(); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }
  • Tool schema definition for 'check_usage', including name, description, and empty input schema (no parameters required).
    name: 'check_usage', description: 'Check current API usage and limits. Returns monthly quota information including usage count and remaining requests.', inputSchema: { type: 'object', properties: {}, }, },
  • src/index.ts:42-46 (registration)
    Registers the handler for listing available tools via MCP's ListToolsRequestSchema, exposing the 'check_usage' tool schema from TOOLS array.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: TOOLS, }; });
  • Helper method in NounProjectAPI class that performs the actual API call to check usage limits and returns the response data.
    async checkUsage() { const url = `${BASE_URL}/v2/client/usage`; const headers = this.oauth.getHeaders(url); const response = await this.client.get('/v2/client/usage', { headers, }); return response.data; }

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/sgup/noun-project-mcp'

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