OpenHands icon indicating copy to clipboard operation
OpenHands copied to clipboard

MCP Tool Call custom formatting

Open createthis opened this issue 8 months ago • 1 comments

I wrote a custom MCP server here: https://github.com/createthis/diffcalculia_mcp

It is the MCP implementation of this simple prompt: https://github.com/createthis/diffcalculia?tab=readme-ov-file#open-hands-ai---no-str_replace_editor

When the patch tool call happens, it looks like this:

Image

If you drill down into those arguments, they look like this:

{
  "path": "/workspace/original.txt",
  "diff": "--- /workspace/original.txt\n+++ /workspace/original.txt\n@@ -1,4 +1,3 @@\n test\n two\n-three\n four"
}

That's not at all human readable, unfortunately.

Ideally, I'd like to see that displayed exactly as this markdown:

--- /workspace/original.txt
+++ /workspace/original.txt
@@ -1,4 +1,3 @@
 test
 two
-three
 four

I checked the MCP spec and unfortunately I don't see anything like argument documentation decorators or diff schemas.

Is there already a system in place to do this?

createthis avatar May 12 '25 12:05 createthis

This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Jun 12 '25 02:06 github-actions[bot]

This issue was closed because it has been stalled for over 30 days with no activity.

github-actions[bot] avatar Jun 19 '25 02:06 github-actions[bot]