Skip to main content
Glama

Tree-Hugger-JS MCP Server

by qckfx
MIT License
165
1

find_pattern

Search and locate specific nodes in JavaScript or TypeScript code using intuitive syntax. Ideal for pinpointing functions, classes, JSX elements, or debug calls in a codebase.

Instructions

Find first node matching the specified pattern using tree-hugger-js intuitive syntax. Use for targeted searches when you need one specific match.

Examples: • Find main function: find_pattern('function[name="main"]') • Find React component: find_pattern('function[name="UserProfile"]') • Find async functions: find_pattern('function[async]') • Find specific class: find_pattern('class[name="UserManager"]') • Find error handling: find_pattern('call[text*="catch"]') • Find JSX with props: find_pattern('jsx(jsx-attribute[name="className"])') • Debug specific calls: find_pattern('call[text*="console.log"]')

Input Schema

NameRequiredDescriptionDefault
patternYesPattern using intuitive syntax: 'function', 'class[name="MyClass"]', 'function[async]', 'call[text*="fetch"]'

Input Schema (JSON Schema)

{ "properties": { "pattern": { "description": "Pattern using intuitive syntax: 'function', 'class[name=\"MyClass\"]', 'function[async]', 'call[text*=\"fetch\"]'", "type": "string" } }, "required": [ "pattern" ], "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