Tool: Send email notification
| 75 | |
| 76 | // Tool: Send email notification |
| 77 | ai::JsonValue send_email(const ai::JsonValue& args, |
| 78 | const ai::ToolExecutionContext& context) { |
| 79 | std::string to = args["to"].get<std::string>(); |
| 80 | std::string subject = args["subject"].get<std::string>(); |
| 81 | std::string body = args["body"].get<std::string>(); |
| 82 | |
| 83 | std::cout << "📧 Sending email to: " << to << std::endl; |
| 84 | std::cout << " Subject: " << subject << std::endl; |
| 85 | |
| 86 | // Simulate email sending |
| 87 | return ai::JsonValue{{"status", "sent"}, |
| 88 | {"message_id", "msg_" + std::to_string(std::rand())}, |
| 89 | {"recipient", to}}; |
| 90 | } |
| 91 | |
| 92 | // Tool: Get city recommendations |
| 93 | ai::JsonValue get_recommendations(const ai::JsonValue& args, |
nothing calls this directly
no outgoing calls
no test coverage detected