@testomatio/mcp 1.0.4 → 1.0.5

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 (3) hide show
  1. package/README.md +73 -5
  2. package/index.js +54 -14
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -112,19 +112,80 @@ Then add this to your Cursor MCP settings:
112
112
  #### Tests
113
113
  * `get_tests` – Get all tests (params: `plan`, `query`, `state`, `suite_id`, `tag`, `labels`) — api: GET `/tests`
114
114
  * `search_tests` – Search tests (params: `query`, `tql`, `labels`, `state`, `priority`, `filter`, `page`) — api: GET `/tests`
115
- * `create_test` – Create a new test (params: `suite_id`, `title`, `description`, `code`, `file`, `state`, `tags`, `jira_issues`, `assigned_to`, `labels_ids`) — api: POST `/tests`
116
- * `update_test` – Update an existing test (params: `test_id`, `suite_id`, `title`, `description`, `code`, `file`, `state`, `tags`, `jira_issues`, `assigned_to`, `labels_ids`) — api: PUT `/tests/{test_id}`
115
+ * `create_test` – Create a new test (params: `suite_id`, `title`, `description`, `code`, `file`, `state`, `tags`, `jira_issues`, `assigned_to`, `labels_ids`, `fields`) — api: POST `/tests`
116
+ * `update_test` – Update an existing test (params: `test_id`, `suite_id`, `title`, `description`, `code`, `file`, `state`, `tags`, `jira_issues`, `assigned_to`, `labels_ids`, `fields`) — api: PUT `/tests/{test_id}`
117
117
 
118
118
  #### Test Suites
119
119
  * `search_suites` – Search suites (params: `query`, `labels`, `state`, `priority`, `page`) — api: GET `/suites`
120
120
  * `get_root_suites` – List root-level suites (no params) — api: GET `/suites`
121
121
  * `get_suite` – Get one suite (params: `suite_id`) — api: GET `/suites/{suite_id}`
122
- * `create_suite` – Create a new suite (params: `title`, `description`, `parent_id`) — api: POST `/suites`
123
- * `create_folder` – Create a new folder (params: `title`, `description`, `parent_id`) — api: POST `/suites`
122
+ * `create_suite` – Create a new suite (params: `title`, `description`, `parent_id`, `fields`) — api: POST `/suites`
123
+ * `create_folder` – Create a new folder (params: `title`, `description`, `parent_id`, `fields`) — api: POST `/suites`
124
124
 
125
125
  #### Labels
126
126
  * `create_label` – Create a new label with optional custom field (params: `title`, `color`, `scope`, `visibility`, `field`) — api: POST `/labels`
127
127
 
128
+ ### Custom Fields and Labels
129
+
130
+ The MCP server provides two distinct ways to assign values to tests, suites, and folders:
131
+
132
+ #### 1. Using `labels_ids` with label:value syntax
133
+ ```javascript
134
+ {
135
+ "labels_ids": ["priority:high", "severity:critical", "type:regression"]
136
+ }
137
+ ```
138
+ - Direct label assignment with values using `label:value` format
139
+ - Good for simple label assignments
140
+ - Works with existing Testomatio labels
141
+
142
+ #### 2. Using `fields` parameter (structured custom fields)
143
+ ```javascript
144
+ {
145
+ "fields": {
146
+ "priority": "high",
147
+ "severity": "critical",
148
+ "risk_score": "8.5",
149
+ "team": "backend"
150
+ }
151
+ }
152
+ ```
153
+ - Structured way to set custom fields
154
+ - Cleaner syntax for AI assistants
155
+ - Supports any custom field defined in your Testomatio project
156
+ - Maps to Testomatio's custom-fields API
157
+
158
+ **Available for:**
159
+ - `create_test` and `update_test` - Test custom fields
160
+ - `create_suite` - Suite custom fields
161
+ - `create_folder` - Folder custom fields
162
+
163
+ #### Example Usage
164
+ ```javascript
165
+ // Create a test with custom fields
166
+ {
167
+ "tool": "create_test",
168
+ "arguments": {
169
+ "suite_id": "123",
170
+ "title": "Login Test",
171
+ "fields": {
172
+ "priority": "high",
173
+ "severity": "critical",
174
+ "team": "backend"
175
+ }
176
+ }
177
+ }
178
+
179
+ // Update a test with label:value syntax
180
+ {
181
+ "tool": "update_test",
182
+ "arguments": {
183
+ "test_id": "456",
184
+ "labels_ids": ["priority:high", "severity:critical"]
185
+ }
186
+ }
187
+ ```
188
+
128
189
  #### Test Runs
129
190
  * `get_runs` – List all runs (no params) — api: GET `/runs`
130
191
  * `get_run` – Get one run (params: `run_id`, `tree`) — api: GET `/runs/{run_id}`
@@ -146,8 +207,11 @@ Once configured, you can ask your AI assistant questions like:
146
207
  - "Get all test plans for this project"
147
208
  - "Create a new test called 'Login validation' in suite suite-123"
148
209
  - "Update test test-456 to change its description and add @regression tag"
210
+ - "Create a test with custom fields: priority='high', severity='critical', team='backend'"
211
+ - "Update test test-789 to set custom fields for risk score and assigned team"
149
212
  - "Create a new suite called 'Authentication Tests' with description 'All login and signup related tests'"
150
- - "Create a folder called 'API Tests' to organize API-related test suites"
213
+ - "Create a suite with custom fields for team ownership and priority level"
214
+ - "Create a folder called 'API Tests' to organize API-related test suites with custom fields"
151
215
  - "Create a label called 'Severity' with color '#ffe9ad' and predefined values like 'Blocker', 'Critical', 'Major', 'Minor', 'Normal', 'Trivial'"
152
216
 
153
217
  ## Query Patterns
@@ -168,6 +232,8 @@ These queries allow creating and updating tests:
168
232
  - **"Create a new test called 'Login validation' in suite suite-123"** → `create_test` tool with `title: "Login validation"`, `suite_id: "suite-123"`
169
233
  - **"Update test test-456 to change its description"** → `update_test` tool with `test_id: "test-456"`, `description: "new description"`
170
234
  - **"Create an automated test with @smoke tag"** → `create_test` tool with `state: "automated"`, `tags: ["smoke"]`
235
+ - **"Create a test with custom fields: priority='high', severity='critical'"** → `create_test` tool with `title: "Test Title"`, `suite_id: "suite-123"`, `fields: { "priority": "high", "severity": "critical" }`
236
+ - **"Update test test-789 to set custom fields for risk score and team"** → `update_test` tool with `test_id: "test-789"`, `fields: { "risk_score": "8.5", "team": "backend" }`
171
237
 
172
238
  ### Suite and Folder Management Queries
173
239
 
@@ -175,7 +241,9 @@ These queries help organize your test structure:
175
241
 
176
242
  - **"Create a new suite called 'Authentication Tests'"** → `create_suite` tool with `title: "Authentication Tests"`
177
243
  - **"Create a suite for login tests with description"** → `create_suite` tool with `title: "Login Tests"`, `description: "All login related test cases"`
244
+ - **"Create a suite with custom fields for team ownership and priority level"** → `create_suite` tool with `title: "Backend Tests"`, `fields: { "team": "backend", "priority": "high" }`
178
245
  - **"Create a folder called 'API Tests' under parent suite-123"** → `create_folder` tool with `title: "API Tests"`, `parent_id: "suite-123"`
246
+ - **"Create a folder with custom fields for team and project"** → `create_folder` tool with `title: "Integration Tests"`, `fields: { "team": "qa", "project": "mobile-app" }`
179
247
  - **"Create a test suite for payment features"** → `create_suite` tool with `title: "Payment Features", description: "Tests covering payment processing"`
180
248
  - **"Create a folder to organize integration tests"** → `create_folder` tool with `title: "Integration Tests"`
181
249
 
package/index.js CHANGED
@@ -318,7 +318,14 @@ class TestomatioMCPServer {
318
318
  labels_ids: {
319
319
  type: 'array',
320
320
  items: { type: 'string' },
321
- description: 'Slugs of labels to assign to the test',
321
+ description: 'Slugs of labels to assign to the test. Supports label:value format (e.g., ["priority:high", "severity:critical"])',
322
+ },
323
+ fields: {
324
+ type: 'object',
325
+ description: 'Set custom fields for the test. Object with field names as keys and values as properties (e.g., {"priority": "high", "severity": "critical"})',
326
+ additionalProperties: {
327
+ type: 'string'
328
+ },
322
329
  },
323
330
  },
324
331
  required: ['suite_id', 'title'],
@@ -381,7 +388,14 @@ class TestomatioMCPServer {
381
388
  labels_ids: {
382
389
  type: 'array',
383
390
  items: { type: 'string' },
384
- description: 'Slugs of labels to assign to the test',
391
+ description: 'Slugs of labels to assign to the test. Supports label:value format (e.g., ["priority:high", "severity:critical"])',
392
+ },
393
+ fields: {
394
+ type: 'object',
395
+ description: 'Set custom fields for the test. Object with field names as keys and values as properties (e.g., {"priority": "high", "severity": "critical"})',
396
+ additionalProperties: {
397
+ type: 'string'
398
+ },
385
399
  },
386
400
  },
387
401
  required: ['test_id'],
@@ -405,6 +419,13 @@ class TestomatioMCPServer {
405
419
  type: 'string',
406
420
  description: 'Parent suite ID to create this suite under',
407
421
  },
422
+ fields: {
423
+ type: 'object',
424
+ description: 'Set custom fields for the suite. Object with field names as keys and values as properties (e.g., {"priority": "high", "team": "backend"})',
425
+ additionalProperties: {
426
+ type: 'string'
427
+ },
428
+ },
408
429
  },
409
430
  required: ['title'],
410
431
  },
@@ -427,6 +448,13 @@ class TestomatioMCPServer {
427
448
  type: 'string',
428
449
  description: 'Parent folder or suite ID to create this folder under',
429
450
  },
451
+ fields: {
452
+ type: 'object',
453
+ description: 'Set custom fields for the folder. Object with field names as keys and values as properties (e.g., {"priority": "high", "team": "backend"})',
454
+ additionalProperties: {
455
+ type: 'string'
456
+ },
457
+ },
430
458
  },
431
459
  required: ['title'],
432
460
  },
@@ -1022,14 +1050,19 @@ class TestomatioMCPServer {
1022
1050
  }
1023
1051
 
1024
1052
  async createTest(args) {
1025
- const { suite_id, labels_ids, ...attributes } = args;
1053
+ const { suite_id, labels_ids, fields, ...attributes } = args;
1054
+
1055
+ // Handle fields parameter for custom fields
1026
1056
  const requestData = {
1027
1057
  data: {
1028
1058
  type: 'tests',
1029
- attributes: Object.fromEntries(Object.entries(attributes).map(([k, v]) => [k.replace(/_/g, '-'), v]))
1059
+ attributes: {
1060
+ ...Object.fromEntries(Object.entries(attributes).map(([k, v]) => [k.replace(/_/g, '-'), v])),
1061
+ ...(fields && { 'custom-fields': fields })
1062
+ }
1030
1063
  }
1031
1064
  };
1032
-
1065
+
1033
1066
  if (suite_id) {
1034
1067
  requestData.data.relationships = {
1035
1068
  suite: {
@@ -1040,7 +1073,7 @@ class TestomatioMCPServer {
1040
1073
  }
1041
1074
  };
1042
1075
  }
1043
-
1076
+
1044
1077
  if (labels_ids) requestData.labels_ids = labels_ids;
1045
1078
 
1046
1079
  const data = await this.makePostRequest('/tests', requestData);
@@ -1060,14 +1093,19 @@ class TestomatioMCPServer {
1060
1093
  }
1061
1094
 
1062
1095
  async updateTest(args) {
1063
- const { test_id, suite_id, labels_ids, ...attributes } = args;
1096
+ const { test_id, suite_id, labels_ids, fields, ...attributes } = args;
1097
+
1098
+ // Handle fields parameter for custom fields
1064
1099
  const requestData = {
1065
1100
  data: {
1066
1101
  type: 'tests',
1067
- attributes: Object.fromEntries(Object.entries(attributes).map(([k, v]) => [k.replace(/_/g, '-'), v]))
1102
+ attributes: {
1103
+ ...Object.fromEntries(Object.entries(attributes).map(([k, v]) => [k.replace(/_/g, '-'), v])),
1104
+ ...(fields && { 'custom-fields': fields })
1105
+ }
1068
1106
  }
1069
1107
  };
1070
-
1108
+
1071
1109
  if (suite_id) {
1072
1110
  requestData.data.relationships = {
1073
1111
  suite: {
@@ -1078,7 +1116,7 @@ class TestomatioMCPServer {
1078
1116
  }
1079
1117
  };
1080
1118
  }
1081
-
1119
+
1082
1120
  if (labels_ids) requestData.labels_ids = labels_ids;
1083
1121
 
1084
1122
  const data = await this.makePutRequest(`/tests/${test_id}`, requestData);
@@ -1098,13 +1136,14 @@ class TestomatioMCPServer {
1098
1136
  }
1099
1137
 
1100
1138
  async createSuite(args) {
1101
- const { parent_id, ...attributes } = args;
1139
+ const { parent_id, fields, ...attributes } = args;
1102
1140
  const requestData = {
1103
1141
  data: {
1104
1142
  type: 'suites',
1105
1143
  attributes: {
1106
1144
  ...Object.fromEntries(Object.entries(attributes).map(([k, v]) => [k.replace(/_/g, '-'), v])),
1107
- 'file-type': 'file'
1145
+ 'file-type': 'file',
1146
+ ...(fields && { 'custom-fields': fields })
1108
1147
  }
1109
1148
  }
1110
1149
  };
@@ -1136,13 +1175,14 @@ class TestomatioMCPServer {
1136
1175
  }
1137
1176
 
1138
1177
  async createFolder(args) {
1139
- const { parent_id, ...attributes } = args;
1178
+ const { parent_id, fields, ...attributes } = args;
1140
1179
  const requestData = {
1141
1180
  data: {
1142
1181
  type: 'suites',
1143
1182
  attributes: {
1144
1183
  ...Object.fromEntries(Object.entries(attributes).map(([k, v]) => [k.replace(/_/g, '-'), v])),
1145
- 'file-type': 'folder'
1184
+ 'file-type': 'folder',
1185
+ ...(fields && { 'custom-fields': fields })
1146
1186
  }
1147
1187
  }
1148
1188
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testomatio/mcp",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Model Context Protocol server for Testomatio API",
5
5
  "main": "index.js",
6
6
  "bin": {