For example, with the current SetVibe proto -- we should call through to the client:
func (s *vibeServiceMCPServer) SetVibeHandler(ctx context.Context, req mcp.CallToolRequest) (*mcp.CallToolResult, error) {
// TODO: Implement the handler for SetVibe
// Example: Extract the vibe from the request and call the underlying service
vibe, ok := req.Params.Arguments["vibe"].(string)
if !ok {
return nil, errors.New("vibe not a string")
}
// Call the driver client to get drivers
res, err := s.SetVibe(ctx, &SetVibeRequest{
Vibe: vibe,
})
if err != nil {
return nil, err
}
//TODO: think about this response
return mcp.NewToolResultText(res.Vibe), nil
}
I have some open questions in general around what those tool results should be returning and we need to explore that.