get_api_status
Check Carbone API health and version to verify connectivity and identify the active API version.
Instructions
Check Carbone API health and version. Returns the current API version and a status message. Useful for verifying connectivity and confirming which Carbone version is active.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/info.ts:14-28 (handler)The main handler function for the get_api_status tool. Calls client.getStatus() and returns the API version and message as text content.
export async function handleGetApiStatus(client: CarboneClient, options?: CallOptions) { try { const status = await client.getStatus(options); return { content: [ { type: 'text' as const, text: `Carbone API: online (v${status.version})\nMessage: ${status.message}`, }, ], }; } catch (error) { return { content: [{ type: 'text' as const, text: formatError(error) }], isError: true }; } } - src/tools/info.ts:12-12 (schema)Schema definition for get_api_status — an empty schema {} since no input parameters are required.
export const getApiStatusSchema = {}; - src/tools/index.ts:111-115 (registration)Registration of the get_api_status tool with the MCP server. Uses getApiStatusToolName, description, and binds handleGetApiStatus with the client.
server.registerTool( getApiStatusToolName, { description: getApiStatusDescription }, (extra) => handleGetApiStatus(client, { apiKey: extra.authInfo?.token }) ); - src/carbone/client.ts:305-309 (helper)Client method getStatus() that makes the actual HTTP GET /status request to the Carbone API and returns ApiStatus (version, message).
async getStatus(options?: CallOptions): Promise<ApiStatus> { const response = await this.request('/status', { method: 'GET' }, { ...options, skipAuthCheck: true }); const json = await response.json() as { version: string; message: string }; return { version: json.version, message: json.message }; } - src/carbone/types.ts:38-39 (schema)Type definition for ApiStatus containing version (string) and message (string) fields.
export interface ApiStatus { version: string;