获取部门树
get_department_treeRecursively retrieves a complete department tree from Alibaba Mail, handling pagination automatically and optionally including direct members. Set depth and node limits to keep large organizations manageable.
Instructions
从指定部门(默认根部门)递归获取完整部门树,自动处理分页。可选包含每个部门的直属成员。大型组织请设置 maxDepth / maxNodes 控制规模,结果中 truncated=true 表示被截断。
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_department_tree"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rootId | No | 起始部门 ID,默认 $root | $root |
| maxDepth | No | 最大递归深度 | |
| maxNodes | No | 最多返回的部门数量 | |
| includeUsers | No | 是否包含每个部门的直属成员(调用次数显著增加) | |
| maxUsersPerDepartment | No |