Skip to main content
Glama

Tree-Hugger-JS MCP Server

by qckfx
MIT License
165
1

parse_code

Parse JavaScript/TypeScript code from a file or string, creating an AST state for analysis with other tools. Use to prepare code for review, analyze legacy scripts, or process React components.

Instructions

Parse JavaScript/TypeScript code from file or string and load it into the AST state. Must be called before using other analysis tools.

Examples: • Parse a React component: parse_code('./src/UserProfile.jsx') • Parse code string: parse_code('function hello() { return "world"; }') • Parse with explicit language: parse_code('./config.js', language='javascript') • Analyze legacy code: parse_code('./old-script.js') then use other tools to understand structure • Code review prep: parse_code('./feature.ts') then get_functions() to review all functions

Input Schema

NameRequiredDescriptionDefault
isFilePathNoWhether source is a file path (true) or code string (false). Defaults to auto-detect.
languageNoLanguage to use (javascript, typescript, jsx, tsx). Auto-detected if not provided.
sourceYesFile path (./src/app.js) or code string ('const x = 1;')

Input Schema (JSON Schema)

{ "properties": { "isFilePath": { "description": "Whether source is a file path (true) or code string (false). Defaults to auto-detect.", "type": "boolean" }, "language": { "description": "Language to use (javascript, typescript, jsx, tsx). Auto-detected if not provided.", "type": "string" }, "source": { "description": "File path (./src/app.js) or code string ('const x = 1;')", "type": "string" } }, "required": [ "source" ], "type": "object" }

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/qckfx/tree-hugger-js-mcp'

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