local url = os.getenv("MCP_HTTP_URL")
assert(url and url ~= "", "MCP_HTTP_URL must be set")
mcp.connect_http("counter", url)
print("CONNECT_HTTP_OK")
local lt = mcp.list_tools("counter")
assert(lt.ok == true, "list_tools ok=false: " .. tostring(lt.error))
assert(type(lt.tools) == "table", "tools must be a table")
assert(#lt.tools >= 1, "expected at least 1 tool, got " .. #lt.tools)
local found = false
for _, t in ipairs(lt.tools) do
if t.name == "increment" then
found = true
break
end
end
assert(found, "increment tool not found in list_tools response")
print("LIST_TOOLS_OK")
print("FIXTURE_DONE")