Skip to main content
Glama

PureScript MCP Server

by avi892nash

getTopLevelDeclarations

Extract and filter main definitions from PureScript code, including names, types, and source text. Use file path or code input with optional regex filters for specific results.

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.

Input Schema

NameRequiredDescriptionDefault
codeNoPureScript code string.
filePathNoAbsolute path to the PureScript file. Only absolute paths are supported.
filtersNoOptional filters to apply to the declarations.

Input Schema (JSON Schema)

{ "additionalProperties": false, "description": "Exactly one of 'filePath' or 'code' must be provided. Filters are optional.", "properties": { "code": { "description": "PureScript code string.", "type": "string" }, "filePath": { "description": "Absolute path to the PureScript file. Only absolute paths are supported.", "type": "string" }, "filters": { "additionalProperties": false, "description": "Optional filters to apply to the declarations.", "properties": { "name": { "description": "Regex to filter declarations by name.", "type": "string" }, "type": { "description": "Regex to filter declarations by their mapped type (e.g., DeclData, DeclValue).", "type": "string" }, "value": { "description": "Regex to filter declarations by their full text value.", "type": "string" } }, "type": "object" } }, "type": "object" }
Install Server

Other Tools from PureScript MCP Server

Related Tools

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/avi892nash/purescript-mcp-tools'

If you have feedback or need assistance with the MCP directory API, please join our Discord server