Skip to main content
Glama

发一张交互卡片

feishu_send_card

Sends a Feishu interactive card using raw JSON for formatted, multi-field status updates that can later be refreshed in place.

Instructions

发一张飞书交互卡片(JSON 卡片结构,原样提交,不做模板加工)。适合:需要排版的内容(分块、分隔线、备注脚注)、要展示多字段状态、以及之后需要原地刷新的那类消息。不适合:只有一两句话的短提示(用 feishu_send_text 更直接)。想让卡片后续可被 feishu_update_card 更新,必须在卡片里写 config.update_multi = true。最小可用卡片示例:{ "config": { "wide_screen_mode": true, "update_multi": true }, "header": { "template": "blue", "title": { "tag": "plain_text", "content": "构建结果" } }, "elements": [ { "tag": "div", "text": { "tag": "lark_md", "content": "状态:通过\n耗时:42s" } }, { "tag": "hr" }, { "tag": "note", "elements": [ { "tag": "plain_text", "content": "由 dsh-feishu 发送" } ] } ] }

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": {
      "card": "<card>"
    },
    "name": "feishu_send_card"
  }
}

Input Schema

NameRequiredDescriptionDefault
cardYes完整卡片 JSON 对象(不要字符串化)。至少要 config / header / elements 三段;elements 里每项要有 tag。建议带上 "config": { "wide_screen_mode": true, "update_multi": true },这样以后能原地更新。
targetNo发送目标:chat_id(oc_ 开头)/ open_id(ou_ 开头)/ 邮箱。不填则发到默认会话(需已配置 FEISHU_DEFAULT_CHAT_ID,否则会报错)。

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.5/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false and openWorldHint=true, so the description has room to add real value, and it does: it discloses that the card JSON is submitted verbatim without template transformation, and that in-place updates later require update_multi=true at send time. It does not cover failure modes or whether the response carries an identifier needed for feishu_update_card, which is the main behavioral gap.

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

Conciseness4/5

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

Purpose and the use/don't-use split are front-loaded before the example, so an agent can decide from the first two sentences. The long JSON block is length the tool genuinely needs for a nested-object parameter, though the surrounding prose and the example overlap slightly on the update_multi advice.

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?

For a tool whose required parameter is a freeform nested JSON object and which has no output schema, the description supplies enough structure to call it correctly on the first try, including the exact prerequisite for later refresh. The one omission is the return side: nothing says what comes back, so an agent planning a send-then-update sequence must infer that it needs the returned message identifier.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description goes beyond it by supplying a complete minimal working card (config/header/elements with div, hr, note tags) that makes the nested object contract concrete in a way the schema's prose does not. The target parameter is left to the schema, which already explains oc_/ou_/email prefixes and the default-chat fallback.

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 leads with a specific verb and resource (发一张飞书交互卡片) and immediately qualifies the scope: raw JSON card structure, submitted as-is, no template processing. It names the sibling it is not (feishu_send_text for short text) and the sibling it pairs with (feishu_update_card), so an agent can distinguish it from feishu_send_info_card or feishu_send_text without opening a schema.

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

Usage Guidelines5/5

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

It gives an explicit positive case (content needing layout, multi-field status, messages to be refreshed in place) and an explicit negative case with the alternative named: one-or-two-sentence messages should use feishu_send_text. It also states the precondition for the update workflow — config.update_multi = true must be present in the card — which is exactly the routing condition an agent needs.

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