get_api_reference
Retrieve Backstage API references for REST endpoints, GraphQL, and client libraries to support plugin development and framework customization.
Instructions
Get Backstage API reference including REST endpoints, GraphQL, and client libraries
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| api | No | Specific API to retrieve (optional) |
Implementation Reference
- src/index.ts:241-254 (handler)The handler function that executes the get_api_reference tool. It fetches the API reference content from the knowledge base, optionally filtered by the 'api' parameter, and returns it as JSON-formatted text.private getApiReference(api?: string) { const content = api ? this.knowledgeBase.api.content[api] : this.knowledgeBase.api.content; return { content: [ { type: 'text', text: JSON.stringify(content, null, 2), }, ], }; }
- src/index.ts:81-89 (schema)Input schema for the get_api_reference tool, defining an optional 'api' string parameter with predefined enum values for specific Backstage APIs.inputSchema: { type: 'object', properties: { api: { type: 'string', description: 'Specific API to retrieve (optional)', enum: ['catalogApi', 'scaffolderApi', 'techDocsApi', 'authApi', 'searchApi', 'proxyApi', 'graphqlApi'] } }
- src/index.ts:78-91 (registration)Registration of the get_api_reference tool in the listTools response, specifying name, description, and input schema.{ name: 'get_api_reference', description: 'Get Backstage API reference including REST endpoints, GraphQL, and client libraries', inputSchema: { type: 'object', properties: { api: { type: 'string', description: 'Specific API to retrieve (optional)', enum: ['catalogApi', 'scaffolderApi', 'techDocsApi', 'authApi', 'searchApi', 'proxyApi', 'graphqlApi'] } } } },
- src/index.ts:180-181 (registration)Dispatch case in the CallToolRequest handler that routes get_api_reference calls to the getApiReference method.case 'get_api_reference': return this.getApiReference(args?.api as string);