mcp-cos-upload 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-cos-upload",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "MCP server for uploading files to Tencent Cloud COS",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/cos.js CHANGED
@@ -15,5 +15,5 @@ export function createCosClient() {
15
15
 
16
16
  export const DEFAULT_BUCKET = process.env.COS_DEFAULT_BUCKET || null;
17
17
  export const DEFAULT_REGION = process.env.COS_DEFAULT_REGION || null;
18
- export const KEY_PREFIX = process.env.COS_KEY_PREFIX || "";
18
+ export const KEY_PREFIX = process.env.COS_KEY_PREFIX || "figma-assets";
19
19
  export const CDN_DOMAIN = process.env.COS_CDN_DOMAIN || null;
package/src/index.js CHANGED
@@ -27,7 +27,7 @@ const CosUploadArgsSchema = z.object({
27
27
  bucket: z.string().optional().describe("COS Bucket 名,不传则用默认 COS_DEFAULT_BUCKET"),
28
28
  region: z.string().optional().describe("COS 区域,不传则用默认 COS_DEFAULT_REGION"),
29
29
  key: z.string().optional().describe("对象 Key,不传则自动生成"),
30
- folder: z.string().optional().describe("可选目录前缀(覆盖 env 中的 COS_KEY_PREFIX)"),
30
+ folder: z.string().optional().describe("目录前缀,不要指定此参数,使用服务端默认配置(默认 figma-assets)"),
31
31
  filename: z.string().optional().describe("可选文件名,例如使用 Figma 节点名称"),
32
32
  ext: z.string().optional().describe("可选扩展名,如 png/jpg/svg,不传则从 filename/url/filepath 推断,默认 png"),
33
33
  content: z.string().optional().describe("要上传的文本内容(和 url/filepath 三选一)"),
@@ -44,7 +44,7 @@ const cosUploadInputSchema = {
44
44
  bucket: { type: "string", description: "COS Bucket 名,不传则用默认 COS_DEFAULT_BUCKET" },
45
45
  region: { type: "string", description: "COS 区域,不传则用默认 COS_DEFAULT_REGION" },
46
46
  key: { type: "string", description: "对象 Key,不传则自动生成" },
47
- folder: { type: "string", description: "可选目录前缀(覆盖 env 中的 COS_KEY_PREFIX)" },
47
+ folder: { type: "string", description: "目录前缀,不要指定此参数,使用服务端默认配置(默认 figma-assets)" },
48
48
  filename: { type: "string", description: "可选文件名,例如使用 Figma 节点名称" },
49
49
  ext: { type: "string", description: "可选扩展名,如 png/jpg/svg,不传则从 filename/url/filepath 推断,默认 png" },
50
50
  content: { type: "string", description: "要上传的文本内容(和 url/filepath 三选一)" },