Expand description
JavaScript parser for extracting tool definitions from JSDoc comments.
This parser extracts tool definitions from a JSDoc comment block associated with a function. It expects a single, well-formed JSDoc block in the file.
The following annotations are supported:
- A multiline description of the tool.
@property {type} [name] - description
: Defines a parameter.[]
make it optional.@env {VAR_NAME} [description]
: Defines a required environment variable.@meta require-tools <tool1> <tool2>
: Lists required external tools.
Functionsยง
- parse
- Parses a JavaScript file and extracts a
ToolDefinition
from its JSDoc.