getTopLevelDeclarations
Extract and filter top-level declarations in PureScript code to retrieve names, types, and full source code. Supports regex-based filtering for precise analysis of functions, data types, or classes.
Instructions
Get detailed information about all main definitions in PureScript code: names, types (function/data/class), and full source code. Includes filtering options to find specific items. More comprehensive than getTopLevelDeclarationNames.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "getTopLevelDeclarations"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | PureScript code string. | |
| filePath | No | Absolute path to the PureScript file. Only absolute paths are supported. | |
| filters | No | Optional filters to apply to the declarations. |