-
Notifications
You must be signed in to change notification settings - Fork 70
feat(mcp): do mcp tool call from cli args #1216
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
|
This change is part of the following stack: Change managed by git-spice. |
d7c8949 to
09ac776
Compare
c93e6a0 to
619a3a0
Compare
09ac776 to
e94f2f9
Compare
619a3a0 to
c3d97d0
Compare
e94f2f9 to
312d44d
Compare
c3d97d0 to
90c48d3
Compare
312d44d to
46d4204
Compare
90c48d3 to
1c9d1aa
Compare
e61a429 to
8f3a1ee
Compare
011a0a1 to
2faa5c1
Compare
f752670 to
d72c626
Compare
2faa5c1 to
e853a4d
Compare
d72c626 to
9618084
Compare
e853a4d to
e949ce0
Compare
9618084 to
20554e0
Compare
e949ce0 to
2d1ac17
Compare
20554e0 to
236e972
Compare
2d1ac17 to
99f8eb5
Compare
236e972 to
1848af5
Compare
99f8eb5 to
57870c5
Compare
abd791a to
8c0a165
Compare
1848af5 to
28e14ec
Compare
8c0a165 to
aaa4985
Compare
- basic sse resposne parsing - remove zero / nil arguments before making the request
28e14ec to
7bc3f56
Compare
aaa4985 to
81a073e
Compare
keegancsmith
left a comment
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.
nice to see some tool calls!
| } | ||
|
|
||
| func DecodeToolResponse(resp *http.Response) (map[string]json.RawMessage, error) { | ||
| data, err := readSSEResponseData(resp) |
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.
I thought our server was just http not sse. But then again we use some framework that I guess decides for us?
* make json rpc 2.0 call based on cli args - basic sse resposne parsing - remove zero / nil arguments before making the request * move tool request to mcp_request.go * print tool response according to output schema * print structuredContent from JSON RPC response * only register mcp command if SRC_EXPERIMENT_MCP=true * rename ParseToolResponse to DecodeToolResponse
Part of SRCH-2167
Test plan
Tested with
go run ./cmd/src mcp commit-search -repos "sourcegraph/sourcegraph" -count 1 | tail -n 1 | jq