Skip to main content
Glama

Tree-Hugger-JS MCP Server

by qckfx

rename_identifier

Refactor JavaScript/TypeScript code by renaming identifiers intelligently across files. Ensures accuracy by excluding strings and comments. Preview changes before applying.

Instructions

Intelligently rename all occurrences of an identifier throughout the code. Avoids renaming in strings/comments.

Examples: • Refactor function names: rename_identifier('fetchData', 'fetchUserData') • Improve variable names: rename_identifier('data', 'userData') • Update class names: rename_identifier('Manager', 'UserManager') • API consistency: rename_identifier('getUserInfo', 'fetchUserInfo') • Preview first: rename_identifier('oldName', 'newName', {preview: true}) • Legacy code update: rename_identifier('XMLHttpRequest', 'fetch')

Input Schema

NameRequiredDescriptionDefault
newNameYesNew identifier name (should be valid JavaScript identifier)
oldNameYesCurrent identifier name to find and replace
previewNoReturn preview only without applying changes (default: false). Always preview first for safety.

Input Schema (JSON Schema)

{ "properties": { "newName": { "description": "New identifier name (should be valid JavaScript identifier)", "type": "string" }, "oldName": { "description": "Current identifier name to find and replace", "type": "string" }, "preview": { "description": "Return preview only without applying changes (default: false). Always preview first for safety.", "type": "boolean" } }, "required": [ "oldName", "newName" ], "type": "object" }
Install Server

Other Tools from Tree-Hugger-JS 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/qckfx/tree-hugger-js-mcp'

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