idea-mcp

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

IntelliJ IDEA MCP Skill

IntelliJ IDEA MCP Skill

MCP is self-describing - this skill only documents known pitfalls and best practices not covered by MCP descriptions.
MCP 是自描述的——本Skill仅记录MCP描述未涵盖的已知陷阱和最佳实践。

🚨 Critical Pitfalls (MCP Doesn't Warn You)

🚨 关键陷阱(MCP 未发出警告)

Connection Requirements

连接要求

  • IDEA MUST be running with MCP server connected
  • Commands fail silently if IDEA is not running - no clear error message
  • 必须运行IDEA且已连接MCP服务器
  • 如果IDEA未运行,命令会静默失败——没有明确的错误提示

Path Confusion (Most Common Error)

路径混淆(最常见错误)

  • projectPath
    : ABSOLUTE PATH to project root (e.g.,
    /Users/name/project
    )
    • project
      (wrong - relative)
    • /Users/name/project
      (correct - absolute)
  • filePath
    /
    pathInProject
    /
    directoryPath
    : RELATIVE to project root
  • projectPath
    :项目根目录的绝对路径(例如:
    /Users/name/project
    • project
      (错误 - 相对路径)
    • /Users/name/project
      (正确 - 绝对路径)
  • filePath
    /
    pathInProject
    /
    directoryPath
    相对于项目根目录的路径

Search Command Schema Bugs

搜索命令 Schema 漏洞

MCP claims parameters are optional but they're REQUIRED:
  • search_in_files_by_text
    &
    search_in_files_by_regex
    : MUST include
    maxUsageCount
    • Without this → schema error
    • Start with
      maxUsageCount: 10
  • find_files_by_name_keyword
    &
    find_files_by_glob
    : MUST include
    fileCountLimit
    • Without this → schema error "data must have required property 'probablyHasMoreMatchingFiles'"
    • Critical Bug: When
      fileCountLimit > actual matching files
      , MCP server omits
      probablyHasMoreMatchingFiles
      field → schema error
    • Workaround: Start with
      fileCountLimit: 1
      or
      2
      , then increase if needed
    • For common keywords (many matches), higher limits work fine
    • If schema error, reduce
      fileCountLimit
      (not increase)
MCP 声称部分参数是可选的,但实际上它们是必填的:
  • search_in_files_by_text
    search_in_files_by_regex
    必须包含
    maxUsageCount
    参数
    • 缺少该参数会导致Schema错误
    • 建议初始值设为
      maxUsageCount: 10
  • find_files_by_name_keyword
    find_files_by_glob
    必须包含
    fileCountLimit
    参数
    • 缺少该参数会导致Schema错误:"data must have required property 'probablyHasMoreMatchingFiles'"
    • 严重漏洞:当
      fileCountLimit
      大于实际匹配文件数时,MCP服务器会省略
      probablyHasMoreMatchingFiles
      字段,进而引发Schema错误
    • 解决方法:初始值设为
      fileCountLimit: 1
      2
      ,必要时再调高
    • 对于常见关键词(匹配结果多),可以使用更高的限制值
    • 如果出现Schema错误,降低
      fileCountLimit
      (不要调高)

Rename Refactoring Limitations

重命名重构限制

⚠️ MCP doesn't document what rename_refactoring CANNOT do:
  • ✅ Renames: Field/variable declarations and their references
  • ❌ May have limitations with: Method parameters in signatures, certain symbol types (test before relying)
  • Always use
    search_in_files_by_text
    first to understand scope
  • Always verify with
    get_file_problems
    after renaming
⚠️ MCP 未说明 rename_refactoring 无法完成的操作:
  • ✅ 可重命名:字段/变量声明及其引用
  • ❌ 可能存在限制的场景:方法签名中的参数、某些符号类型(使用前请测试)
  • 务必先使用
    search_in_files_by_text
    了解影响范围
  • 务必在重命名后使用
    get_file_problems
    验证

High-Risk Operations

高风险操作

MCP doesn't emphasize danger levels:
  • execute_terminal_command
    : HIGH RISK - Can run ANY shell command with full system permissions (no sandboxing). Use with extreme caution; verify commands before execution.
  • rename_refactoring
    &
    replace_text_in_file
    : Modifies code globally
  • create_new_file
    : Creates files on disk immediately
  • reformat_file
    : Modifies formatting without confirmation
MCP 未强调操作的危险等级:
  • execute_terminal_command
    高风险——可以以完整系统权限运行任意Shell命令(无沙箱限制)。使用时需格外谨慎;执行前务必验证命令。
  • rename_refactoring
    replace_text_in_file
    :会全局修改代码
  • create_new_file
    :会立即在磁盘上创建文件
  • reformat_file
    :无需确认即可修改代码格式

✅ Essential Best Practices

✅ 核心最佳实践

  1. Path discipline: Absolute for
    projectPath
    , relative for everything else
  2. Count parameters: Always include
    maxUsageCount
    for search,
    fileCountLimit
    for file search
  3. File search strategy: Start with
    fileCountLimit: 1-2
    ; if schema error, reduce the limit (bug: limit > matches causes error)
  4. Before refactoring: Search first to understand scope
  5. After changes: Use
    get_file_problems
    to verify no errors introduced
  6. Java accuracy: Prefer IDEA's
    get_file_problems
    over LSP (avoids false positives)
  7. Text replacement: Get exact text with
    get_file_text_by_path
    before replacing
  8. Test execution: Use
    execute_run_configuration
    for proper TeamCity-formatted output
  9. Timeouts: Build/test may need 120-300s, not default 30s
  1. 路径规范
    projectPath
    使用绝对路径,其他路径均使用相对路径
  2. 必填计数参数:搜索命令务必包含
    maxUsageCount
    ,文件搜索命令务必包含
    fileCountLimit
  3. 文件搜索策略:初始值设为
    fileCountLimit: 1-2
    ;如果出现Schema错误,降低限制值(漏洞:限制值大于匹配数会引发错误)
  4. 重构前:先搜索以了解影响范围
  5. 修改后:使用
    get_file_problems
    验证未引入新错误
  6. Java代码准确性:优先使用IDEA的
    get_file_problems
    而非LSP(避免误报)
  7. 文本替换:替换前先使用
    get_file_text_by_path
    获取准确文本
  8. 测试执行:使用
    execute_run_configuration
    以获取标准TeamCity格式的输出
  9. 超时设置:构建/测试可能需要120-300秒,而非默认的30秒

🔄 Common Workflows (Dongting Project)

🔄 常见工作流(洞庭项目)

Note: Examples use project path
/Users/huangli/dt/dongting
. Adjust
projectPath
for other projects.
注意:示例使用项目路径
/Users/huangli/dt/dongting
。其他项目请调整
projectPath

1. Find a Java Class by Name

1. 通过名称查找Java类

Use case: Locate
KvImpl.java
in the codebase.
yaml
Tool: IntelliJ-IDEA_find_files_by_name_keyword
Parameters:
  projectPath: "/Users/huangli/dt/dongting"  # Absolute path
  nameKeyword: "KvImpl"
  fileCountLimit: 2  # Start small; bug: limit > matches causes schema error
If no results: Try
find_files_by_glob
with pattern:
yaml
Tool: IntelliJ-IDEA_find_files_by_glob
Parameters:
  projectPath: "/Users/huangli/dt/dongting"
  globPattern: "**/*KvImpl*.java"
  fileCountLimit: 5
使用场景:定位代码库中的
KvImpl.java
yaml
Tool: IntelliJ-IDEA_find_files_by_name_keyword
Parameters:
  projectPath: "/Users/huangli/dt/dongting"  # Absolute path
  nameKeyword: "KvImpl"
  fileCountLimit: 2  # Start small; bug: limit > matches causes schema error
如果无结果:尝试使用
find_files_by_glob
并指定匹配模式:
yaml
Tool: IntelliJ-IDEA_find_files_by_glob
Parameters:
  projectPath: "/Users/huangli/dt/dongting"
  globPattern: "**/*KvImpl*.java"
  fileCountLimit: 5

2. Search for Text Across Codebase

2. 在代码库中搜索文本

Use case: Find all occurrences of "DtLog.getLogger".
yaml
Tool: IntelliJ-IDEA_search_in_files_by_text
Parameters:
  projectPath: "/Users/huangli/dt/dongting"
  searchText: "DtLog.getLogger"
  maxUsageCount: 20  # REQUIRED parameter
  caseSensitive: true
For regex patterns (e.g., find all log declarations):
yaml
Tool: IntelliJ-IDEA_search_in_files_by_regex
Parameters:
  projectPath: "/Users/huangli/dt/dongting"
  regexPattern: "private static final DtLog log = DtLogs\\.getLogger\\(.*\\)"
  maxUsageCount: 10
使用场景:查找所有 "DtLog.getLogger" 的出现位置。
yaml
Tool: IntelliJ-IDEA_search_in_files_by_text
Parameters:
  projectPath: "/Users/huangli/dt/dongting"
  searchText: "DtLog.getLogger"
  maxUsageCount: 20  # REQUIRED parameter
  caseSensitive: true
正则表达式搜索(例如:查找所有日志声明):
yaml
Tool: IntelliJ-IDEA_search_in_files_by_regex
Parameters:
  projectPath: "/Users/huangli/dt/dongting"
  regexPattern: "private static final DtLog log = DtLogs\\.getLogger\\(.*\\)"
  maxUsageCount: 10

3. Run a Test via IDEA Run Configuration

3. 通过IDEA运行配置执行测试

Use case: Execute the "client:test" run configuration.
yaml
Tool: IntelliJ-IDEA_execute_run_configuration
Parameters:
  projectPath: "/Users/huangli/dt/dongting"
  configurationName: "client:test"
  timeout: 120000  # 2 minutes for tests
First, list available run configurations:
yaml
Tool: IntelliJ-IDEA_get_run_configurations
Parameters:
  projectPath: "/Users/huangli/dt/dongting"
使用场景:执行 "client:test" 运行配置。
yaml
Tool: IntelliJ-IDEA_execute_run_configuration
Parameters:
  projectPath: "/Users/huangli/dt/dongting"
  configurationName: "client:test"
  timeout: 120000  # 2 minutes for tests
先列出可用的运行配置
yaml
Tool: IntelliJ-IDEA_get_run_configurations
Parameters:
  projectPath: "/Users/huangli/dt/dongting"

4. Check Compilation Errors in a File

4. 检查文件中的编译错误

Use case: Verify
server/src/main/java/com/github/dtprj/dongting/raft/server/RaftNode.java
has no errors.
yaml
Tool: IntelliJ-IDEA_get_file_problems
Parameters:
  projectPath: "/Users/huangli/dt/dongting"
  filePath: "server/src/main/java/com/github/dtprj/dongting/raft/server/RaftNode.java"
  errorsOnly: true
Note: More accurate than LSP for this multi-module Maven project.
使用场景:验证
server/src/main/java/com/github/dtprj/dongting/raft/server/RaftNode.java
无错误。
yaml
Tool: IntelliJ-IDEA_get_file_problems
Parameters:
  projectPath: "/Users/huangli/dt/dongting"
  filePath: "server/src/main/java/com/github/dtprj/dongting/raft/server/RaftNode.java"
  errorsOnly: true
注意:对于这个多模块Maven项目,该方法比LSP更准确。

5. Safe Refactoring: Rename a Field

5. 安全重构:重命名字段

Pre-verification: Search for current usage:
yaml
Tool: IntelliJ-IDEA_search_in_files_by_text
Parameters:
  projectPath: "/Users/huangli/dt/dongting"
  searchText: "currentTerm"
  maxUsageCount: 50
Execute rename:
yaml
Tool: IntelliJ-IDEA_rename_refactoring
Parameters:
  projectPath: "/Users/huangli/dt/dongting"
  pathInProject: "server/src/main/java/com/github/dtprj/dongting/raft/server/RaftNode.java"
  symbolName: "currentTerm"
  newName: "currentElectionTerm"
Post-verification: Check for errors:
yaml
Tool: IntelliJ-IDEA_get_file_problems
Parameters:
  projectPath: "/Users/huangli/dt/dongting"
  filePath: "server/src/main/java/com/github/dtprj/dongting/raft/server/RaftNode.java"
预验证:搜索当前字段的使用情况:
yaml
Tool: IntelliJ-IDEA_search_in_files_by_text
Parameters:
  projectPath: "/Users/huangli/dt/dongting"
  searchText: "currentTerm"
  maxUsageCount: 50
执行重命名
yaml
Tool: IntelliJ-IDEA_rename_refactoring
Parameters:
  projectPath: "/Users/huangli/dt/dongting"
  pathInProject: "server/src/main/java/com/github/dtprj/dongting/raft/server/RaftNode.java"
  symbolName: "currentTerm"
  newName: "currentElectionTerm"
后验证:检查是否存在错误:
yaml
Tool: IntelliJ-IDEA_get_file_problems
Parameters:
  projectPath: "/Users/huangli/dt/dongting"
  filePath: "server/src/main/java/com/github/dtprj/dongting/raft/server/RaftNode.java"

6. Explore Project Structure

6. 探索项目结构

Use case: View module layout.
yaml
Tool: IntelliJ-IDEA_list_directory_tree
Parameters:
  projectPath: "/Users/huangli/dt/dongting"
  directoryPath: "."  # Project root
  maxDepth: 3
To see all open files (helpful for context):
yaml
Tool: IntelliJ-IDEA_get_all_open_file_paths
Parameters:
  projectPath: "/Users/huangli/dt/dongting"
使用场景:查看模块布局。
yaml
Tool: IntelliJ-IDEA_list_directory_tree
Parameters:
  projectPath: "/Users/huangli/dt/dongting"
  directoryPath: "."  # Project root
  maxDepth: 3
查看所有已打开文件(有助于了解上下文):
yaml
Tool: IntelliJ-IDEA_get_all_open_file_paths
Parameters:
  projectPath: "/Users/huangli/dt/dongting"

🤔 When to Use: IDEA MCP vs LSP vs Bash Tools

🤔 工具选择:IDEA MCP vs LSP vs Bash工具

Decision Matrix

决策矩阵

TaskRecommended ToolWhy
Java code analysis (errors, warnings)IDEA MCP (
get_file_problems
)
More accurate for multi-module Maven projects; avoids LSP false positives
Running testsIDEA MCP (
execute_run_configuration
)
Proper test environment, TeamCity-formatted output, dependency resolution
Refactoring (rename, move)IDEA MCP (
rename_refactoring
)
Semantic understanding, cross-file updates, safer than manual edits
Search code (text, regex)IDEA MCP (
search_in_files_by_text
)
Fast, indexes entire project; better than
grep
for large codebases
Find files (by name, glob)IDEA MCP (
find_files_by_*
)
Fast indexed search; use workarounds for schema bugs
Read file contentLSP (
read
tool) or IDEA MCP (
get_file_text_by_path
)
LSP for quick reads; IDEA for large files or binary detection
Build/compileBash (
mvn
commands)
Full control, reproducible; IDEA build may have caching issues
Git operationsBash (
git
commands)
Standard, predictable; IDEA MCP lacks git tools
Project explorationIDEA MCP (
list_directory_tree
)
Visual tree structure; better than
ls
for nested directories
Terminal commandsIDEA MCP (
execute_terminal_command
) or Bash
IDEA for integrated terminal; Bash for complex pipelines
任务推荐工具原因
Java代码分析(错误、警告)IDEA MCP (
get_file_problems
)
对多模块Maven项目更准确;避免LSP误报
运行测试IDEA MCP (
execute_run_configuration
)
提供合适的测试环境、TeamCity格式输出、依赖解析
重构(重命名、移动)IDEA MCP (
rename_refactoring
)
具备语义理解能力、跨文件更新、比手动编辑更安全
代码搜索(文本、正则)IDEA MCP (
search_in_files_by_text
)
速度快,索引整个代码库;比
grep
更适合大型代码库
查找文件(按名称、通配符)IDEA MCP (
find_files_by_*
)
基于索引的快速搜索;针对Schema漏洞使用解决方法
读取文件内容LSP
read
工具)或 IDEA MCP (
get_file_text_by_path
)
LSP适合快速读取;IDEA适合大文件或二进制文件检测
构建/编译Bash
mvn
命令)
完全可控、可复现;IDEA构建可能存在缓存问题
Git操作Bash
git
命令)
标准、可预测;IDEA MCP缺少Git工具
项目探索IDEA MCP (
list_directory_tree
)
可视化树状结构;比
ls
更适合嵌套目录
终端命令IDEA MCP (
execute_terminal_command
) 或 Bash
IDEA适合集成终端;Bash适合复杂管道操作

Key Principles

核心原则

  1. IDEA MCP when: Need IDE intelligence (refactoring, accurate errors, test execution)
  2. LSP when: Quick file reads, symbol navigation (if IDEA not available)
  3. Bash when: Builds, Git, system operations, or when IDEA MCP has schema bugs
Remember: IDEA must be running for MCP tools to work. If IDEA is unavailable, fall back to LSP/Bash.
  1. 使用IDEA MCP的场景:需要IDE智能能力(重构、精准错误检测、测试执行)
  2. 使用LSP的场景:快速读取文件、符号导航(当IDEA不可用时)
  3. 使用Bash的场景:构建、Git操作、系统操作,或IDEA MCP存在Schema漏洞时
注意:使用MCP工具时必须运行IDEA。如果IDEA不可用, fallback到LSP或Bash工具。

⏱️ Performance Considerations & Timeouts

⏱️ 性能考量与超时设置

Recommended Timeouts by Operation

各操作推荐超时时间

OperationRecommended TimeoutNotes
File search (
find_files_by_*
)
30000 (30s)Usually fast; start with
fileCountLimit: 1-2
to avoid schema bug
Text search (
search_in_files_by_*
)
60000 (60s)Can be slower for large codebases; use
maxUsageCount
Read file (
get_file_text_by_path
)
10000 (10s)Fast for text files; binary files may fail
Get file problems (
get_file_problems
)
15000 (15s)Quick analysis
Run configuration (
execute_run_configuration
)
300000 (5min)Tests/builds can take minutes; adjust based on test size
Build project (
IntelliJ-IDEA_build_project
)
300000 (5min)Full rebuild may be slow
Refactoring (
rename_refactoring
)
60000 (60s)Usually fast for single symbols
Directory listing (
list_directory_tree
)
20000 (20s)Depends on project size
操作推荐超时时间说明
文件搜索 (
find_files_by_*
)
30000(30秒)通常速度快;初始值设为
fileCountLimit: 1-2
以避免Schema漏洞
文本搜索 (
search_in_files_by_*
)
60000(60秒)大型代码库可能较慢;使用
maxUsageCount
限制结果数
读取文件 (
get_file_text_by_path
)
10000(10秒)文本文件读取速度快;二进制文件可能读取失败
获取文件问题 (
get_file_problems
)
15000(15秒)分析速度快
运行配置 (
execute_run_configuration
)
300000(5分钟)测试/构建可能需要数分钟;根据测试规模调整
构建项目 (
IntelliJ-IDEA_build_project
)
300000(5分钟)完整重构可能较慢
重构 (
rename_refactoring
)
60000(60秒)单个符号重构通常速度快
目录列表 (
list_directory_tree
)
20000(20秒)取决于项目规模

Performance Tips

性能优化技巧

  1. Limit search results: Use
    maxUsageCount
    and
    fileCountLimit
    to avoid excessive data transfer
  2. Cache project state: IDEA MCP maintains project index; repeated searches are faster
  3. Avoid redundant calls: Use
    get_all_open_file_paths
    to see what's already loaded
  4. Batch operations: Combine searches with careful planning (but MCP is stateless)
  5. Fallback for large operations: For full project builds, use Bash
    mvn
    commands instead
  1. 限制搜索结果:使用
    maxUsageCount
    fileCountLimit
    避免过多数据传输
  2. 缓存项目状态:IDEA MCP维护项目索引;重复搜索速度更快
  3. 避免冗余调用:使用
    get_all_open_file_paths
    查看已加载的文件
  4. 批量操作:通过周密规划组合搜索操作(但MCP是无状态的)
  5. 大型操作的备选方案:全项目构建使用Bash的
    mvn
    命令

Memory & Resource Considerations

内存与资源考量

  • IDEA MCP runs within IDEA's JVM; large operations may affect IDE performance
  • Searching huge files (>10MB) may cause timeouts; use LSP
    read
    with offset/limit instead
  • Concurrent MCP requests may queue; avoid parallel operations on same project
  • IDEA MCP运行在IDEA的JVM中;大型操作可能影响IDE性能
  • 搜索超大文件(>10MB)可能超时;改用LSP的
    read
    工具并指定偏移量/限制
  • 同一项目的并发MCP请求可能排队;避免并行操作

🔧 Quick Troubleshooting

🔧 快速故障排除

Common Error Messages and Solutions

常见错误信息与解决方案

Error MessageLikely CauseSolution
Structured content does not match the tool's output schema: data must have required property 'probablyHasMoreMatchingFiles'
Missing
fileCountLimit
or
maxUsageCount
parameter
Add required parameter:
fileCountLimit: 1
(for file search) or
maxUsageCount: 10
(for text search)
MCP error -32602: Structured content does not match the tool's output schema
fileCountLimit
> actual matches (MCP bug)
Reduce
fileCountLimit
to 1 or 2; common keywords can use higher limits
Command failed: Connection refused
IDEA not running or MCP server not connectedVerify IDEA is running with MCP plugin active; wait for connection
Command timed out after X milliseconds
Operation taking longer than default timeoutIncrease
timeout
parameter (e.g., 120000 for tests, 30000 for builds)
File not found
or
Path does not exist
Incorrect path (absolute vs relative confusion)Use absolute path for
projectPath
, relative path for
filePath
No occurrences found
Search text not found or path incorrectVerify search text exists; check
projectPath
and file paths
Could not get document
or
File is binary
Trying to read binary/ non-text fileUse
get_file_text_by_path
only for text files; check file type
Project directory not found
projectPath
incorrect or IDEA project not loaded
Verify project is fully loaded in IDEA; use absolute path
错误信息可能原因解决方案
Structured content does not match the tool's output schema: data must have required property 'probablyHasMoreMatchingFiles'
缺少
fileCountLimit
maxUsageCount
参数
添加必填参数:文件搜索设
fileCountLimit: 1
,文本搜索设
maxUsageCount: 10
MCP error -32602: Structured content does not match the tool's output schema
fileCountLimit
大于实际匹配数(MCP漏洞)
降低
fileCountLimit
至1或2;常见关键词可使用更高值
Command failed: Connection refused
IDEA未运行或MCP服务器未连接验证IDEA已运行且MCP插件已激活;等待连接建立
Command timed out after X milliseconds
操作耗时超过默认超时时间调高
timeout
参数(例如:测试设120000,构建设30000)
File not found
Path does not exist
路径错误(绝对/相对路径混淆)
projectPath
使用绝对路径,
filePath
使用相对路径
No occurrences found
搜索文本不存在或路径错误验证搜索文本存在;检查
projectPath
和文件路径
Could not get document
File is binary
尝试读取二进制/非文本文件
get_file_text_by_path
仅用于文本文件;检查文件类型
Project directory not found
projectPath
错误或IDEA项目未加载
验证项目已在IDEA中完全加载;使用绝对路径

"Structured content does not match" (schema error)

"Structured content does not match"(Schema错误)

  • Add missing
    maxUsageCount
    or
    fileCountLimit
    parameter
  • For
    find_files_by_name_keyword
    :
    fileCountLimit
    > actual matches causes this bug. Reduce the limit to 1 or 2, then increase if needed
  • 添加缺失的
    maxUsageCount
    fileCountLimit
    参数
  • 针对
    find_files_by_name_keyword
    :当
    fileCountLimit
    大于实际匹配数时会触发该漏洞。降低限制值至1或2,必要时再调高

Commands fail/timeout

命令失败/超时

  1. Verify IDEA is running with MCP server connected
  2. Check MCP plugin is active in IDEA settings
  3. Wait for connection (may take seconds)
  4. Verify project is fully loaded in IDEA
  1. 验证IDEA已运行且已连接MCP服务器
  2. 检查IDEA设置中MCP插件已激活
  3. 等待连接建立(可能需要数秒)
  4. 验证项目已在IDEA中完全加载

Search returns no results

搜索无结果

  1. Verify
    projectPath
    is absolute and correct
  2. Verify file paths are relative to project root
  3. Use
    list_directory_tree
    to verify structure exists
  1. 验证
    projectPath
    是正确的绝对路径
  2. 验证文件路径是相对于项目根目录的相对路径
  3. 使用
    list_directory_tree
    验证结构存在

File operation fails

文件操作失败

  • For
    create_new_file
    : Use
    overwrite: true
    if file exists
  • For
    replace_text_in_file
    : Get exact text with
    get_file_text_by_path
    first
  • Check file is not locked by another process
  • 对于
    create_new_file
    :如果文件已存在,使用
    overwrite: true
    参数
  • 对于
    replace_text_in_file
    :替换前先使用
    get_file_text_by_path
    获取准确文本
  • 检查文件是否被其他进程锁定