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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:114-124 (handler)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), }, ], }; }
- src/tools.ts:150-157 (schema)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, }; });
- src/api.ts:181-190 (helper)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; }