bulkflow-mcp 1.1.0 → 1.2.0

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.
Files changed (2) hide show
  1. package/index.js +26 -24
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -84,18 +84,19 @@ server.tool(
84
84
  },
85
85
  );
86
86
 
87
- server.tool(
88
- "get_products",
89
- "Get the actual sheet data (name, price, MOQ, variants, images) for every product in a job, regardless of review state and with no website connection needed. Use this whenever the user just wants the data/sheet from a finished job — it always works, unlike get_export_preview which needs an approved+connected website. Paginated — pass the returned nextCursor back in to get the next page.",
90
- { jobId: z.string(), cursor: z.string().optional(), limit: z.number().int().min(1).max(100).optional() },
91
- async ({ jobId, cursor, limit }) => {
92
- const qs = new URLSearchParams();
93
- if (cursor) qs.set("cursor", cursor);
94
- if (limit) qs.set("limit", String(limit));
95
- const r = await call("GET", `/api/mcp/v1/jobs/${encodeURIComponent(jobId)}/products?${qs}`);
96
- return { content: [{ type: "text", text: JSON.stringify(r) }] };
97
- },
98
- );
87
+ const GET_PRODUCTS_DESC =
88
+ "Get the actual sheet data (name, price, MOQ, variants, images) for every product in a job, regardless of review state and with no website connection needed. Use this whenever the user just wants the data/sheet from a finished job — it always works, unlike get_export_preview which needs an approved+connected website. Paginated — pass the returned nextCursor back in to get the next page.";
89
+ const GET_PRODUCTS_SCHEMA = { jobId: z.string(), cursor: z.string().optional(), limit: z.number().int().min(1).max(100).optional() };
90
+ const getProductsHandler = async ({ jobId, cursor, limit }) => {
91
+ const qs = new URLSearchParams();
92
+ if (cursor) qs.set("cursor", cursor);
93
+ if (limit) qs.set("limit", String(limit));
94
+ const r = await call("GET", `/api/mcp/v1/jobs/${encodeURIComponent(jobId)}/products?${qs}`);
95
+ return { content: [{ type: "text", text: JSON.stringify(r) }] };
96
+ };
97
+
98
+ server.tool("get_products", GET_PRODUCTS_DESC, GET_PRODUCTS_SCHEMA, getProductsHandler);
99
+ server.tool("list_products", "Alias of get_products. " + GET_PRODUCTS_DESC, GET_PRODUCTS_SCHEMA, getProductsHandler);
99
100
 
100
101
  server.tool(
101
102
  "list_projects",
@@ -139,18 +140,19 @@ server.tool(
139
140
  },
140
141
  );
141
142
 
142
- server.tool(
143
- "download_sheet",
144
- "Get a real, clickable download link for the job's Excel sheet. IMPORTANT: before calling this, ask the user which format they want from the `availableFormats` list returned by get_job_status — never pick one yourself. 'default' is BulkFlow's standard sheet (always available); 'importwale', 'shopify' and 'flipkart' only appear in availableFormats if the account has them enabled.",
145
- {
146
- jobId: z.string(),
147
- format: z.enum(["default", "importwale", "shopify", "flipkart"]).optional().describe("Which sheet format — defaults to BulkFlow's standard sheet"),
148
- },
149
- async ({ jobId, format }) => {
150
- const r = await downloadFile(jobId, format || "default");
151
- return { content: [{ type: "text", text: JSON.stringify(r) }] };
152
- },
153
- );
143
+ const DOWNLOAD_SHEET_DESC =
144
+ "Export / download the job's Excel sheet. Returns a base64-encoded file inline (so it can be handed to the user directly in chat, no network fetch needed) plus a download link as a fallback. Use this for ANY request to export, download, or get the sheet/spreadsheet for a job. IMPORTANT: before calling this, ask the user which format they want from the `availableFormats` list returned by get_job_status — never pick one yourself.";
145
+ const DOWNLOAD_SHEET_SCHEMA = {
146
+ jobId: z.string(),
147
+ format: z.enum(["default", "importwale", "shopify", "flipkart"]).optional().describe("Which sheet format — defaults to BulkFlow's standard sheet"),
148
+ };
149
+ const downloadSheetHandler = async ({ jobId, format }) => {
150
+ const r = await downloadFile(jobId, format || "default");
151
+ return { content: [{ type: "text", text: JSON.stringify(r) }] };
152
+ };
153
+
154
+ server.tool("download_sheet", DOWNLOAD_SHEET_DESC, DOWNLOAD_SHEET_SCHEMA, downloadSheetHandler);
155
+ server.tool("export_sheet", "Alias of download_sheet. " + DOWNLOAD_SHEET_DESC, DOWNLOAD_SHEET_SCHEMA, downloadSheetHandler);
154
156
 
155
157
  server.tool(
156
158
  "list_needs_review",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bulkflow-mcp",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "MCP server for BulkFlow AI — source, review and export products from Claude Desktop or ChatGPT.",
5
5
  "type": "module",
6
6
  "bin": {