local agent = require("agent")
local nested_tool = {
name = "nested_x",
schema = { description = "nested desc", input_schema = { type = "object", properties = {} } },
handler = function()
return ""
end,
}
local flat_tool = {
name = "flat_y",
description = "flat desc",
input_schema = { type = "object", properties = {} },
}
local tools = agent._build_tools({}, { nested_tool, flat_tool })
print("nested.name=" .. tostring(tools[1].name))
print("nested.description=" .. tostring(tools[1].description))
print("nested.handler=" .. tostring(tools[1].handler))
print("nested.schema=" .. tostring(tools[1].schema))
print("flat.name=" .. tostring(tools[2].name))
print("flat.description=" .. tostring(tools[2].description))