fmea-api-mcp-server 1.1.35 → 1.1.37

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/dist/index.js CHANGED
@@ -28,7 +28,7 @@ class ApiDocsServer {
28
28
  constructor() {
29
29
  this.server = new Server({
30
30
  name: "api-docs-mcp",
31
- version: "1.1.35",
31
+ version: "1.1.37",
32
32
  }, {
33
33
  capabilities: {
34
34
  resources: {},
package/dist/intents.js CHANGED
@@ -32,3 +32,15 @@ export const ACTION_PRIORITY = [
32
32
  'delete',
33
33
  'list',
34
34
  ];
35
+ /**
36
+ * Checks if a keyword appears as a whole word in the query.
37
+ * Prevents false positives like "add" matching "additional".
38
+ */
39
+ export function matchesKeyword(query, keyword) {
40
+ if (keyword.includes(' ')) {
41
+ // Multi-word keywords: use simple includes (already specific enough)
42
+ return query.includes(keyword);
43
+ }
44
+ const regex = new RegExp(`\\b${keyword}\\b`);
45
+ return regex.test(query);
46
+ }
@@ -1,4 +1,4 @@
1
- import { ACTION_KEYWORDS, ACTION_PRIORITY } from '../../intents.js';
1
+ import { ACTION_KEYWORDS, ACTION_PRIORITY, matchesKeyword } from '../../intents.js';
2
2
  import { RESOURCE_ALIASES } from '../../synonyms.js';
3
3
  export class IntentDetector {
4
4
  detect(query) {
@@ -7,7 +7,7 @@ export class IntentDetector {
7
7
  let action = undefined;
8
8
  for (const actionType of ACTION_PRIORITY) {
9
9
  const keywords = ACTION_KEYWORDS[actionType];
10
- if (keywords.some(k => lower.includes(k))) {
10
+ if (keywords.some(k => matchesKeyword(lower, k))) {
11
11
  action = actionType;
12
12
  break;
13
13
  }
@@ -5,7 +5,7 @@ import { paginateResults, DEFAULT_PAGE_SIZE } from '../../utils/search-helper.js
5
5
  import { endpointSchema } from './schema.js';
6
6
  import { RESOURCE_ALIASES } from '../../synonyms.js';
7
7
  import { getSynonyms } from '../../synonyms.js';
8
- import { ACTION_KEYWORDS, ACTION_PRIORITY } from '../../intents.js';
8
+ import { ACTION_KEYWORDS, ACTION_PRIORITY, matchesKeyword } from '../../intents.js';
9
9
  import { ScoreCalculator } from '../../utils/ScoreCalculator.js';
10
10
  export class OramaSearchService {
11
11
  indexPath;
@@ -424,7 +424,7 @@ export class OramaSearchService {
424
424
  let action = undefined;
425
425
  for (const actionType of ACTION_PRIORITY) {
426
426
  const keywords = ACTION_KEYWORDS[actionType];
427
- if (keywords.some(k => lower.includes(k))) {
427
+ if (keywords.some(k => matchesKeyword(lower, k))) {
428
428
  action = actionType;
429
429
  break;
430
430
  }
package/dist/synonyms.js CHANGED
@@ -50,12 +50,13 @@ export const RESOURCE_ALIASES = {
50
50
  'search-failure-mode': ['global failure mode', 'search failure mode', 'failure mode search', 'global search failure', 'cross-project failure mode'], // [R25] Global failure mode search
51
51
  'dashboard': ['dashboard', 'dashboard summary', 'my projects summary', 'projects overview', 'action items', 'overdue', 'rpn distribution', 'project status'], // [R25] [R29] Dashboard summary resource
52
52
  'evaluation': ['evaluation', 'evaluation criteria', 'assessment', 'rating criteria', 'grading'], // [R27] Evaluation criteria resource — removed 'scoring criteria' (now dedicated resource [R30])
53
- 'significance-criteria': ['significance criteria', 'significance', 'sod threshold', 'rpn threshold', 'severity occurrence detection', 'sod criteria'], // [R27] Significance criteria sub-resource
53
+ 'significance-criteria': ['significance criteria', 'significance', 'sod threshold', 'rpn threshold', 'severity occurrence detection', 'sod criteria', 'sod', 'rpn', 'sod rpn'], // [R27] [R33] Added SOD/RPN shorthand
54
54
  'classification': ['classification', 'classification group', 'classification item', 'symbol', 'label group', 'risk classification', 'project classification'], // [R28] [R29] Classification groups and items
55
55
  'fm-checkpoint': ['fm checkpoint', 'failure mode checkpoint', 'checkpoint', 'checklist', 'check item'], // [R30] FM Checkpoint tree management
56
56
  'scoring-criteria': ['scoring criteria', 'scoring', 'score criteria', 'completeness scoring', 'scoring tree'], // [R30] Scoring criteria tree management
57
57
  'process-symbol': ['process symbol', 'process symbols', 'flow chart symbol', 'flowchart symbol', 'process flow'], // [R30] Process flow chart symbols
58
58
  'additional-info': ['additional info', 'additional information', 'extra info', 'supplementary info', 'custom field', 'custom attribute', 'form field'], // [R31] Additional info template management
59
+ 'notice': ['notice', 'notices', 'announcement', 'bulletin', 'notification'], // [R32] Notice CRUD and visibility
59
60
  };
60
61
  export const SYNONYM_GROUPS = {
61
62
  // Read / Retrieve
@@ -151,6 +152,7 @@ export const SYNONYM_GROUPS = {
151
152
  "display": ["visibility", "show", "hide", "toggle", "visible"],
152
153
  "default": ["preset", "standard", "baseline", "initial"],
153
154
  "refresh": ["reload", "update", "recalculate", "regenerate", "sync"],
155
+ "regenerate": ["refresh", "renew", "rotate", "reissue"], // [R33] Distinguish from "create"
154
156
  "snapshot": ["cache", "refresh", "summary", "data snapshot"],
155
157
  // [R28] Classification Domain
156
158
  "classification": ["category", "label", "symbol", "group", "class", "tag"],
@@ -25,6 +25,8 @@ export class ScoreCalculator {
25
25
  'auth': ['oauth'],
26
26
  'context-version': ['system'],
27
27
  'system': ['context-version'],
28
+ 'evaluation': ['significance-criteria'], // [R33]
29
+ 'significance-criteria': ['evaluation'], // [R33]
28
30
  'join-request': ['project', 'user', 'member'],
29
31
  'admin-user': ['user'], // [R19]
30
32
  'user': ['admin-user'] // [R19]
@@ -264,7 +264,7 @@
264
264
  {
265
265
  "path": "/api/v2/projects/{projectId}/documents/{documentId}",
266
266
  "method": "DELETE",
267
- "operationId": "delete_5",
267
+ "operationId": "delete_6",
268
268
  "summary": "Delete document",
269
269
  "description": "Permanently removes a document from the project using its unique identifier (Remove / Erase document). This operation deletes the document record and disassociates it from the project. Use with caution as this action cannot be undone. Requires project member role with NORMAL user level permissions. Ensure you have the correct document ID before initiating deletion to avoid accidental data loss.",
270
270
  "tags": [],
@@ -348,7 +348,7 @@
348
348
  {
349
349
  "path": "/api/v2/projects/{projectId}/documents",
350
350
  "method": "GET",
351
- "operationId": "list_11",
351
+ "operationId": "list_12",
352
352
  "summary": "List all Documents",
353
353
  "description": "Retrieves a comprehensive list of all documents associated with a specific project (Get all files / Fetch project documents / Query document library). Use this endpoint when you need to view, browse, or display the complete collection of documents within a project, including all categories and types. The response includes document metadata such as names, categories, paths, and timestamps, enabling users to navigate and manage the project document repository effectively.",
354
354
  "tags": [],