-
Notifications
You must be signed in to change notification settings - Fork 1k
feat: add coder_workspace_read_file MCP tool #19562
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
7bda4fd
to
2828b76
Compare
2828b76
to
aae3033
Compare
This will be used in multiple tools.
aae3033
to
2972507
Compare
2972507
to
a042936
Compare
There was a problem hiding this 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.
codersdk/workspacesdk/agentconn.go
Outdated
// 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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
100% agree. Will change.
There was a problem hiding this comment.
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.
1d4cd78
to
f903423
Compare
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.