API Documentation Generator
Read API source code, extract endpoint definitions, and generate structured documentation
Example Prompt
Read the API source code in the src/routes directory and generate API documentation
About
Scans a project's source code to identify API route definitions, request/response schemas, and middleware. Extracts endpoint metadata including methods, paths, parameters, and return types, then generates well-structured API documentation and writes it to the repository.
Workflow Steps
List the project directory structure to locate API route files
๐ List DirectoryRead each route file to extract endpoint definitions and schemas
๐ Read FileAnalyze extracted endpoints to build a structured documentation model
๐ง Structured ReasoningGenerate formatted API documentation from the model
๐ง Structured ReasoningWrite the generated documentation to the project's docs directory
โ๏ธ Write FileTools Used
List Directory
List all files and subdirectories in a given directory path
Read File
Read the contents of a file at a specified path on the local filesystem
Write File
Write or overwrite a file at a specified path with the given content
Read Repo File
Read the contents of a file from a GitHub repository at a specific branch or commit
Structured Reasoning
Break down a complex problem into sequential reasoning steps with explicit chain-of-thought