get_api
Retrieve details of a specific API using its ID. Optionally include collections, versions, schemas, or git info.
Instructions
Get details of a specific API
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| apiId | Yes | API ID | |
| include | No | Additional data to include |
Implementation Reference
- src/tools/api/apis/index.ts:116-124 (handler)Main handler for the 'get_api' tool. Validates apiId, makes a GET request to /apis/{apiId} with optional include parameter, and returns the response data.
async getApi(params: any): Promise<ToolCallResponse> { if (!params.apiId) { throw new McpError(ErrorCode.InvalidParams, 'apiId is required'); } const response = await this.client.get(`/apis/${params.apiId}`, { params: { include: params.include?.join(',') } }); return this.createResponse(response.data); } - src/types/apis.ts:60-63 (schema)Type definition for the get_api tool parameters: apiId (required) and optional include array.
export interface GetApiParams { apiId: string; include?: Array<'collections' | 'versions' | 'schemas' | 'gitInfo'>; } - src/tools/api/apis/definitions.ts:35-56 (registration)Tool definition registration for 'get_api' with name, description, and input schema.
{ name: 'get_api', description: 'Get details of a specific API', inputSchema: { type: 'object', properties: { apiId: { type: 'string', description: 'API ID', }, include: { type: 'array', items: { type: 'string', enum: ['collections', 'versions', 'schemas', 'gitInfo'], }, description: 'Additional data to include', }, }, required: ['apiId'], }, },