gaudio_get_key_info
Retrieve API key details including description, creation date, status, permitted models, project name, and remaining credits.
Instructions
Get API key information: description, creation date, status, permitted models, project name, and remaining credits (free + paid).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/get-key-info.ts:4-22 (handler)The tool handler function that registers 'gaudio_get_key_info' with the MCP server. Calls client.getKeyInfo(), wraps the response in MCP text content.
export function registerGetKeyInfo(server: McpServer, client: GaudioClient) { server.tool( "gaudio_get_key_info", "Get API key information: description, creation date, status, permitted models, project name, and remaining credits (free + paid).", {}, async () => { const res = await client.getKeyInfo(); return { content: [ { type: "text" as const, text: JSON.stringify(res.resultData, null, 2), }, ], }; }, ); } - src/tools/get-key-info.ts:8-8 (schema)Input schema for the tool - empty object (no parameters needed).
{}, - src/index.ts:33-33 (registration)Registration call: registerGetKeyInfo(server, client) is invoked during server setup.
registerGetKeyInfo(server, client); - src/index.ts:12-12 (registration)Import statement for registerGetKeyInfo from the tools/get-key-info module.
import { registerGetKeyInfo } from "./tools/get-key-info.js"; - src/api/client.ts:175-177 (helper)Client helper method getKeyInfo() that sends a GET request to /key/info endpoint on the Gaudiolab REST API.
async getKeyInfo(): Promise<ApiResponse> { return this.request("GET", "/key/info"); }