[Go] PartToolResponse missing tool call information
Describe the bug PartToolResponse is missing tool call information. It contains the tool response, but not which tool was called or with what arguments.
To Reproduce The call to genkit is here https://github.com/mattsp1290/october-talks-2025/blob/main/example/server/internal/agentic/agentic.go#L129-L133
When using streaming responses and mcp servers, the response does not include which tool was called.
Expected behavior The response shows which tool is called so I can display to the user that X was called and Y was the result.
Screenshots
Runtime (please complete the following information):
- OS: macOS
- Version 15.6.1
** Go version
- go1.24.5 darwin/arm64
Hi @mattsp1290, we'll take a look at this.
Hi @mattsp1290. ToolRequest and its contents are part of the generate request object. In this case, ToolResponse part won't have the request information but the output and the tool name.
May I ask, what is your current use case?
Hi @mattsp1290.
ToolRequestand its contents are part of the generate request object. In this case,ToolResponsepart won't have the request information but the output and the tool name.May I ask, what is your current use case?
Are there hooks into the generate request object?
The use case is building a CLI application like Claude Code and showing the user which tool was called along with the result by integration genkit with AG-UI
What kind of hooks are you referring to?
You can access the request message information right from the response struct. This way you can inspect which tool and input schemas were provided.
Hope this helps!
What kind of hooks are you referring to?
You can access the request message information right from the response struct. This way you can inspect which tool and input schemas were provided.
Hope this helps!
I included a screenshot of what the response struct looks like. It does not include which tool and input schemas were provided. This issue may be limited to when genkit is called WithStreaming.
My use case may not have been exact. It's closer to Cursor Background Agents. The agent runs on a remote server and I would like the client to be able to know which tools are called along with their response.
Yeah, the screenshot shows the Chunk response struct. I was referring to the complete response from the genkit.Generate() call you make at this point. The tools information should be available in resp.Request.Tools
It looks like I was not properly handling the Part that gets emitted on ToolRequest. This can be closed.