MCPcopy Create free account
hub / github.com/Luce-Org/lucebox-hub / build_stall_tool_prefix

Function build_stall_tool_prefix

server/src/server/http_server.cpp:448–463  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

446 return value != "0" && value != "false" && value != "no" &&
447 value != "off";
448}
449
450static const json * find_tool_function(const json & tools,
451 const std::string & name) {
452 if (!tools.is_array() || name.empty()) return nullptr;
453 for (const auto & tool : tools) {
454 if (!tool.contains("function") || !tool["function"].is_object()) {
455 continue;
456 }
457 const json & fn = tool["function"];
458 if (fn.value("name", "") == name) return &fn;
459 }
460 return nullptr;
461}
462
463static std::string first_tool_parameter_name(const json & function_def) {
464 const auto & params = function_def.value("parameters", json::object());
465 if (params.contains("required") && params["required"].is_array()) {
466 for (const auto & name : params["required"]) {

Callers 1

worker_loopMethod · 0.85

Calls 3

emptyMethod · 0.45

Tested by

no test coverage detected