MCPcopy Create free account
hub / github.com/ClickHouse/ai-sdk-cpp / simple_test_tool

Function simple_test_tool

examples/test_tool_integration.cpp:22–31  ·  view source on GitHub ↗

Simple test tool

Source from the content-addressed store, hash-verified

20
21// Simple test tool
22ai::JsonValue simple_test_tool(const ai::JsonValue& args,
23 const ai::ToolExecutionContext& context) {
24 std::string input = args["input"].get<std::string>();
25
26 std::cout << "🔧 Tool called with input: " << input << std::endl;
27
28 return ai::JsonValue{{"result", "Tool executed successfully"},
29 {"input_received", input},
30 {"execution_id", context.tool_call_id}};
31}
32
33void test_openai_tools() {
34 std::cout << "\n=== Testing OpenAI Tool Integration ===\n";

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected