Skip to main content
Glama
AliMail Admin MCP

AliMail Admin MCP

by mfc-open

查询子部门

list_sub_departments
Read-onlyIdempotent

Retrieves the direct subdepartments of a specified department, with offset/limit pagination, so you can browse one level of an organization's hierarchy.

Instructions

查询指定部门的直属子部门(offset/limit 分页,limit 最大 100)。需要整棵树请用 get_department_tree。

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": {
      "id": "<id>"
    },
    "name": "list_sub_departments"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYes部门 ID;使用 $root 表示组织根部门
limitNo
offsetNo
selectNo透传 $select,如 hasUsers,hasSubDepartments,userCount,managers,email,isHidden,canManage
managedNo仅返回当前身份可管理的部门

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The annotations already declare readOnlyHint=true, idempotentHint=true and destructiveHint=false, so safety is covered. The description adds the behavioral fact that only direct children are returned, plus pagination behavior, but says nothing about result size, ordering, or what an empty result means when a department has no children.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

There are two sentences with no wasted words. The scoping constraint comes first, then the pagination caveat, then the alternative-tool pointer, which is the right order for an agent scanning for a decision.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema and five parameters, the description covers the essential call shape: one level only, paginated, hard limit of 100, and the alternative for full trees. The remaining gap is that select and managed are left entirely to their schema strings, which is acceptable but not complete for an openWorld read tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 60%, and the description compensates for the undocumented limit parameter by stating the pagination pattern and the maximum of 100. It adds nothing about select or managed, which are the more semantically opaque parameters, and it does not restate the $root convention for id.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb and resource: 查询指定部门的直属子部门, and it scopes the result to direct children rather than the full subtree. Naming get_department_tree as the tool for the whole tree further distinguishes it from a sibling without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly routes the agent: use get_department_tree when the whole tree is needed, so it's clear this tool only covers one level. It lacks guidance on other alternatives, such as whether to use get_department_chain for ancestors or get_departments_by_ids for batch lookups, but the key decision point is covered.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.