Files
lzwcai-mcp/file_tools
bin fa226733b8 feat(lark-mcp): 重构资产确认卡片并更新项目配置
重构 send_asset_confirmation_card 工具,使用新的卡片模板和参数结构
- 将卡片布局从 column_set 改为 form,简化结构
- 更新参数:inputs/outputs 合并为 asset_list,新增 order_number 和 remark
- 卡片交互按钮现在传递 order_number 和 user_id 到回调
- 更新工具描述和必填字段

同时更新 MCP 服务器配置:
- 统一重命名项目为 lzwcai-lark-mcp 和 lzwcai-file-tools-mcp
- 更新版本号和配置文件中的命令名称
- 更新 file-tools 的 MinIO 环境变量配置
2026-03-03 11:34:45 +08:00
..

File Tools MCP 技能包

该技能包提供文件与 URL 的 Base64 处理能力,主要用于将文件内容转换为 JSON 字符串或 data URI供 MCP Agent 直接调用。

功能

  • 文件对象转 JSON 字符串
  • 文件对象转 data URIBase64
  • 文件路径转 data URIBase64
  • 文件 URL 转 data URIBase64

工具列表

1. file_to_json

将文件对象转储为 JSON 字符串。

入参

{
  "file": {
    "name": "example.txt",
    "type": "text/plain",
    "size": 123,
    "last_modified": 1700000000,
    "content_base64": "SGVsbG8="
  }
}

也可以使用 file_path

{
  "file_path": "e:\\lzwcai-mcp\\README.md"
}

2. file_to_data_uri

将文件对象转换为 data URI。

入参

{
  "file": {
    "name": "hello.txt",
    "content_base64": "SGVsbG8="
  },
  "type": "text/plain"
}

3. file_path_to_data_uri

将本地文件路径转换为 data URI。

入参

{
  "file_path": "e:\\lzwcai-mcp\\README.md",
  "type": "text/plain"
}

4. url_to_data_uri

将文件 URL 转换为 data URI。

入参

{
  "url": "https://example.com/image.png"
}

启动方式

uvx

{
  "mcpServers": {
    "file-tools-mcp": {
      "command": "uvx",
      "type": "stdio",
      "args": [
        "lzwcai-mcpskills-file-tools-mcp"
      ],
      "env": {}
    }
  }
}

python

{
  "mcpServers": {
    "file-tools-mcp": {
      "disabled": false,
      "type": "stdio",
      "timeout": 30,
      "command": "python",
      "args": [
        "-m",
        "file_tools.main"
      ]
    }
  }
}