Skip to content

MCP Tools Reference

The Renamify MCP Server provides 10 specialized tools for AI agents to perform intelligent renaming operations.

Search for identifiers across your codebase to understand their usage before renaming.

ParameterTypeRequiredDefaultDescription
searchstring✅ Yes-The identifier to search for
pathsstring[]NoCurrent dirPaths to search (files or directories)
includesstring[]NoAll filesGlob patterns to include
excludesstring[]NoNoneGlob patterns to exclude
stylesstring[]NoAll stylesCase styles to detect
previewstringNosummaryOutput format
dryRunbooleanNofalsePreview without saving
renameFilesbooleanNotrueInclude file renames in search
renameDirsbooleanNotrueInclude directory renames in search
atomicSearchbooleanNofalseTreat search term as indivisible unit
Tool: renamify_search
Arguments: {
"search": "UserAccount",
"includes": ["src/**/*.ts", "src/**/*.tsx"],
"preview": "summary"
}
Result:
Found 45 occurrences across 12 files:
UserAccount (15)
userAccount (18)
user_account (8)
USER_ACCOUNT (4)
Files that would be renamed: 2
Directories that would be renamed: 0

Use this tool to explore the codebase before creating a renaming plan.

Creates a comprehensive renaming plan that identifies all case variations of your identifiers.

ParameterTypeRequiredDefaultDescription
oldstring✅ Yes-The identifier to replace
newstring✅ Yes-The new identifier
pathsstring[]NoCurrent dirPaths to search (files or directories)
includesstring[]NoAll filesGlob patterns to include
excludesstring[]NoNoneGlob patterns to exclude
stylesstring[]NoAll stylesCase styles to detect
previewstringNosummaryOutput format
dryRunbooleanNofalsePreview without saving
renameFilesbooleanNotrueRename matching files
renameDirsbooleanNotrueRename matching directories
atomicSearchbooleanNofalseTreat search term as indivisible unit
atomicReplacebooleanNofalseTreat replace term as indivisible unit

Available case style options:

  • snake - snake_case
  • camel - camelCase
  • pascal - PascalCase
  • kebab - kebab-case
  • screaming-snake - SCREAMING_SNAKE_CASE
  • title - Title Case
  • train - Train-Case
  • screaming-train - SCREAMING-TRAIN-CASE
  • dot - dot.case
  • lower-flat - lowerjoined (no separators)
  • upper-flat - UPPERJOINED (no separators)
  • sentence - Sentence case
  • lower-sentence - lower sentence
  • upper-sentence - UPPER SENTENCE
  • space-separated - Shorthand for all space-separated styles
  • summary - AI-optimized concise format
  • table - Human-readable table
  • diff - Unified diff format
  • json - Full structured data
Tool: renamify_plan
Arguments: {
"old": "UserAccount",
"new": "CustomerAccount",
"includes": ["src/**/*.ts", "tests/**/*.ts"],
"excludes": ["node_modules/**", "dist/**"],
"styles": ["camel", "pascal", "snake"],
"preview": "summary",
"dryRun": false
}
Tool: renamify_plan
Arguments: {
"old": "DocSpring",
"new": "FormAPI",
"atomicSearch": true,
"atomicReplace": true,
"preview": "summary"
}

With atomic identifiers, compound words like “DocSpring” are treated as single units, preventing unwanted word boundary detection (e.g., doc_spring).

Created plan: a3b7c9d4e8f2a6b1
Summary:
Files to modify: 12
Total replacements: 47
Variants found:
UserAccount (15)
userAccount (18)
user_account (8)
USER_ACCOUNT (6)
Files to rename: 3
src/UserAccount.ts → src/CustomerAccount.ts
tests/userAccount.test.ts → tests/customerAccount.test.ts
docs/user-account.md → docs/customer-account.md

Applies a renaming plan to make the actual changes to your codebase.

ParameterTypeRequiredDefaultDescription
planIdstringNoLatestSpecific plan ID to apply
planPathstringNoAutoPath to plan file
commitbooleanNofalseCreate git commit after
Tool: renamify_apply
Arguments: {
"commit": true
}
Successfully applied plan a3b7c9d4e8f2a6b1
✓ Modified 12 files
✓ Applied 47 replacements
✓ Renamed 3 files
✓ Created git commit: "renamify: rename UserAccount to CustomerAccount"
All changes applied successfully.

If conflicts are detected:

Error: Conflicts detected in 2 files:
- src/api/handlers.ts: Content changed since plan creation
- lib/database.ts: File no longer exists
Run 'renamify_plan' again to create a fresh plan with current file state.

Reverts a previously applied renaming operation.

ParameterTypeRequiredDefaultDescription
idstringNolatestHistory ID to undo (use “latest” for most recent non-revert entry)
Tool: renamify_undo
Arguments: {
"id": "a3b7c9d4e8f2a6b1"
}
Successfully undone renaming a3b7c9d4e8f2a6b1
✓ Reverted 47 replacements in 12 files
✓ Restored 3 renamed files
All changes have been reverted.

Re-applies a previously undone renaming.

ParameterTypeRequiredDefaultDescription
idstringNolatestHistory ID to redo (use “latest” for most recent reverted entry)
Tool: renamify_redo
Arguments: {
"id": "a3b7c9d4e8f2a6b1"
}
Successfully redone renaming a3b7c9d4e8f2a6b1
✓ Re-applied 47 replacements in 12 files
✓ Re-renamed 3 files
All changes have been re-applied.

Shows the history of renaming operations.

ParameterTypeRequiredDefaultDescription
limitnumberNo10Number of entries to show
Tool: renamify_history
Arguments: {
"limit": 5
}
Renaming History (last 5 operations):
1. 4e8f2a6b1d3c7a9b [APPLIED]
getUserData → fetchUserData
12 files, 38 replacements
Applied: 1734567890
2. a3b7c9d4e8f2a6b1 [UNDONE]
UserAccount → CustomerAccount
12 files, 47 replacements
Applied: 1734567800
Undone: 1734567900
3. 6b1d3a7c9e4f8a2b [APPLIED]
snake_case → camelCase (config migration)
8 files, 156 replacements
Applied: 1734567600

Shows the current status of Renamify, including pending plans and system state.

This tool takes no parameters.

Tool: renamify_status
Arguments: {}
Renamify Status:
Current Directory: /home/user/project
Git Branch: feature/renaming
Git Status: Clean (no uncommitted changes)
Pending Plans:
1d3a7c9e4f8b2a6c - oldFunction → newFunction
Created: 5 minutes ago
Status: Not applied
Files: 8, Replacements: 23
Last Applied:
4e8f2a6b1d3c7a9b - getUserData → fetchUserData
Applied: 1 hour ago
Status: Success
System:
Renamify Version: 1.2.0
Config: .renamify/config.toml found
History Entries: 47

Preview a plan in different formats without applying changes.

ParameterTypeRequiredDefaultDescription
planIdstringNoLatestPlan ID to preview
planPathstringNoAutoPath to plan file
formatstringNosummaryPreview format
  • summary - Concise AI-friendly format
  • table - Detailed table view
  • diff - Unified diff format
  • json - Raw JSON data
Tool: renamify_preview
Arguments: {
"format": "diff"
}
--- a/src/components/UserAccount.tsx
+++ b/src/components/CustomerAccount.tsx
@@ -1,8 +1,8 @@
-import { UserAccount } from '../types';
+import { CustomerAccount } from '../types';
-interface UserAccountProps {
- account: UserAccount;
+interface CustomerAccountProps {
+ account: CustomerAccount;
}
-export function UserAccountComponent({ account }: UserAccountProps) {
+export function CustomerAccountComponent({ account }: CustomerAccountProps) {

Perform case-aware renaming in a single step (combines plan + apply).

ParameterTypeRequiredDefaultDescription
oldstring✅ Yes-The identifier to replace
newstring✅ Yes-The new identifier
pathsstring[]NoCurrent dirPaths to search
dryRunbooleanNofalsePreview without applying
previewstringNosummaryPreview format
excludeStylesstring[]NoNoneCase styles to exclude
includeStylesstring[]NoNoneAdditional case styles
onlyStylesstring[]NoNoneUse only these styles
atomicSearchbooleanNofalseTreat search term as indivisible
atomicReplacebooleanNofalseTreat replace term as indivisible
Tool: renamify_rename
Arguments: {
"old": "getUserInfo",
"new": "fetchUserProfile",
"paths": ["src"],
"dryRun": true
}
  • Quick renames without saving a plan
  • Simple refactorings with immediate apply
  • When you don’t need to review changes beforehand

Perform simple regex or literal string replacement without case transformations.

ParameterTypeRequiredDefaultDescription
patternstring✅ Yes-Search pattern (regex or literal)
replacementstring✅ Yes-Replacement string
pathsstring[]NoCurrent dirPaths to search
noRegexbooleanNofalseTreat pattern as literal
previewstringNosummaryPreview format
dryRunbooleanNofalsePreview without applying

Regex replacement:

Tool: renamify_replace
Arguments: {
"pattern": "console\\.log\\((.*?)\\)",
"replacement": "logger.debug($1)",
"paths": ["src"]
}

Literal replacement:

Tool: renamify_replace
Arguments: {
"pattern": "http://localhost:3000",
"replacement": "https://api.example.com",
"noRegex": true
}
  • URL or endpoint replacements
  • Regex-based transformations
  • Literal string replacements without case variations
  • When you explicitly DON’T want case transformations
graph LR
A[renamify_plan] --> B[renamify_preview]
B --> C{Review OK?}
C -->|Yes| D[renamify_apply]
C -->|No| E[Adjust & re-plan]
D --> F{Success?}
F -->|No| G[renamify_undo]
F -->|Yes| H[Complete]
  1. Always plan before applying

    • Use renamify_plan first
    • Review with renamify_preview if needed
    • Only then use renamify_apply
  2. Use specific includes when possible

    • Target specific directories: ["src/**/*.ts"]
    • Exclude test files if not needed: ["!**/*.test.ts"]
  3. Check status before operations

    • Use renamify_status to verify clean state
    • Ensure no pending uncommitted changes
  4. Handle errors gracefully

    • Check for “conflicts detected” messages
    • Use renamify_undo if something goes wrong
    • Re-plan if files have changed
ErrorCauseSolution
”Renamify CLI not available”Binary not in PATHCheck installation
”No matches found”Pattern too restrictiveBroaden search criteria
”Conflicts detected”Files changed since planCreate new plan
”Plan not found”Invalid plan IDCheck with renamify_history
”Permission denied”File permissionsCheck file ownership

When apply fails:

  1. Note the error message
  2. Use renamify_status to check state
  3. If partially applied, use renamify_undo
  4. Fix the issue and create a new plan

When patterns don’t match:

  1. Start with broader patterns
  2. Use dryRun: true to test
  3. Adjust styles array if needed
  4. Check file extensions in includes

For repositories with >10,000 files:

  • Use specific includes patterns
  • Exclude build/dist directories
  • Consider breaking into multiple operations

The MCP Server loads plans into memory:

  • Plans typically < 1MB for most renames
  • Very large plans (>10MB) may need chunking
  • Use format: "summary" for efficiency

Usage Examples

See real-world renaming scenarios

AI Agent Guide

Best practices for AI-assisted renaming