Skip to content

Conversation

code-asher
Copy link
Member

@code-asher code-asher commented Aug 27, 2025

Follows similarly to the bash tool (and some code to connect to an agent was extracted from it).

There are two main parts: a new agent endpoint, and then a new MCP tool that consumes that endpoint.

@code-asher code-asher changed the title feat: Add coder_workspace_read_file MCP tool feat: add coder_workspace_read_file MCP tool Aug 27, 2025
@code-asher code-asher force-pushed the asher/mcp-file-read branch 20 times, most recently from 7bda4fd to 2828b76 Compare August 27, 2025 21:37
@code-asher code-asher force-pushed the asher/mcp-file-read branch from 2828b76 to aae3033 Compare August 28, 2025 17:31
This will be used in multiple tools.
@code-asher code-asher force-pushed the asher/mcp-file-read branch from aae3033 to 2972507 Compare August 28, 2025 17:48
Copy link
Member

@ThomasK33 ThomasK33 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

I prefer buffering in the toolsdk instead of the workspacesdk, but I don't want to block on it.

Comment on lines 488 to 490
// Ideally we could stream this all the way back, but it looks like the MCP
// interfaces only allow returning full responses which means the whole thing
// has to be read into memory. So, add a maximum to compensate.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might want to implement the buffering in the MCP server/toolsdk and keep this part as a streaming response. Functionality-wise, this should remain the same.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

100% agree. Will change.

Copy link
Member

@ThomasK33 ThomasK33 Sep 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me know if you want another review; otherwise, it's good to merge with that change from my POV.

@code-asher code-asher merged commit 4bf63b4 into main Sep 9, 2025
31 checks passed
@code-asher code-asher deleted the asher/mcp-file-read branch September 9, 2025 23:12
@github-actions github-actions bot locked and limited conversation to collaborators Sep 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants