plm-upload-mcp 1.3.2 → 1.3.4
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/README.md +1 -1
- package/index.mjs +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -43,7 +43,7 @@ Uploads one or more files, each paired with its target SKU.
|
|
|
43
43
|
- `files`: array of `{ path, sku, category? }`
|
|
44
44
|
- `path` — absolute local path to the file
|
|
45
45
|
- `sku` — component SKU, e.g. `MNT-1234-A0`; it must already exist in the PLM
|
|
46
|
-
- `category` — optional
|
|
46
|
+
- `category` — optional: `Compliance` | `Datasheet` | `Quotation` | `Software` | `Drawing` | `3D file` (left out = the PLM guesses from the file name)
|
|
47
47
|
|
|
48
48
|
Each file lands in PLM storage and is mirrored into that SKU's Google Drive folder on
|
|
49
49
|
the part's own drive (staging or main, from the component; created automatically if it
|
package/index.mjs
CHANGED
|
@@ -226,7 +226,7 @@ async function uploadOne({ path, sku, skuName, category, bucket, filename = base
|
|
|
226
226
|
})
|
|
227
227
|
if (synced?.error) throw new Error(synced.error)
|
|
228
228
|
|
|
229
|
-
if (category &&
|
|
229
|
+
if (category && synced?.driveFileId) {
|
|
230
230
|
await edgeJson({ action: 'set-category', fileId: synced.driveFileId, category }).catch(() => {})
|
|
231
231
|
}
|
|
232
232
|
|
|
@@ -237,7 +237,7 @@ async function uploadOne({ path, sku, skuName, category, bucket, filename = base
|
|
|
237
237
|
driveFileId: synced.driveFileId,
|
|
238
238
|
driveWebViewLink: synced.driveWebViewLink,
|
|
239
239
|
replaced: !!synced.replaced,
|
|
240
|
-
category: category
|
|
240
|
+
category: category || undefined,
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
243
|
|
|
@@ -301,9 +301,9 @@ server.registerTool(
|
|
|
301
301
|
path: z.string().describe('Absolute local path to the file to upload.'),
|
|
302
302
|
sku: z.string().describe('Component SKU this file belongs to, e.g. MNT-1234-A0.'),
|
|
303
303
|
category: z
|
|
304
|
-
.enum(['
|
|
304
|
+
.enum(['Compliance', 'Datasheet', 'Quotation', 'Software', 'Drawing', '3D file'])
|
|
305
305
|
.optional()
|
|
306
|
-
.describe('PLM file category
|
|
306
|
+
.describe('PLM file category. Leave it out and the PLM guesses one from the file name.'),
|
|
307
307
|
}),
|
|
308
308
|
)
|
|
309
309
|
.min(1)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "plm-upload-mcp",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.4",
|
|
4
4
|
"description": "MCP server to read the LionsBot PLM (SKU folders, component metadata, extracted drawing metadata, product & staging BOMs) bulk-upload SolidWorks exports (STEP/PDF) into it by SKU, create components' Drive folders and uprev staging prototypes.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"keywords": ["mcp", "modelcontextprotocol", "lionsbot", "plm", "solidworks"],
|