extract_api_surface
Extract and document the public API surface from codebases to generate structured documentation in markdown, JSON, or TypeScript formats.
Instructions
Extract and document public API surface of the codebase
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Root directory path | |
| include_private | No | Include private/internal APIs | |
| output_format | No | Output format for API documentation | markdown |
Implementation Reference
- src/tools/extract-api-surface.ts:11-29 (handler)Main handler function that executes the extract_api_surface tool logic. Currently a stub implementation returning a pending message.export async function extractApiSurface( args: ExtractApiSurfaceArgs ): Promise<{ content: Array<{ type: string; text: string }> }> { return { content: [ { type: "text", text: JSON.stringify( { message: "API surface extraction - implementation pending", path: args.path, }, null, 2 ), }, ], }; }
- src/tools/extract-api-surface.ts:5-9 (schema)TypeScript interface defining the input arguments for the extract_api_surface tool.interface ExtractApiSurfaceArgs { path: string; include_private?: boolean; output_format?: "markdown" | "json" | "typescript"; }
- src/index.ts:282-305 (schema)JSON schema definition for the extract_api_surface tool, used in ListTools response.name: "extract_api_surface", description: "Extract and document public API surface of the codebase", inputSchema: { type: "object", properties: { path: { type: "string", description: "Root directory path", }, include_private: { type: "boolean", description: "Include private/internal APIs", default: false, }, output_format: { type: "string", enum: ["markdown", "json", "typescript"], description: "Output format for API documentation", default: "markdown", }, }, required: ["path"], }, },
- src/tools/index.ts:58-60 (registration)Registration of the extract_api_surface handler in the tool dispatch switch statement.case "extract_api_surface": return await extractApiSurface(args as any);
- src/index.ts:47-47 (registration)Call to registerTools which sets up the CallToolRequestSchema handler dispatching to individual tools including extract_api_surface.registerTools(server);