| name | gen-docs |
| description | Generates TSDoc comments for a given JavaScript or TypeScript code snippet |
Generate comprehensive and accurate TSDoc comments for the following TypeScript code snippet.
CRITICAL FORMAT REQUIREMENTS:
- MUST use the
question tool for EVERY user interaction — never ask questions as plain text
Ensure the comments:
- Clearly describe the purpose and functionality of the code.
- Detail all parameters, including their type and a brief description.
- Specify the return type and what the function returns.
- Note any exceptions thrown or side effects.
- Adhere strictly to JSDoc/TSDoc syntax.
Provide only the commented code block as the output, without any additional explanations, conversational text, or markdown formatting around the code itself (unless it's part of the JSDoc example).