Skip to main content
Glama

把本地文件发进会话

feishu_send_file

Uploads local files to Feishu chats, adding an optional caption message and supporting multi-file batch sends for reports, logs, archives, or generated code packages.

Instructions

把本地磁盘上的文件上传并发到飞书会话(文档、压缩包、日志、报表、生成的代码包都行)。这是本项目最核心的工具:任何"我在本地做好了,给你看看"的场景都走它。单个文件上限 30MB,超了会直接报错并给出替代方案。要一次发多个文件,把第一个放 path,其余放 paths;caption 非空时会先发一条纯文本说明再发文件,适合"这是刚才跑出来的结果,重点看第 3 页"。纯图片想直接预览的改用 feishu_send_image;只是想说话不要用这个,用 feishu_send_text。

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": {
      "path": "<path>"
    },
    "name": "feishu_send_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNo发送时显示的文件名;只在单文件时生效,默认取 basename
pathYes本地文件绝对路径(也接受相对路径,内部会 path.resolve)
pathsNo批量发送时的其余文件路径;给了就按 path → paths 的顺序逐个发,最后汇总
targetNo发送目标:chat_id(oc_ 开头)/ open_id(ou_ 开头)/ 邮箱。不填用默认会话。
captionNo随文件发的说明文字;非空时先发一条文本消息,再发文件

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 carries most of the burden and does add real value: a hard 30MB per-file cap that errors out, an alternative suggested on overflow, and the ordering side effect that a non-empty caption emits a separate text message before the file. It stops short of saying what the call returns (file key, message id) or whether auth/permission on the target chat is required.

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?

Front-loaded with the core action and the size limit before the routing alternatives, and nearly every sentence carries actionable information. The self-promotional clause ('这是本项目最核心的工具') is the one line that does not strictly earn its place.

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 5-param, no-output-schema tool with thin annotations, the definition covers size limits, batch ordering, caption behavior, and sibling routing – enough to invoke correctly. It leaves out return-value expectations (no output schema exists, so this is the only place it could be stated) and any notion of posting permissions on the destination chat.

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; the description adds a little genuine meaning by stating the path → paths composition rule as an invocation pattern and by attaching the 30MB ceiling to the file being sent. The caption behavior and single-file-only name semantics largely repeat what the schema already says.

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?

States a specific verb and resource: upload a local file and send it into a Feishu chat, with a concrete list of file types accepted. It also explicitly separates itself from feishu_send_image (previewable images) and feishu_send_text (plain talk), so an agent can route without opening any 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?

Gives explicit when-to-use ('我在本地做好了,给你看看' scenarios), when-not-to-use with the exact alternatives named, and the multi-file convention (first in path, rest in paths). The caption guidance even names the scenario ('这是刚才跑出来的结果,重点看第 3 页') where a text preamble helps.

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