plm-upload-mcp 1.6.0 → 1.7.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.mjs +28 -1
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -291,7 +291,7 @@ const readLine = (read) => (read ? ` · ${read.text}${read.listed ? ' · now in
291
291
  const issueLine = (issue) => (issue ? `\n ⚠ ${issue} Tell the user.` : '')
292
292
 
293
293
  // --- Server ------------------------------------------------------------------
294
- const server = new McpServer({ name: 'plm-upload', version: '1.6.0' })
294
+ const server = new McpServer({ name: 'plm-upload', version: '1.7.0' })
295
295
 
296
296
  server.registerTool(
297
297
  'upload_files',
@@ -483,6 +483,33 @@ server.registerTool(
483
483
  },
484
484
  )
485
485
 
486
+ server.registerTool(
487
+ 'approve_legacy',
488
+ {
489
+ title: 'Approve a legacy part with no tick (Lucas and Benjamin only)',
490
+ description:
491
+ 'Approves a released PLM part that was never approved through the PLM (no tick beside its SKU) as a legacy ' +
492
+ 'item, the same as its part page buttons. Leave `backlog_reason` out to approve normally (green tick, History ' +
493
+ 'says approved normally, legacy item); give it to approve with backlog review (tick with ?, the part joins the ' +
494
+ 'Overview backlog with that reason until a backlog review is approved). Refused for a staging, obsolete or ' +
495
+ 'already approved part, or one with a promotion waiting. Confirm with the user before calling. Only Lucas and ' +
496
+ 'Benjamin may call it; the PLM refuses everyone else.',
497
+ inputSchema: {
498
+ sku: z.string().min(1).describe('The released SKU, e.g. MNT-1234-A0.'),
499
+ backlog_reason: z.string().optional().describe('What it still needs (IQC report, tech docs…): approves with backlog review.'),
500
+ },
501
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },
502
+ },
503
+ async ({ sku, backlog_reason }) => {
504
+ try {
505
+ const r = await edgeJson({ action: 'approve-legacy', sku, ...(backlog_reason?.trim() ? { reason: backlog_reason.trim() } : {}) })
506
+ return { content: [{ type: 'text', text: `✓ ${r.sku} approved ${r.approval} (legacy item)` }], structuredContent: r }
507
+ } catch (e) {
508
+ return refusedReply(e)
509
+ }
510
+ },
511
+ )
512
+
486
513
  server.registerTool(
487
514
  'uprev_component',
488
515
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plm-upload-mcp",
3
- "version": "1.6.0",
3
+ "version": "1.7.0",
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"],