(result any)
| 15 | ) |
| 16 | |
| 17 | func marshalToolResponse(result any) fantasy.ToolResponse { |
| 18 | data, err := json.Marshal(result) |
| 19 | if err != nil { |
| 20 | return fantasy.NewTextResponse("{}") |
| 21 | } |
| 22 | return fantasy.NewTextResponse(string(data)) |
| 23 | } |
| 24 | |
| 25 | // toolResponse builds a fantasy.ToolResponse from a JSON-serializable |
| 26 | // result map. The map constraint ensures all tool results serialize |
no test coverage detected