union_find
Merge elements and query connectivity to manage disjoint sets. Check whether pairs are connected after unions.
Instructions
Perform union-find (disjoint set) operations: merge elements and query connectivity.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"unions": "<unions>"
},
"name": "union_find"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| unions | Yes | Pairs to merge | |
| queries | No | Optional pairs to check connectivity |