get_task_options
Retrieve available options for a specified field (e.g., status, priority) to ensure valid selections. Use optional project and work item type parameters for accurate choices.
Instructions
获取字段的可用选项列表。
当你不确定某个字段有哪些可选值时,使用此工具查询。
这对于了解状态流转、优先级选项等非常有用。
Args:
field_name: 字段名称,如 "status", "priority"。
project: 项目标识符(可选)。可以是项目名称或 project_key。
如不指定,则使用环境变量 FEISHU_PROJECT_KEY 配置的默认项目。
work_item_type: 工作项类型名称(可选),如 "需求管理"、"Issue管理"、"项目管理" 等。
如不指定,默认使用项目中的第一个可用类型。
user_key: (可选) 飞书用户标识符 (X-USER-KEY),用于以特定用户身份进行操作。
Returns:
JSON 格式的选项列表,格式为 {label: value}。
失败时返回错误信息。
Examples:
# 查看状态字段有哪些可选值(使用默认项目)
get_task_options(field_name="status")
# 查看优先级字段有哪些可选值
get_task_options(field_name="priority")
# 指定工作项类型查看选项
get_task_options(field_name="status", project="Project Management", work_item_type="需求管理")
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": {
"field_name": "<field_name>"
},
"name": "get_task_options"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project | No | ||
| user_key | No | ||
| field_name | Yes | ||
| work_item_type | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |