lark-agent
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@lark-agentcreate a high-priority bug task for login issue"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Lark Agent (MCP Server)
这是一个基于 Model Context Protocol (MCP) 构建的飞书 (Lark/Feishu) 智能代理服务。它采用 双模运行 (Dual-Mode) 架构,既是一个标准 MCP Server,也通过 FastAPI 暴露 HTTP API,完美支持 AI 助手 (Cursor/Claude) 调用和自动化工作流 (n8n) 集成。
✨ 核心特性
双模运行:
MCP Mode: 运行在主进程,通过 Stdio 协议与 Cursor、Claude Desktop 等 IDE/客户端无缝集成。
HTTP Mode: 运行在后台子进程,通过 FastAPI 暴露标准的 RESTful 接口,适配 n8n、Zapier 等 Webhook 触发器。
飞书项目全集成: 支持跨项目的任务 CRUD、高级过滤查询、字段元数据解析。
企业级架构:
Async First: 全异步架构,基于
asyncio和httpx实现极高性能。Metadata Manager: 具备 5 层缓存机制,自动解析飞书项目中的复杂字段 Key/Value,实现零硬编码。
Provider 模式: 业务逻辑与底层飞书 SDK/API 彻底解耦,易于扩展。
自动重试 & 脱敏: 完善的错误重试机制(指数退避)及敏感信息脱敏保护。
多重认证支持: 支持 Static Token(快速上手)和 Plugin Authentication(企业生产推荐)。
Related MCP server: TickTick MCP Server
🏗️ 系统架构
flowchart TD
subgraph Clients ["客户端层"]
CURSOR["Cursor / Claude (IDE)"]
N8N["n8n / Workflows (HTTP)"]
end
subgraph Agent ["Lark Agent (Dual-Mode)"]
direction TB
MAIN["main.py (Process Manager)"]
subgraph MCP_PROC ["MCP 进程 (Main)"]
MCP_STDIO["FastMCP (Stdio Transport)"]
TOOLS["MCP Tools (Python Functions)"]
end
subgraph HTTP_PROC ["HTTP 进程 (Child)"]
FASTAPI["FastAPI (Port 8002)"]
WRAPPER["Call Tool Wrapper"]
end
MAIN --> MCP_PROC
MAIN --> HTTP_PROC
MCP_STDIO --> TOOLS
FASTAPI --> WRAPPER
WRAPPER --> TOOLS
end
subgraph Core ["能力核心层"]
PROVIDER["WorkItemProvider"]
META["MetadataManager (L1-L5 Cache)"]
AUTH["AuthManager (Token Cache)"]
end
TOOLS --> PROVIDER
PROVIDER --> META
PROVIDER --> AUTH
AUTH --> FEISHU_API["Feishu / Lark API"]🛠️ 可用工具 (MCP Tools)
工具名 | 功能描述 | 核心业务场景 |
| 列出所有可用项目及 Key | 初始探索、查找项目 ID |
| 创建单条工作项 | 快速记录 Bug、新增需求 |
| 全方位过滤查询工作项 | 查看我的任务、列出 P0 Bug |
| 获取工作项完整详情 | 查看任务描述、属性详情 |
| 更新单个工作项字段 | 修改状态、指派负责人 |
| [NEW] 批量更新多个工作项 | 批量结单、批量改优先级 |
| 查询字段可用选项 | 确认状态流转、查看优先级列表 |
🚀 快速开始
方式一:通过 uv tool install(推荐,最简单)
# 1. 安装
uv tool install --from git+https://github.com/Wulnut/lark_agent lark-agent
# 2. 配置环境变量 (见下方配置说明)
# 3. 直接运行
lark-agent方式二:从源码运行(开发模式)
# 1. 克隆与进入目录
git clone https://github.com/Wulnut/lark_agent.git && cd lark_agent
# 2. 安装依赖并同步环境
uv sync
# 3. 运行服务
uv run main.py⚙️ 环境配置
在项目根目录创建 .env 文件:
# --- 飞书项目配置 (必须) ---
FEISHU_PROJECT_USER_KEY=your_user_key
# 方案 A: 插件认证 (企业推荐,支持自动续期)
FEISHU_PROJECT_PLUGIN_ID=your_plugin_id
FEISHU_PROJECT_PLUGIN_SECRET=your_plugin_secret
# 方案 B: 静态 Token (个人测试,有效期 24h)
# FEISHU_PROJECT_USER_TOKEN=your_token
# --- 飞书机器人配置 (可选,用于 IM 通讯) ---
LARK_APP_ID=your_app_id
LARK_APP_SECRET=your_app_secret
# --- 系统配置 ---
LOG_LEVEL=INFO
FEISHU_PROJECT_KEY=默认项目KEY (可选)🔌 客户端集成
1. Cursor IDE 配置
编辑 ~/.cursor/mcp.json:
{
"mcpServers": {
"lark-agent": {
"command": "lark-agent"
}
}
}2. n8n / HTTP 调用指南
服务启动后,HTTP 端口默认为 8002。通过 POST /call_tool 端点可以调用所有 MCP 工具。
基础信息:
URL:
http://localhost:8002/call_toolMethod:
POSTHeaders:
Content-Type: application/json
常用请求示例:
1. 列出项目 (list_projects)
{
"tool_name": "list_projects",
"parameters": {}
}2. 创建任务 (create_task)
{
"tool_name": "create_task",
"parameters": {
"project": "SR6D2VA-7552-Lark",
"work_item_type": "Issue管理",
"name": "修复登录页面 Bug",
"priority": "P0",
"assignee": "张三"
}
}3. 查询任务 (get_tasks)
{
"tool_name": "get_tasks",
"parameters": {
"project": "项目名称或Key",
"name_keyword": "登录",
"status": "进行中",
"page_size": 20
}
}4. 获取详情 (get_task_detail)
{
"tool_name": "get_task_detail",
"parameters": {
"issue_id": 123456789
}
}5. 更新任务 (update_task)
{
"tool_name": "update_task",
"parameters": {
"issue_id": 123456789,
"status": "已完成",
"priority": "P1",
"fields_json": "{\"SoC Vendor\": \"Amlogic\", \"DDR Size\": \"4GB\"}"
}
}6. 批量更新 (batch_update_tasks)
{
"tool_name": "batch_update_tasks",
"parameters": {
"issue_ids": [10001, 10002],
"status": "已完成",
"priority": "P1"
}
}7. 查询字段选项 (get_task_options)
{
"tool_name": "get_task_options",
"parameters": {
"field_name": "status",
"project": "项目名称"
}
}🧪 测试与质量
本项目严格遵循 TDD (测试驱动开发)。
单元测试: 覆盖核心 Provider、Metadata 及授权逻辑。
模拟环境: 使用
respx拦截 HTTP 请求,无需真实 Token 即可运行。运行测试:
uv run pytest(当前 135+ 测试用例全部通过)。
📏 开发规范
异步规范: 所有 I/O 必须
await。零硬编码: 必须通过
MetadataManager解析字段别名。错误过滤: 确保敏感堆栈信息不透传给 LLM。
📂 项目结构
src/
├── core/ # 核心逻辑 (Auth, Config, Cache, Client)
├── providers/ # 业务 Provider (Project, Meta Managers)
├── schemas/ # Pydantic 数据模型 (API 交互标准)
├── http_server.py # HTTP 包装层 (FastAPI)
├── mcp_server.py # MCP 接口定义与工具注册
main.py # 双模启动入口 & 进程管理📄 许可
MIT License. 版权所有 © 2026 Wulnut.
Available Tools
16 toolsadd_task_commentA
为指定工作项添加一条评论(纯文本)。
适用场景:
- 需要在工作项下沉淀沟通结论、会议纪要、处理记录
- 希望 Agent 在更新字段之外留下“可审计的文字说明”
Args:
issue_id: 工作项 ID,必填。
content: 评论内容(纯文本),必填。内容为空会报错。
project: 项目标识符(可选)。可以是项目名称或 project_key。
不传则使用环境变量默认项目。
work_item_type: 工作项类型名称(可选)。不传则使用默认类型。
user_key: (可选) 飞书用户标识符 (X-USER-KEY),用于以特定用户身份进行操作。
Returns:
JSON 字符串。
- success=true 时,data 至少包含 comment_id。
- 失败时返回纯文本错误信息(由 with_error_handling 统一处理)。
Examples:
add_task_comment(issue_id=123, content="已与研发确认:本周五前完成联调")
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | ||
| project | No | ||
| issue_id | Yes | ||
| user_key | No | ||
| work_item_type | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the behavioral disclosure burden. It discloses that content must be plain text, empty content causes an error, optional parameters fall back to defaults, and return/error formats are JSON or plain text via with_error_handling. This is solid coverage for a create-comment operation, though it does not discuss permissions beyond the user_key identity.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-organized with an opening summary, bulleted use cases, an Args section, Returns section, and a concrete example. Each section earns its place and the important behavioral caveats are front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description is complete for a tool with five parameters and an output schema. It covers parameter semantics, defaults, return shape (including comment_id on success), error handling, and provides a runnable example. There are no significant gaps that would prevent an agent from calling this tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must fully compensate. It explains all five parameters: issue_id is required, content is required and must not be empty, project accepts a name or project_key and defaults to the environment variable, work_item_type defaults to the default type, and user_key identifies the acting Feishu user. This adds substantial meaning beyond the raw JSON schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description starts with a clear verb and resource: '为指定工作项添加一条评论(纯文本)' (add a plain-text comment to a specified work item). It distinguishes itself from sibling tools like list_task_comments, update_task_comment, and delete_task_comment by explicitly framing this as the creation action.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description includes an '适用场景' section with concrete use cases: recording communication conclusions, meeting minutes, handling records, and leaving auditable text notes beyond field updates. It gives clear situational context, though it does not explicitly state when not to use this tool versus alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
batch_update_tasksA
批量更新工作项字段(支持单个或多个工作项)。
Args:
issue_ids: 要更新的工作项 ID 列表。
issue_id: 单个工作项 ID(与 issue_ids 二选一,方便单项操作)。
project: 项目标识符(名称或 Key)。
work_item_type: 工作项类型名称。
name: 新标题。
priority: 新优先级(如 P0, P1, P2)。
description: 新描述。
status: 新状态。
assignee: 新负责人(姓名或邮箱)。
field_name: 自定义字段名称,需配合 field_value 使用。
field_value: 自定义字段值。
user_key: (可选) 飞书用户标识符 (X-USER-KEY),用于以特定用户身份进行操作。
Returns:
JSON 格式结果,包含 success 状态和后台任务 ID 列表。
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| status | No | ||
| project | No | ||
| assignee | No | ||
| issue_id | No | ||
| priority | No | ||
| user_key | No | ||
| issue_ids | No | ||
| field_name | No | ||
| description | No | ||
| field_value | No | ||
| work_item_type | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full behavioral burden. It discloses the asynchronous nature via '后台任务 ID 列表' (background task ID list) and the identity-switching capability via user_key (X-USER-KEY). However, it does not state whether updates are partial/patch-style, how per-item failures are reported, or whether the operation is reversible.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The docstring is front-loaded with the purpose statement, followed by a clean Args list and a Returns note. It is verbose, but every line earns its place given the 0% schema coverage — the parameter list is necessary documentation rather than padding.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 12-parameter mutation tool with zero annotations, the description covers parameter semantics and return shape well. It falls short on resolving sibling choice (update_task is a near-duplicate for single items) and on clarifying partial-update semantics — gaps that matter because the schema marks zero parameters as required.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description fully compensates: it documents all 12 parameters, including value formats (project by name or Key, priority examples like P0/P1/P2, assignee by name or email) and the dependency relationship between field_name and field_value. This adds substantial meaning that the bare schema entirely lacks.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb-resource statement — '批量更新工作项字段' (batch update work item fields) — and clarifies the scope as single or multiple work items. This functionally differentiates it from singular siblings like update_task, though it never names the sibling explicitly.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no explicit when-to-use or when-not-to-use guidance relative to sibling tools such as update_task or transition_task_status; usage context is only implied by the 'batch' designation. The only concrete usage guidance present is parameter-level — issue_id and issue_ids are flagged as mutually exclusive (二选一), which helps invocation but not tool selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
bind_child_tasksB
将多个工作项绑定为指定父工作项的“子任务”(通过关联关系规则实现)。
Args:
parent_issue_id: 父工作项 ID(必填)。
child_issue_ids: 子工作项 ID 列表(必填)。
relation_name: 关联规则名称(可选)。当存在多条规则时建议必填。
project: 项目标识符(可选)。可以是项目名称或 project_key;不传则使用默认项目。
work_item_type: 工作项类型名称(可选)。
user_key: (可选) 飞书用户标识符 (X-USER-KEY)。
Returns:
JSON 字符串。
成功时(success=true)data 格式:
{
"parent_issue_id": int,
"child_issue_ids": [int, ...],
"relation_name": str
}
失败时返回纯文本错误信息(由 with_error_handling 统一处理)。
| Name | Required | Description | Default |
|---|---|---|---|
| project | No | ||
| user_key | No | ||
| relation_name | No | ||
| work_item_type | No | ||
| child_issue_ids | Yes | ||
| parent_issue_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden and does add useful behavior: it specifies that success returns a JSON string with a defined data structure and that failures return plain-text errors handled by with_error_handling. However, it does not disclose side-effect behavior such as whether existing child bindings are replaced, whether the operation is idempotent, or what permissions are required.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The purpose is front-loaded in one clear sentence, and the Args/Returns sections are organized and scannable. The internal reference to with_error_handling is minor noise, but overall every section earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The output schema already covers the success return shape, and the description usefully adds the failure mode and parameter semantics. For a mutating operation with no annotations, however, the absence of when-to-use guidance and side-effect disclosure leaves the agent under-informed about consequences and alternatives.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description compensates by explaining all six parameters, including defaults for project and user_key and a recommendation for relation_name. The only weak spot is work_item_type, which is described as a name but not given its purpose in the binding operation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The opening sentence states a specific action (bind multiple work items) on a specific resource (parent work item's child tasks) via relation rules, which is clear and distinct from sibling operations like unbind_child_tasks. It does not explicitly name the sibling alternatives, so it stops one step short of full differentiation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives parameter-level advice, notably that relation_name should be provided when multiple rules exist, but it never tells the agent when to choose this tool over unbind_child_tasks or list_child_tasks. There is no stated condition, prerequisite, or exclusion, so usage context is largely absent.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
create_taskA
在指定项目中创建新的工作项(任务/Issue)。
这是创建飞书项目工作项的主要工具。系统会自动处理字段值的转换
(如将 "P0" 转换为对应的选项 Key)。
Args:
name: 工作项标题,必填。
project: 项目标识符(可选)。可以是:
- 项目名称(如 "SR6D2VA-7552-Lark")
- project_key(如 "project_xxx")
如不指定,则使用环境变量 FEISHU_PROJECT_KEY 配置的默认项目。
work_item_type: 工作项类型名称(可选),如 "需求管理"、"Issue管理"、"项目管理" 等名。
如不指定,默认使用项目中的第一个可用类型。
priority: 优先级,可选值: P0(最高), P1, P2(默认), P3(最低)。
description: 工作项描述,支持纯文本。
assignee: 负责人的姓名或邮箱。如不指定则为空。
user_key: (可选) 飞书用户标识符 (X-USER-KEY),用于以特定用户身份进行操作。
Returns:
成功时返回 "创建成功,Issue ID: xxx"。
失败时返回错误信息。
Examples:
# 使用默认项目创建任务
create_task(name="修复登录页面崩溃问题", priority="P0")
# 指定项目和工作项类型创建任务
create_task(
project="SR6D2VA-7552-Lark",
work_item_type="Issue管理",
name="修复登录页面崩溃问题",
priority="P0",
assignee="张三"
)
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| project | No | ||
| assignee | No | ||
| priority | No | P2 | |
| user_key | No | ||
| description | No | ||
| work_item_type | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden and performs well: it discloses automatic field-value conversion ('系统会自动处理字段值的转换(如将 P0 转换为对应的选项 Key)'), fallback defaults, and exact return behavior ('创建成功,Issue ID: xxx' on success, error info on failure). It does not cover permission requirements or side effects such as notifications, but the core mutation behavior and automatic transformations are transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with clear sections — purpose, key auto-conversion behavior, Args list, Returns, and two realistic Examples — and the purpose is front-loaded. It is longer than minimal, but the length is justified by the 0% schema coverage and 7-parameter surface; nearly every sentence earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 7-param creation tool with no annotations and empty schema descriptions, this is nearly complete: purpose, parameter semantics, default behaviors, auto-conversion, and return messages are all covered, and an output schema exists for return values. The one notable omission is user_key semantics, plus there is no guidance on failure scenarios beyond 'returns error info'.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description is the sole semantic source, and it compensates strongly for 6 of 7 parameters: project accepts a name or 'project_xxx' key format, priority enumerates P0-P3 with default P2, assignee accepts name or email, description supports plain text, and work_item_type falls back to the first available type. The real gap is user_key, which appears in the schema but is never explained in either the schema or the description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource: '在指定项目中创建新的工作项(任务/Issue)' (create new work items in a specified project) and explicitly identifies itself as '创建飞书项目工作项的主要工具' (the main tool for creating Feishu project work items). This role is unambiguous against the sibling set, which contains update/batch_update/get/transition tools but no other creation tool.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives clear usage context: it documents the default project resolution from environment variable FEISHU_PROJECT_KEY, the default work_item_type fallback to the first available type, the default priority P2, and includes two worked examples (minimal default-project call and fully-specified call). However, it never names alternatives or states when NOT to use it, stopping short of explicit exclusion guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
delete_task_commentA
删除指定评论。
Args:
issue_id: 工作项 ID。
comment_id: 评论 ID。
project: 项目标识符(可选)。可以是项目名称或 project_key;不传则使用环境变量 FEISHU_PROJECT_KEY 指定的默认项目。
work_item_type: 工作项类型名称(可选)。不传则使用默认类型。
user_key: (可选) 飞书用户标识符 (X-USER-KEY)。
Returns:
JSON 字符串。
成功时(success=true)data 格式:
{
"issue_id": int,
"comment_id": str
}
失败时返回纯文本错误信息(由 with_error_handling 统一处理),常见原因包括:
- comment_id 不存在
- 当前用户无权限删除该评论
Examples:
delete_task_comment(issue_id=123, comment_id="c1")
| Name | Required | Description | Default |
|---|---|---|---|
| project | No | ||
| issue_id | Yes | ||
| user_key | No | ||
| comment_id | Yes | ||
| work_item_type | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and does well: it discloses the success return format (data with issue_id and comment_id), the failure return format (plain-text error via with_error_handling), and common failure causes including a permission prerequisite. It stops short of explicitly stating the deletion is permanent/irreversible, but the disclosure is solid.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-organized into Args, Returns, and Examples sections, with the core action stated up front. It is moderately long, but the length is justified given 0% schema coverage, since parameter semantics and return formats must live in the description. No filler or tautology.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 5-parameter delete operation with no annotations, the description is thorough: all parameters documented with defaults, success and failure return formats specified, common error causes listed, and a concrete example provided. Minor omissions — no explicit irreversibility warning and no cross-references to sibling comment tools — keep it from a 5.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must fully compensate — and it does. Every one of the 5 parameters gets meaning beyond its schema title: issue_id and comment_id are identified as the required keys, project documents name-or-key flexibility and env-var defaulting (FEISHU_PROJECT_KEY), work_item_type documents default-type behavior, and user_key is mapped to the X-USER-KEY header.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource ('删除指定评论' — delete specified comment), which is clear and accurate. It doesn't explicitly differentiate from sibling comment tools like update_task_comment or add_task_comment, though the delete verb itself separates it from them.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives is provided. The description explains failure conditions (comment_id not found, no permission) but never states 'use this to remove a comment, use update_task_comment to edit one.' Usage context is only implied by the tool name and the example invocation.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_task_detailA
获取单个工作项的完整详情。
当你需要查看工作项的所有字段信息时使用此工具。
返回的详情包含所有可用字段(包括自定义字段)。
用户相关字段(如负责人、创建者等)会自动转换为人名以提高可读性。
Args:
issue_id: 工作项 ID,必填。
project: 项目标识符(可选)。可以是:
- 项目名称(如 "SR6D2VA-7552-Lark")
- project_key(如 "project_xxx")
如不指定,则使用环境变量 FEISHU_PROJECT_KEY 配置的默认项目。
work_item_type: 工作项类型名称(可选),如 "需求管理"、"Issue管理"、"项目管理" 等。
如不指定,默认使用项目中的第一个可用类型。
user_key: (可选) 飞书用户标识符 (X-USER-KEY),用于以特定用户身份进行操作。
Returns:
JSON 格式的完整工作项详情。
失败时返回错误信息。
Examples:
# 获取工作项详情(使用默认项目)
get_task_detail(issue_id=12345)
# 指定项目和工作项类型
get_task_detail(
issue_id=12345,
project="SR6D2VA-7552-Lark",
work_item_type="Issue管理"
)
| Name | Required | Description | Default |
|---|---|---|---|
| project | No | ||
| issue_id | Yes | ||
| user_key | No | ||
| work_item_type | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses the return format (JSON full work item details), that all available fields including custom fields are returned, that user-related fields are converted to person names for readability, and that failures return error info. This is meaningful behavioral context beyond the name.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with Intro, Args, Returns, and Examples sections. It is slightly redundant in repeating 'complete details' and 'all fields', but every section earns its place and examples add practical value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given that an output schema exists, the description does not need to enumerate the return structure. It covers all four parameters, their defaults, optionality, and real-world examples. The user_key behavior and default project resolution are also explained, making the tool complete for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must fully document the parameters. It does: issue_id is required, project accepts a name or project_key with defaulting behavior, work_item_type defaults to the first type, and user_key acts as the Feishu user identifier. Examples further clarify usage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource: '获取单个工作项的完整详情' (get complete details of a single work item). It clearly differentiates from sibling get_tasks by emphasizing a single item and all fields, so an agent can distinguish it without ambiguity.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives clear context: '当你需要查看工作项的所有字段信息时使用此工具' (use when you need to view all fields of a work item). It does not explicitly name alternatives or exclusion cases, but the usage context is sufficiently clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_task_optionsA
获取字段的可用选项列表。
当你不确定某个字段有哪些可选值时,使用此工具查询。
这对于了解状态流转、优先级选项等非常有用。
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="需求管理")
| Name | Required | Description | Default |
|---|---|---|---|
| project | No | ||
| user_key | No | ||
| field_name | Yes | ||
| work_item_type | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full behavioral burden. It discloses the return format ('JSON 格式的选项列表,格式为 {label: value}'), failure behavior ('失败时返回错误信息'), and default behavior for optional parameters (default project via FEISHU_PROJECT_KEY, default first work item type). This goes beyond minimal transparency, though it could explicitly state that the operation is read-only.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with clear Args, Returns, and Examples sections, and the primary purpose is front-loaded. It is somewhat verbose due to multiple examples, but each part serves a purpose and the formatting aids quick scanning.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers all four parameters, explains defaults and optionality, provides three examples, and states the return/error behavior. With an output schema present and no nested objects, the tool description is sufficient for an agent to invoke it correctly without additional context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate, and it does thoroughly. The Args section explains each parameter's meaning, optionality, defaults, and examples (e.g., field_name as 'status'/'priority', project by name or key, work_item_type like '需求管理'). This adds substantial value beyond the bare schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific action: '获取字段的可用选项列表' (get the available option list for a field). It clearly identifies the resource (task field options) and provides usage examples for common fields like status and priority, making it easy to distinguish from sibling task-management tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly tells when to use the tool: '当你不确定某个字段有哪些可选值时,使用此工具查询', and clarifies that it's useful for understanding status transitions and priority options. It does not mention when not to use it or list alternatives, but the context is clear enough for a lookup tool.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_tasksA
获取项目中的工作项列表(支持全量获取或按条件过滤)。
这是通用的任务获取工具,具备以下特性:
1. 无过滤参数时,返回项目的全部工作项
2. 支持按任务名称关键词进行高效搜索(推荐)
3. 支持按状态、优先级、负责人进行灵活过滤
4. 支持按关联工作项 ID 或名称过滤(查找与指定工作项关联的项)
5. 如果项目不存在某个字段(如状态),会自动跳过该过滤条件
6. 支持指定工作项类型(如 "需求管理"、"Issue管理"、"项目管理" 等)
Args:
project: 项目标识符(可选)。可以是:
- 项目名称(如 "Project Management")
- project_key(如 "project_xxx")
如不指定,则使用环境变量 FEISHU_PROJECT_KEY 配置的默认项目。
work_item_type: 工作项类型名称(可选),如 "需求管理"、"Issue管理"、"项目管理" 等。
如果不指定,默认使用 "问题管理" 类型。
name_keyword: 任务名称关键词(可选,支持模糊搜索,推荐使用)。
例如:"SG06VA" 可以搜索所有包含该关键词的任务。
status: 状态过滤(多个用逗号分隔),如 "待处理,进行中"(可选)。
priority: 优先级过滤(多个用逗号分隔),如 "P0,P1"(可选)。
owner: 负责人过滤(姓名或邮箱)(可选)。
related_to: 关联工作项 ID 或名称(可选)。用于查找与指定工作项关联的其他工作项。
- 如果是整数或数字字符串,直接作为工作项 ID 使用
- 如果是非数字字符串,自动搜索该名称对应的工作项(精确匹配优先)
例如:related_to="SG06VA1" 或 related_to=6288163810
page_num: 页码,从 1 开始(默认 1)。
page_size: 每页数量(默认 50,最大 100)。
user_key: (可选) 飞书用户标识符 (X-USER-KEY),用于以特定用户身份进行操作。
Returns:
JSON 格式的工作项列表,包含 id, name, status, priority, owner。
失败时返回错误信息。
Examples:
# 获取默认项目的全部工作项
get_tasks()
# 获取"需求管理"类型的工作项
get_tasks(project="Project Management", work_item_type="需求管理")
# 按名称关键词搜索(推荐,高效)
get_tasks(name_keyword="SG06VA")
# 获取指定优先级的任务
get_tasks(priority="P0,P1")
# 查找与指定工作项关联的工作项(通过名称)
get_tasks(related_to="SG06VA1", work_item_type="Issue管理")
# 查找与指定工作项关联的工作项(通过 ID)
get_tasks(
project="Project Management",
work_item_type="需求管理",
related_to=6181818812
)
# 指定项目并组合多个条件过滤
get_tasks(
project="Project Management",
work_item_type="需求管理",
name_keyword="SG06VA",
status="进行中",
priority="P0"
)
| Name | Required | Description | Default |
|---|---|---|---|
| owner | No | ||
| status | No | ||
| project | No | ||
| page_num | No | ||
| priority | No | ||
| user_key | No | ||
| page_size | No | ||
| related_to | No | ||
| name_keyword | No | ||
| work_item_type | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full behavioral burden and does so thoroughly. It discloses default project resolution via FEISHU_PROJECT_KEY, default work_item_type, behavior when a field does not exist, related_to matching semantics, pagination limits, and the user_key impersonation option.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is long but well-structured with a summary line, numbered behavioral features, Args section, Returns section, and clear Examples. Every section adds value; the examples demonstrate realistic combinations and parameter formats without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For an 11-parameter list-fetch tool with no annotations, the description is complete. It covers default values, filtering behavior, output shape, error behavior, and usage examples. An agent has enough context to select the tool and invoke it correctly without inspecting sibling schemas.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema provides only titles and defaults with no descriptions. The description compensates fully by explaining every parameter in detail, including types, defaults, accepted formats, and real examples. related_to and project receive especially rich clarification.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource: '获取项目中的工作项列表' (get work item list in a project). It clearly enumerates supported filtering modes and explicitly distinguishes this list-oriented tool from sibling tools like get_task_detail, create_task, and update_task.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear usage context: default behavior with no filters, recommended name_keyword search, optional filtering by status/priority/owner, and pagination. It even notes that nonexistent fields are skipped. However, it does not explicitly state when to prefer a sibling tool such as get_task_detail for single-item retrieval.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_task_transition_requirementsA
获取将指定工作项流转到目标状态前的必填信息要求。
该工具用于在执行状态流转前,先询问系统:从当前状态流转到 target_status 需要补全哪些字段。
常见场景包括:
- 流转到“已完成/已关闭”时需要填写“解决方案”“原因”“验证人”等字段
- 流转到某些阶段需要指定角色负责人(role owners)或填写额外信息
本工具仅负责:
1) project/work_item_type 参数解析(project_name 与 project_key 分支)
2) 委托 WorkflowProvider 解析状态名并调用 WorkflowAPI.get_transition_required_info
3) 返回统一的 JSON envelope(success/data),便于 LLM 稳定解析
注意:
- 成功时返回 JSON 字符串(success=true)。
- 失败时返回纯文本错误信息(由 with_error_handling 统一处理),不会返回 JSON。
Args:
issue_id: 工作项 ID,必填。
target_status: 目标状态名称(人类可读),必填。例如:"已完成"、"待处理"。
project: 项目标识符(可选)。可以是项目名称或 project_key;不传则使用环境变量 FEISHU_PROJECT_KEY 指定的默认项目。
work_item_type: 工作项类型名称(可选)。例如:"问题管理"、"Issue管理"。
mode: 工作流查询模式(可选)。透传给后端接口,用于控制必填项返回策略。
user_key: (可选) 飞书用户标识符 (X-USER-KEY),用于以特定用户身份进行操作。
Returns:
JSON 字符串。
成功时(success=true)data 格式至少包含:
{
"required_fields": [ ... ]
}
失败时返回纯文本错误信息(由 with_error_handling 统一处理),常见原因包括:
- target_status 无法匹配(会提示“可选状态”)
- 当前用户无权限查询该工作项的工作流信息
- 网络/系统异常
Examples:
# 查询将 Issue 123 流转到“已完成”前需要填哪些字段
get_task_transition_requirements(issue_id=123, target_status="已完成")
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | ||
| project | No | ||
| issue_id | Yes | ||
| user_key | No | ||
| target_status | Yes | ||
| work_item_type | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
没有 annotations,描述承担了完整的行为披露义务。它明确说明了成功时返回 JSON 字符串、失败时返回纯文本错误信息,并列出常见错误原因和内部委托流程,agent 能准确预判调用结果。
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
按场景、职责、注意、Args、Returns、Examples 分段组织,信息密度高且前置了核心用途。但成功/失败返回格式在注意和 Returns 两处重复说明,略有冗余。
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
在无 annotations、参数描述覆盖率为 0% 的情况下,描述覆盖了所有必要调用信息:参数、返回值格式、错误模式、默认行为和示例。配合存在的输出 schema,agent 已具备正确调用该工具的完整上下文。
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema 描述覆盖率为 0%,描述完全弥补了参数语义空白。每个参数都给出了含义、可选性、默认值或作用,包括 project 的环境变量回退、mode 的透传语义和 user_key 的用户身份用途。
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
描述以明确的动词+资源说明了工具用途:获取将工作项流转到目标状态前需要补全的必填字段。与兄弟工具 transition_task_status 等形成清晰区分,且通过场景示例让用途一目了然。
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
描述清楚指出了使用时机(在执行状态流转前查询必填要求),并给出常见场景和工具职责边界。但没有显式命名兄弟工具或说明何时不应使用本工具,排除性指引略弱。
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_child_tasksA
列出指定父工作项下的子任务(通过“空间关联关系”规则实现)。
背景说明:
- 飞书项目中的“父子/子任务”通常不是一个固定字段,而是通过“关联关系规则(Relation Rule)”实现。
- 同一个项目空间可能存在多条关联规则(例如:"子任务"、"关联"、"阻塞")。
因此本工具支持 relation_name 参数用于选择具体规则。
本工具的行为:
1) 解析 project / work_item_type 参数(支持 project_name 与 project_key 两种输入)。
2) 通过 HierarchyProvider 选择关联规则:
- 若 relation_name 传入:按名称精确匹配。
- 若未传:若规则只有 1 条则自动选择;若 >1 条则报错提示需要指定。
3) 调用 RelationAPI.work_item_list 获取关联的 work_item_ids。
注意:
- 成功时返回 JSON 字符串(success=true)。
- 失败时返回纯文本错误信息(由 with_error_handling 统一处理),不会返回 JSON。
Args:
parent_issue_id: 父工作项 ID(必填)。
relation_name: 关联规则名称(可选)。规则多于 1 条时建议必填。
page_num: 页码,从 1 开始(默认 1)。
page_size: 每页数量(默认 20)。
project: 项目标识符(可选)。可以是项目名称或 project_key;不传则使用环境变量 FEISHU_PROJECT_KEY 指定的默认项目。
work_item_type: 工作项类型名称(可选)。例如:"问题管理"、"Issue管理"。
user_key: (可选) 飞书用户标识符 (X-USER-KEY)。
Returns:
JSON 字符串。
成功时(success=true)data 格式:
{
"work_item_ids": [int, ...]
}
Examples:
# 获取父任务 123 的子任务列表(自动选择唯一规则)
list_child_tasks(parent_issue_id=123)
# 指定关联规则名称
list_child_tasks(parent_issue_id=123, relation_name="子任务")
| Name | Required | Description | Default |
|---|---|---|---|
| project | No | ||
| page_num | No | ||
| user_key | No | ||
| page_size | No | ||
| relation_name | No | ||
| work_item_type | No | ||
| parent_issue_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the behavioral burden. It documents success vs failure response formats (JSON with success=true vs plain-text error), the env-var default for project, and page/relation-rule resolution behavior. It stops short of mentioning auth requirements, rate limits, or empty-result behavior, but those are not essential for a read-only list operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is sectioned and front-loaded with the one-line purpose. Although long, the background, numbered behavior, Args, Returns, and Examples sections are each informative and avoid filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 7-parameter tool with no annotation support and zero schema descriptions, the description is complete: it explains parameter semantics, default selection, ambiguity errors, return payload shape, and gives two examples. There is no missing information an agent needs to invoke it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description fully compensates: every one of the 7 parameters is explained with type, default, and meaning, including parent_issue_id, relation_name, page_num/page_size, project, work_item_type, and user_key. Examples show realistic calls.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The opening sentence states a specific action and resource: '列出指定父工作项下的子任务' and clarifies the underlying mechanism (空间关联关系规则). The behavior section names the exact API call, RelationAPI.work_item_list, which separates this from broader task tools like get_tasks and from bind_child_tasks/unbind_child_tasks.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It gives concrete selection rules for relation_name: exact match if provided, auto-select when there is exactly one rule, and an explicit error when multiple rules exist. It does not explicitly list alternative tools or say when not to use this tool, but the context is clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_projectsA
列出所有可用的飞书项目空间。
当你不知道项目的 project_key 时,先调用此工具获取项目列表。
返回的列表包含项目名称和对应的 project_key。
Args:
user_key: (可选) 飞书用户标识符 (X-USER-KEY),用于以特定用户身份进行操作。
Returns:
JSON 格式的项目列表,格式为 {project_name: project_key}。
失败时返回错误信息。
Examples:
# 查看有哪些项目可用
list_projects()
| Name | Required | Description | Default |
|---|---|---|---|
| user_key | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
There are no annotations, so the description carries the burden of explaining behavior. It discloses that the tool is read-only by nature, describes the return format as a JSON mapping of project_name to project_key, and notes failure behavior. It does not mention permissions or pagination, but for a simple list operation this is adequate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with a clear purpose, Args, Returns, and an Example. Every section adds value, and the example usefully demonstrates that the tool can be called without arguments.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a read-only list tool with one optional parameter, the description is complete: it states what it returns, the return format, failure behavior, and when to call it. Nothing essential is missing for an agent to invoke it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema only provides a name, type, and default for user_key, with no semantic explanation. The description adds meaningful detail by explaining that user_key is the Feishu X-USER-KEY and can be used to operate as a particular user, which fully compensates for the sparse schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool '列出所有可用的飞书项目空间' (lists all available Feishu project spaces), which is a specific verb and resource. It also explains that the returned list includes project names and project_keys, making it easy to differentiate from the task-focused sibling tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly says to call this tool first when the project_key is unknown, which is clear and actionable. It does not explicitly describe when-not-to-use or mention alternatives, but there is no competing project-listing sibling, so the context is sufficiently clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_task_commentsA
获取指定工作项下的评论列表。
Args:
issue_id: 工作项 ID。
page_num: 页码,从 1 开始(默认 1)。
page_size: 每页数量(默认 20,最大值由服务端限制)。
project: 项目标识符(可选)。可以是项目名称或 project_key;不传则使用环境变量 FEISHU_PROJECT_KEY 指定的默认项目。
work_item_type: 工作项类型名称(可选)。不传则使用默认类型。
user_key: (可选) 飞书用户标识符 (X-USER-KEY)。
Returns:
JSON 字符串。
data 格式:
{
"total": int,
"page_num": int,
"page_size": int,
"items": [
{
"comment_id": str|int,
"author": Any,
"create_time": Any,
"content": str
}
]
}
Examples:
list_task_comments(issue_id=123, page_num=1, page_size=20)
| Name | Required | Description | Default |
|---|---|---|---|
| project | No | ||
| issue_id | Yes | ||
| page_num | No | ||
| user_key | No | ||
| page_size | No | ||
| work_item_type | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the behavioral disclosure burden. It discloses pagination behavior, optional project/type fallback defaults, environment variable usage, and the JSON return shape. It does not mention error cases or explicitly confirm read-only semantics, but '获取...列表' sufficiently implies a non-mutating list operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with a clear one-line purpose, an Args section, a Returns section, and a minimal example. Every section adds necessary value, especially given the lack of schema descriptions, and there is no wasteful filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 6-parameter tool with no annotations, the description covers parameter semantics, defaults, return format, and a usage example. It is sufficiently complete for an agent to call the tool correctly, though it could add error behavior or clarification of the optional user_key usage.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description fully compensates by documenting every parameter: issue_id, page_num, page_size, project, work_item_type, and user_key. It adds meaningful semantics like defaults, the server-side page_size limit, the FEISHU_PROJECT_KEY fallback, and what 'project' can be.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description begins with a clear verb and resource: '获取指定工作项下的评论列表' (retrieve the comment list under a specified work item). This differentiates it from sibling comment mutation tools like add_task_comment, update_task_comment, and delete_task_comment.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description makes it clear this is for listing comments and provides an example call, but it does not explicitly state when to use this tool over alternatives or when not to use it. Sibling names imply the distinction, but no direct usage guidance is provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
transition_task_statusA
将指定工作项流转到目标状态。
该工具用于执行飞书项目工作项的状态流转(Workflow Transition)。
它会根据 target_status(人类可读的状态名称)自动解析出对应的 state_key / transition_id,
并调用后端的 workflow state_change 接口完成流转。
使用建议:
- 在调用本工具前,建议先调用 get_task_transition_requirements 获取必填字段要求。
- fields 参数当前仅支持 list[dict] 透传(最小实现),用于满足流转前的必填字段。
例如:[{"field_key": "field_x", "field_value": "y"}]。
注意:
- 成功时返回 JSON 字符串(success=true)。
- 失败时返回纯文本错误信息(由 with_error_handling 统一处理),不会返回 JSON。
Args:
issue_id: 工作项 ID,必填。
target_status: 目标状态名称(人类可读),必填。
fields: 流转时需要提交的字段列表(可选)。元素为 dict,直接透传给后端。
project: 项目标识符(可选)。可以是项目名称或 project_key;不传则使用环境变量默认项目。
work_item_type: 工作项类型名称(可选)。
mode: 流转模式(可选)。当前仅透传给 Provider,预留未来扩展。
user_key: (可选) 飞书用户标识符 (X-USER-KEY)。
Returns:
JSON 字符串。
成功时(success=true)data 格式至少包含:
{
"issue_id": int,
"target_status": str
}
失败时返回纯文本错误信息(由 with_error_handling 统一处理),常见原因包括:
- target_status 无法匹配(会提示“可选状态”)
- 流转失败(后端返回权限/参数错误等)
Examples:
# 直接流转(无额外字段)
transition_task_status(issue_id=123, target_status="已完成")
# 带必填字段流转
transition_task_status(
issue_id=123,
target_status="已完成",
fields=[{"field_key": "field_resolution", "field_value": "已修复"}],
)
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | ||
| fields | No | ||
| project | No | ||
| issue_id | Yes | ||
| user_key | No | ||
| target_status | Yes | ||
| work_item_type | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full disclosure burden, and it meets it thoroughly. It states success returns a JSON string with success=true, failure returns plain text via with_error_handling, the automatic resolution of state_key/transition_id, the default project behavior, and common error causes such as unmatchable target_status.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is long but tightly organized into summary, usage suggestions, notes, Args, Returns, and Examples so an agent can scan efficiently. Some repetition exists between the Notes section and Returns section regarding failure returning plain text, but every sentence otherwise contributes meaningful call-related detail.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 7-parameter tool with no annotations and 0% schema description coverage, the description is essentially complete: it documents all parameters, return format, failure modes, pre-call requirements, and provides two examples. An agent has enough information to invoke this tool correctly and interpret its result.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate, and it largely does. Every parameter is listed with a concise explanation: issue_id and target_status required, fields as list[dict] passthrough, project defaults to environment variable, mode reserved, user_key for Feishu identity. The included examples add useful concreteness for fields formatting, though mode and work_item_type remain somewhat underspecified.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb and resource: '将指定工作项流转到目标状态' (transition the specified work item to a target state). It goes beyond a generic label by explaining that it resolves target_status into state_key/transition_id and invokes the backend workflow state_change endpoint, which clearly distinguishes it from content-update tools like update_task.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly recommends calling get_task_transition_requirements before this tool, which is strong usage guidance for preparation. It also clarifies that fields is currently only a minimal list[dict] passthrough. It does not explicitly state when not to use this tool versus alternatives, but no sibling offers a workflow transition, so the main prerequisite guidance is sufficient.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
unbind_child_tasksA
解绑指定父工作项的子任务关系(按关联关系规则整体解绑)。
当前最小实现:
- 调用 RelationAPI.delete 删除父工作项在该规则下的关联关系(服务端语义通常为“清空该规则下的绑定”)。
Args:
parent_issue_id: 父工作项 ID(必填)。
relation_name: 关联规则名称(可选)。
project: 项目标识符(可选)。
work_item_type: 工作项类型名称(可选)。
user_key: (可选) 飞书用户标识符 (X-USER-KEY)。
Returns:
JSON 字符串。
成功时(success=true)data 格式:
{
"parent_issue_id": int,
"relation_name": str
}
失败时返回纯文本错误信息(由 with_error_handling 统一处理)。
| Name | Required | Description | Default |
|---|---|---|---|
| project | No | ||
| user_key | No | ||
| relation_name | No | ||
| work_item_type | No | ||
| parent_issue_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden, and it does well by disclosing that the implementation calls RelationAPI.delete and that the server semantics usually mean 'clear all bindings under this rule.' It also states that failures return plain-text errors via with_error_handling. However, it does not clarify behavior when relation_name is omitted or whether the operation is reversible, so it is not fully transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with an implementation note, an Args section, and a Returns section. The purpose is front-loaded, and every sentence provides useful information without filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers purpose, parameters, return format, and failure behavior, and an output schema exists, so return values do not need much explanation. The main gap is that relation_name is optional, yet the description repeatedly refers to '该规则' without stating what happens when relation_name is not provided or how the rule is otherwise determined. This is a meaningful ambiguity for a 5-parameter tool with no annotations.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description compensates by enumerating all five parameters with roles and required/optional status, such as parent_issue_id being required and user_key mapping to X-USER-KEY. It adds meaning beyond the schema's titles and defaults, but it does not explain how the optional parameters combine to identify the specific rule or what happens when relation_name is absent.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource: '解绑指定父工作项的子任务关系' (unbind child-task relationships of a specified parent work item). It also clarifies the scope as '按关联关系规则整体解绑' (unbind as a whole per relation rule), which distinguishes it from per-child unbinding and from sibling tools like bind_child_tasks and list_child_tasks.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied through the tool name and purpose: use this to remove child-task relation bindings for a parent work item. However, the description does not explicitly state when to use it versus alternatives, when not to use it, or any prerequisites such as whether the relation must already exist.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
update_taskA
更新工作项的字段。
可以同时更新多个字段,这些字段可以通过 fields_json 一次性传入。
Args:
issue_id: 要更新的工作项 ID。
project: 项目标识符(可选)。
work_item_type: 工作项类型名称(可选)。
name: 新标题(可选)。
priority: 新优先级(可选)。
description: 新描述(可选)。
status: 新状态(可选)。
assignee: 新负责人(可选)。
field_name: 单个自定义字段名称(可选)。
field_value: 单个自定义字段值(可选)。
fields_json: JSON 格式的字段字典(可选),用于批量更新多个自定义字段。
例如: '{"Soc Vendor": "Amlogic", "DDR 大小": "128MB"}'
user_key: (可选) 飞书用户标识符 (X-USER-KEY),用于以特定用户身份进行操作。
Returns:
成功时返回 "更新成功"。
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| status | No | ||
| project | No | ||
| assignee | No | ||
| issue_id | Yes | ||
| priority | No | ||
| user_key | No | ||
| field_name | No | ||
| description | No | ||
| field_value | No | ||
| fields_json | No | ||
| work_item_type | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden of behavioral disclosure. It does add useful behavioral context: multiple fields can be updated at once, fields_json enables bulk custom-field updates, user_key allows acting as a specific user, and success returns '更新成功'. However, it does not mention permissions, reversibility, partial-failure behavior, or side effects for a mutating operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well organized with a short summary, an Args list, and a Returns line. Each parameter earns its place given the zero schema coverage, though the repeated '(可选)' markers add some redundancy with the schema's optionality.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers all 12 parameters and the return value, which is essential because the schema provides no descriptions. It does not clarify interactions or conflicts between field_name/field_value vs fields_json, nor does it mention valid values or when to prefer transition_task_status, leaving minor gaps for a 12-parameter tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must explain all parameters. It does: every parameter is listed with a plain-language meaning, and fields_json is accompanied by a concrete JSON example. This compensates fully for the lack of schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool updates work item fields, with a specific verb and resource. It also highlights multi-field updates via fields_json, but it does not explicitly distinguish itself from the sibling tool batch_update_tasks or clarify that status transitions should go through transition_task_status.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance is given about when to use this tool versus alternatives such as transition_task_status or batch_update_tasks. The description lists parameters but does not state prerequisites, exclusions, or which scenarios favor a sibling tool.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
update_task_commentA
更新指定评论内容(纯文本)。
Args:
issue_id: 工作项 ID。
comment_id: 评论 ID。
content: 新的评论内容(纯文本)。
project: 项目标识符(可选)。可以是项目名称或 project_key;不传则使用环境变量 FEISHU_PROJECT_KEY 指定的默认项目。
work_item_type: 工作项类型名称(可选)。不传则使用默认类型。
user_key: (可选) 飞书用户标识符 (X-USER-KEY)。
Returns:
JSON 字符串。
成功时(success=true)data 格式:
{
"issue_id": int,
"comment_id": str
}
失败时返回纯文本错误信息(由 with_error_handling 统一处理),常见原因包括:
- comment_id 不存在
- 当前用户无权限编辑该评论
- 评论内容为空
Examples:
update_task_comment(issue_id=123, comment_id="c1", content="补充:已完成回归测试")
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | ||
| project | No | ||
| issue_id | Yes | ||
| user_key | No | ||
| comment_id | Yes | ||
| work_item_type | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the behavioral burden; it does so well by specifying the success return format, the failure format (plain text via with_error_handling), and common error causes including permission and missing-comment cases. It also clarifies that content is pure text and how optional defaults are resolved.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well organized with Args, Returns, and Examples sections. Every sentence adds useful information, and the primary purpose is stated first. The example is concrete and demonstrates realistic usage.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a six-parameter mutation tool, the description covers parameter semantics, return behavior, error cases, and an example. It is nearly complete; the only minor gap is explicit guidance on prerequisite or alternative tool selection, but that is not critical for invoking this tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 0% description coverage, but the description fully compensates by documenting every parameter: issue_id, comment_id, content, project, work_item_type, and user_key. It explains defaults, environment variable fallback, and optionality, providing meaning well beyond the bare schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb+resource: '更新指定评论内容' (update specified comment content). It is clearly distinguished from sibling comment tools like add_task_comment and delete_task_comment by targeting an existing comment_id.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The usage is implied through the description: agents should use this when they need to modify an existing comment's content. However, there is no explicit guidance about when not to use it or when to prefer siblings such as add_task_comment or delete_task_comment.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
16 tool updates
v0.0.2- First observed
add_task_comment - First observed
batch_update_tasks - First observed
bind_child_tasks - First observed
create_task - First observed
delete_task_comment - First observed
get_task_detail - First observed
get_task_options - First observed
get_task_transition_requirements - First observed
get_tasks - First observed
list_child_tasks - First observed
list_projects - First observed
list_task_comments - First observed
transition_task_status - First observed
unbind_child_tasks - First observed
update_task - First observed
update_task_comment
TDQS
Scored across 16 tools
Most tools target distinct operations (create, list, comment, transition), but update_task and batch_update_tasks overlap significantly since batch_update_tasks also supports single-item updates. Additionally, update_task exposes a status field that partially overlaps with transition_task_status, and get_tasks' related_to filter overlaps with list_child_tasks.
The dominant verb_noun pattern is consistent throughout, and most names are self-explanatory. Minor deviations exist: list_projects/list_task_comments vs get_tasks/get_task_detail use both 'list' and 'get' for similar listing operations, and create_task vs add_task_comment mix 'create' and 'add'.
At 16 tools, the surface is slightly above the typical 3-15 well-scoped range but still appropriate for the breadth of Feishu project workflows. Each tool serves a plausible need, so the count is not excessive.
The tool set covers the core lifecycle well: project discovery, task create/get/update, comments CRUD, status transition requirements and execution, child-task binding, and field option lookup. The main gap is the absence of a delete_task tool, and there is no direct way to create or manage projects, though that may be out of scope.
Maintenance
Related MCP Connectors
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
- mcpOAuthnet.todoist
Official Todoist MCP server for AI assistants to manage tasks, projects, and workflows.
MCP server connecting AI agents to 100+ apps (Gmail, Slack, Notion, GitHub) via one-click OAuth.
MCP server enabling AI agents to manage Bitrix24 features via standardized protocol
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceA zero-configuration MCP server enabling AI assistants to interact with Feishu (Lark) workspace through OAuth authentication, supporting document operations, content creation, and advanced file management.12 npmMIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server for TickTick/Dida365 task integration, enabling AI-driven task decomposition and management with automated OAuth authentication.10MIT
- AlicenseNot gradedqualityCmaintenanceMCP server for Feishu/Lark API integration, enabling AI agents to send messages, manage groups, create and edit documents and spreadsheets, and search knowledge bases.MIT
- AlicenseNot gradedqualityDmaintenanceOfficial MCP server for Feishu/Lark OpenAPI, enabling AI assistants to interact with Feishu/Lark platform for document processing, messaging, calendar scheduling, and more.7,548 npmMIT