venice_get_rate_limit_logs
Retrieve historical rate limit usage logs to monitor API consumption and manage quotas effectively.
Instructions
Get rate limit usage history logs
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/admin/index.ts:101-106 (handler)Handler function that executes the tool logic: fetches rate limit logs from the Venice API and returns formatted JSON or error.async () => { const response = await veniceAPI("/api_keys/rate_limits/logs"); const data = await response.json() as { data?: unknown; error?: { message?: string } }; if (!response.ok) return { content: [{ type: "text" as const, text: `Error: ${data.error?.message || response.statusText}` }] }; return { content: [{ type: "text" as const, text: JSON.stringify(data.data, null, 2) }] }; }
- src/tools/admin/index.ts:97-107 (registration)Registers the venice_get_rate_limit_logs tool with the MCP server, using an empty input schema and the inline handler.server.tool( "venice_get_rate_limit_logs", "Get rate limit usage history logs", {}, async () => { const response = await veniceAPI("/api_keys/rate_limits/logs"); const data = await response.json() as { data?: unknown; error?: { message?: string } }; if (!response.ok) return { content: [{ type: "text" as const, text: `Error: ${data.error?.message || response.statusText}` }] }; return { content: [{ type: "text" as const, text: JSON.stringify(data.data, null, 2) }] }; } );
- src/index.ts:18-18 (registration)Top-level call to registerAdminTools, which registers the admin tools including venice_get_rate_limit_logs.registerAdminTools(server);