Skip to content

mcp_tool usage is not writing files to disk #92

@cristianbote

Description

@cristianbote

Description

I have encounter a few issues when opencode delegates and uses the tools I guess, and the result says that it wrote files but actually it didnt. Here's an example:

A: Now let me apply both edits.
Tool Use: mcp_edit({"filePath":"/path/to/file","oldString":"<redacted>","newString":"<redacted>"})
Tool Use: mcp_edit({"filePath":"/path/to/other/file","oldString":"<redacted>","newString":"<redacted>"})
H: Tool Result for toolu_01CX5nnnVVZLpTi3ENWWsLVu: Edit applied successfully.
Tool Result for toolu_01CPgBDWWaBvLcKmXyiQWEz4: Edit applied successfully.

Only to notice that the two files were not edited at all. Sometimes though opencode writes the files fine without the mcp_edit or mcp_write.

Steps to reproduce

  1. Start opencode
  2. Prompt to edit files
  3. Try until opencode delegates to mcp_tool
  4. Check the result

Operating system

macOS

Plugin version

1.3.1

OpenCode version

1.2.27

Debug logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions