check_usage
Monitor your Noun Project API usage to track monthly quota consumption and remaining requests for icon searches.
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/api.ts:178-190 (handler)The core handler function checkUsage() that fetches and returns the current API usage and quota limits from the Noun Project API./** * Check current API usage and limits */ 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; }
- src/tools.ts:149-157 (schema)Defines the tool schema 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 all tools, including 'check_usage', by returning the TOOLS array in response to ListToolsRequest.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: TOOLS, }; });
- src/index.ts:114-124 (handler)Dispatches the 'check_usage' tool call by invoking api.checkUsage() and formatting the response as MCP content.case 'check_usage': { const result = await api.checkUsage(); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }