@dpesch/mantisbt-mcp-server 1.14.1 → 1.16.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.
- package/CHANGELOG.md +64 -0
- package/README.de.md +123 -33
- package/README.md +123 -33
- package/dist/client.js +4 -0
- package/dist/coerce.js +8 -0
- package/dist/config.js +5 -2
- package/dist/deprecation.js +9 -0
- package/dist/index.js +20 -31
- package/dist/issue-enrich.js +23 -0
- package/dist/issue-envelope.js +4 -0
- package/dist/prompts/index.js +4 -4
- package/dist/resources/index.js +4 -8
- package/dist/search/embedder.js +83 -34
- package/dist/search/index.js +9 -7
- package/dist/search/lexical.js +88 -0
- package/dist/search/store.js +44 -3
- package/dist/search/sync.js +26 -15
- package/dist/search/tools.js +23 -22
- package/dist/tools/config.js +9 -4
- package/dist/tools/files.js +12 -5
- package/dist/tools/index.js +34 -0
- package/dist/tools/issues.js +285 -147
- package/dist/tools/metadata.js +99 -40
- package/dist/tools/monitors.js +145 -20
- package/dist/tools/notes.js +67 -9
- package/dist/tools/project-versions.js +40 -18
- package/dist/tools/projects.js +109 -37
- package/dist/tools/users.js +3 -1
- package/dist/tools/version.js +61 -35
- package/dist/toolsets.js +104 -0
- package/docs/cookbook.de.md +604 -183
- package/docs/cookbook.md +604 -183
- package/docs/examples.de.md +37 -3
- package/docs/examples.md +37 -3
- package/package.json +3 -1
- package/server.json +2 -2
package/docs/cookbook.md
CHANGED
|
@@ -6,10 +6,10 @@ Tool-oriented recipes for the MantisBT MCP server — each recipe shows exactly
|
|
|
6
6
|
|
|
7
7
|
- [Connection setup](#connection-setup)
|
|
8
8
|
- [Connect to an installation without URL rewriting](#connect-to-an-installation-without-url-rewriting)
|
|
9
|
+
- [Offer only some tool groups](#offer-only-some-tool-groups)
|
|
9
10
|
- [Discovering your instance](#discovering-your-instance)
|
|
10
11
|
- [Get all projects](#get-all-projects)
|
|
11
|
-
- [
|
|
12
|
-
- [Discover valid field names for `select`](#discover-valid-field-names-for-select)
|
|
12
|
+
- [Valid select fields and enum values](#valid-select-fields-and-enum-values)
|
|
13
13
|
- [Issues](#issues)
|
|
14
14
|
- [Fetch a single issue](#fetch-a-single-issue)
|
|
15
15
|
- [Fetch multiple issues in one call](#fetch-multiple-issues-in-one-call)
|
|
@@ -18,6 +18,7 @@ Tool-oriented recipes for the MantisBT MCP server — each recipe shows exactly
|
|
|
18
18
|
- [Filter by status](#filter-by-status)
|
|
19
19
|
- [Filter by assignee or reporter](#filter-by-assignee-or-reporter)
|
|
20
20
|
- [Apply a saved filter](#apply-a-saved-filter)
|
|
21
|
+
- [Count issues per status, handler, priority or category](#count-issues-per-status-handler-priority-or-category)
|
|
21
22
|
- [Create an issue](#create-an-issue)
|
|
22
23
|
- [Close an issue (status + resolution)](#close-an-issue-status--resolution)
|
|
23
24
|
- [Resolve an issue with a reason note (single call)](#resolve-an-issue-with-a-reason-note-single-call)
|
|
@@ -25,9 +26,11 @@ Tool-oriented recipes for the MantisBT MCP server — each recipe shows exactly
|
|
|
25
26
|
- [Reassign an issue](#reassign-an-issue)
|
|
26
27
|
- [Set fix version](#set-fix-version)
|
|
27
28
|
- [Notes](#notes)
|
|
29
|
+
- [Get notes for an issue](#get-notes-for-an-issue)
|
|
28
30
|
- [Add a public note](#add-a-public-note)
|
|
29
31
|
- [Add a private note](#add-a-private-note)
|
|
30
32
|
- [Delete a note](#delete-a-note)
|
|
33
|
+
- [Edit a note](#edit-a-note)
|
|
31
34
|
- [File Attachments](#file-attachments)
|
|
32
35
|
- [Upload a local file](#upload-a-local-file)
|
|
33
36
|
- [Upload file content (base64)](#upload-file-content-base64)
|
|
@@ -41,8 +44,9 @@ Tool-oriented recipes for the MantisBT MCP server — each recipe shows exactly
|
|
|
41
44
|
- [Attach tags by name](#attach-tags-by-name)
|
|
42
45
|
- [Detach a tag](#detach-a-tag)
|
|
43
46
|
- [Monitors (Watchers)](#monitors-watchers)
|
|
44
|
-
- [
|
|
45
|
-
- [
|
|
47
|
+
- [Change watchers via update_issue](#change-watchers-via-update_issue)
|
|
48
|
+
- [Add a watcher (deprecated)](#add-a-watcher-deprecated)
|
|
49
|
+
- [Remove a watcher (deprecated)](#remove-a-watcher-deprecated)
|
|
46
50
|
- [Semantic Search](#semantic-search)
|
|
47
51
|
- [Build the initial index](#build-the-initial-index)
|
|
48
52
|
- [Incremental index update](#incremental-index-update)
|
|
@@ -50,18 +54,19 @@ Tool-oriented recipes for the MantisBT MCP server — each recipe shows exactly
|
|
|
50
54
|
- [Search by meaning](#search-by-meaning)
|
|
51
55
|
- [Search with field enrichment](#search-with-field-enrichment)
|
|
52
56
|
- [Projects & Categories](#projects--categories)
|
|
57
|
+
- [Get a project with categories, users and versions](#get-a-project-with-categories-users-and-versions)
|
|
53
58
|
- [List project categories](#list-project-categories)
|
|
54
59
|
- [Find a project member](#find-a-project-member)
|
|
55
60
|
- [Create a project version](#create-a-project-version)
|
|
56
61
|
- [Update a project version](#update-a-project-version)
|
|
57
|
-
- [Release a version and create the next bugfix placeholder](#release-a-version-and-create-the-next-bugfix-placeholder)
|
|
62
|
+
- [Release a version and create the next bugfix placeholder (deprecated)](#release-a-version-and-create-the-next-bugfix-placeholder-deprecated)
|
|
58
63
|
- [Delete a project version](#delete-a-project-version)
|
|
59
64
|
- [Metadata](#metadata)
|
|
60
65
|
- [Get a metadata summary](#get-a-metadata-summary)
|
|
66
|
+
- [Refresh the metadata cache](#refresh-the-metadata-cache)
|
|
61
67
|
- [Get the full metadata cache](#get-the-full-metadata-cache)
|
|
62
68
|
- [Version & Diagnostics](#version--diagnostics)
|
|
63
|
-
- [Get MCP server
|
|
64
|
-
- [Get MantisBT version](#get-mantis-version)
|
|
69
|
+
- [Get versions (MCP server and MantisBT)](#get-versions-mcp-server-and-mantisbt)
|
|
65
70
|
- [Get the current user](#get-the-current-user)
|
|
66
71
|
- [Resources](#resources)
|
|
67
72
|
- [Read the current user profile](#read-the-current-user-profile)
|
|
@@ -109,42 +114,52 @@ Some MantisBT installations serve the REST API only through its front controller
|
|
|
109
114
|
|
|
110
115
|
When `MANTIS_BASE_URL` ends with `/api/rest/index.php`, index.php routing is enabled automatically. An explicitly set `MANTIS_USE_INDEX_PHP` always wins over the detection — setting it to `false` alongside such a URL forces plain `/api/rest/` routing and logs a warning on stderr.
|
|
111
116
|
|
|
112
|
-
**Verify:** call `
|
|
117
|
+
**Verify:** call `get_version`. A successful response means the routing is correct.
|
|
113
118
|
|
|
114
119
|
---
|
|
115
120
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
### Get all projects
|
|
121
|
+
### Offer only some tool groups
|
|
119
122
|
|
|
120
|
-
|
|
123
|
+
By default all 41 tools are active (search off). Restrict them with `MANTIS_TOOLSETS` to keep the model's context shorter and load only what is needed for the task. Use `MANTIS_DISABLE_DESTRUCTIVE=true` to hide every destructive tool regardless of the active groups.
|
|
121
124
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
**Parameters:** _(none)_
|
|
125
|
+
Valid group names: `issues`, `notes`, `links`, `files`, `projects`, `versions`, `meta`, `search`. An unknown name stops the server at startup with a message listing the valid ones. Deprecated tools always belong to the same group as their replacement. For the complete group-to-tool mapping see [Limit the offered tools in the README](../README.md#limit-the-offered-tools).
|
|
125
126
|
|
|
126
|
-
**
|
|
127
|
+
**Example A — triage setup** (`issues`, `notes`, `meta`; no destructive operations):
|
|
127
128
|
|
|
128
129
|
```json
|
|
129
|
-
{
|
|
130
|
+
{
|
|
131
|
+
"env": {
|
|
132
|
+
"MANTIS_BASE_URL": "https://mantis.example.com",
|
|
133
|
+
"MANTIS_API_KEY": "your-api-token",
|
|
134
|
+
"MANTIS_TOOLSETS": "issues,notes,meta",
|
|
135
|
+
"MANTIS_DISABLE_DESTRUCTIVE": "true"
|
|
136
|
+
}
|
|
137
|
+
}
|
|
130
138
|
```
|
|
131
139
|
|
|
132
|
-
**
|
|
140
|
+
**Example B — all groups, delete-protection only** (36 of the 41 default tools):
|
|
133
141
|
|
|
134
142
|
```json
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
143
|
+
{
|
|
144
|
+
"env": {
|
|
145
|
+
"MANTIS_BASE_URL": "https://mantis.example.com",
|
|
146
|
+
"MANTIS_API_KEY": "your-api-token",
|
|
147
|
+
"MANTIS_DISABLE_DESTRUCTIVE": "true"
|
|
148
|
+
}
|
|
149
|
+
}
|
|
139
150
|
```
|
|
140
151
|
|
|
152
|
+
The `search` group additionally requires `MANTIS_SEARCH_ENABLED=true`. Without the `search` group in `MANTIS_TOOLSETS`, the search module — index, embedding model, background sync — is not started at all, even if `MANTIS_SEARCH_ENABLED=true` is set.
|
|
153
|
+
|
|
141
154
|
---
|
|
142
155
|
|
|
143
|
-
|
|
156
|
+
## Discovering your instance
|
|
144
157
|
|
|
145
|
-
|
|
158
|
+
### Get all projects
|
|
146
159
|
|
|
147
|
-
|
|
160
|
+
Returns the full list of projects accessible with your API key.
|
|
161
|
+
|
|
162
|
+
**Tool:** `list_projects`
|
|
148
163
|
|
|
149
164
|
**Parameters:** _(none)_
|
|
150
165
|
|
|
@@ -157,57 +172,27 @@ Returns the enum values configured on your specific MantisBT instance. Use this
|
|
|
157
172
|
**Response:**
|
|
158
173
|
|
|
159
174
|
```json
|
|
160
|
-
|
|
161
|
-
"
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
{ "id": 30, "name": "normal" },
|
|
165
|
-
{ "id": 40, "name": "high" },
|
|
166
|
-
{ "id": 50, "name": "urgent" },
|
|
167
|
-
{ "id": 60, "name": "immediate" }
|
|
168
|
-
],
|
|
169
|
-
"severities": [
|
|
170
|
-
{ "id": 10, "name": "feature" },
|
|
171
|
-
{ "id": 20, "name": "trivial" },
|
|
172
|
-
{ "id": 50, "name": "major" },
|
|
173
|
-
{ "id": 60, "name": "crash" }
|
|
174
|
-
// ...
|
|
175
|
-
],
|
|
176
|
-
"statuses": [
|
|
177
|
-
{ "id": 10, "name": "new" },
|
|
178
|
-
{ "id": 50, "name": "assigned" },
|
|
179
|
-
{ "id": 80, "name": "resolved" },
|
|
180
|
-
{ "id": 90, "name": "closed" }
|
|
181
|
-
// ...
|
|
182
|
-
],
|
|
183
|
-
"resolutions": [
|
|
184
|
-
{ "id": 10, "name": "open" },
|
|
185
|
-
{ "id": 20, "name": "fixed" },
|
|
186
|
-
{ "id": 60, "name": "duplicate" }
|
|
187
|
-
// ...
|
|
188
|
-
]
|
|
189
|
-
}
|
|
175
|
+
[
|
|
176
|
+
{ "id": 3, "name": "Webshop", "status": { "id": 10, "name": "development" }, "enabled": true },
|
|
177
|
+
{ "id": 5, "name": "Backend API", "status": { "id": 10, "name": "development" }, "enabled": true }
|
|
178
|
+
]
|
|
190
179
|
```
|
|
191
180
|
|
|
192
|
-
> **Note:** On localized installations, `get_issue_enums()` returns a `name` in the local language and an optional `canonical_name` with the English original. `create_issue` accepts **both** — pass either the canonical English name (e.g. `minor`) or the localized name (e.g. `Unschönheit`). The server resolves the value automatically.
|
|
193
|
-
|
|
194
181
|
---
|
|
195
182
|
|
|
196
|
-
###
|
|
183
|
+
### Valid select fields and enum values
|
|
197
184
|
|
|
198
|
-
Returns
|
|
185
|
+
Returns the valid `select` field names and the enum values (severity, status, priority, resolution, reproducibility) for this MantisBT server in one call. Use this before building a `select` string or before setting enum fields on `create_issue` / `update_issue`.
|
|
199
186
|
|
|
200
|
-
**Tool:** `
|
|
187
|
+
**Tool:** `get_issue_schema`
|
|
201
188
|
|
|
202
189
|
**Parameters:**
|
|
203
|
-
- `project_id` — _(optional)_ restrict
|
|
190
|
+
- `project_id` — _(optional)_ restrict the field discovery sample to a specific project
|
|
204
191
|
|
|
205
192
|
**Request:**
|
|
206
193
|
|
|
207
194
|
```json
|
|
208
|
-
{
|
|
209
|
-
"project_id": 3
|
|
210
|
-
}
|
|
195
|
+
{}
|
|
211
196
|
```
|
|
212
197
|
|
|
213
198
|
**Response:**
|
|
@@ -221,10 +206,46 @@ Returns all field names that can be passed to the `select` parameter of `list_is
|
|
|
221
206
|
"severity", "status", "summary", "tags", "target_version",
|
|
222
207
|
"updated_at", "version", "view_state"
|
|
223
208
|
],
|
|
224
|
-
"
|
|
209
|
+
"fields_source": "live",
|
|
210
|
+
"enums": {
|
|
211
|
+
"severity": [
|
|
212
|
+
{ "id": 10, "name": "feature" },
|
|
213
|
+
{ "id": 20, "name": "trivial" },
|
|
214
|
+
{ "id": 50, "name": "major" },
|
|
215
|
+
{ "id": 60, "name": "crash" }
|
|
216
|
+
],
|
|
217
|
+
"status": [
|
|
218
|
+
{ "id": 10, "name": "new" },
|
|
219
|
+
{ "id": 50, "name": "assigned" },
|
|
220
|
+
{ "id": 80, "name": "resolved" },
|
|
221
|
+
{ "id": 90, "name": "closed" }
|
|
222
|
+
],
|
|
223
|
+
"priority": [
|
|
224
|
+
{ "id": 10, "name": "none" },
|
|
225
|
+
{ "id": 20, "name": "low" },
|
|
226
|
+
{ "id": 30, "name": "normal" },
|
|
227
|
+
{ "id": 40, "name": "high" },
|
|
228
|
+
{ "id": 50, "name": "urgent" },
|
|
229
|
+
{ "id": 60, "name": "immediate" }
|
|
230
|
+
],
|
|
231
|
+
"resolution": [
|
|
232
|
+
{ "id": 10, "name": "open" },
|
|
233
|
+
{ "id": 20, "name": "fixed" },
|
|
234
|
+
{ "id": 60, "name": "duplicate" }
|
|
235
|
+
],
|
|
236
|
+
"reproducibility": [
|
|
237
|
+
{ "id": 10, "name": "always" },
|
|
238
|
+
{ "id": 30, "name": "sometimes" },
|
|
239
|
+
{ "id": 70, "name": "have not tried" }
|
|
240
|
+
]
|
|
241
|
+
}
|
|
225
242
|
}
|
|
226
243
|
```
|
|
227
244
|
|
|
245
|
+
`fields_source` is `"cache"`, `"live"`, or `"static"`. On localized installations each enum entry may include a `label` (localized) and a `canonical_name` (standard English). `create_issue` accepts both — pass the canonical English name (e.g. `minor`) or the localized name; the server resolves it automatically.
|
|
246
|
+
|
|
247
|
+
> **Deprecated:** `get_issue_fields` (fields only) and `get_issue_enums` (enums only) are superseded by `get_issue_schema` — they will be removed in 2.0.0. The resource `mantis://enums` stays.
|
|
248
|
+
|
|
228
249
|
---
|
|
229
250
|
|
|
230
251
|
## Issues
|
|
@@ -287,10 +308,11 @@ Compact variant (only the fields you need):
|
|
|
287
308
|
|
|
288
309
|
Fetches up to 50 issues in a single MCP call. Requests run in parallel (max 5 concurrent). Missing or inaccessible IDs return `null` at their position — the call never fails due to individual missing IDs.
|
|
289
310
|
|
|
290
|
-
**Tool:** `
|
|
311
|
+
**Tool:** `get_issue`
|
|
291
312
|
|
|
292
313
|
**Parameters:**
|
|
293
314
|
- `ids` — array of numeric issue IDs (1–50)
|
|
315
|
+
- `select` — _(optional)_ comma-separated field list
|
|
294
316
|
|
|
295
317
|
**Request:**
|
|
296
318
|
|
|
@@ -327,6 +349,8 @@ Fetches up to 50 issues in a single MCP call. Requests run in parallel (max 5 co
|
|
|
327
349
|
|
|
328
350
|
> **Note:** `null` entries indicate IDs that were not found or could not be accessed. Check `failed` to see how many IDs could not be retrieved.
|
|
329
351
|
|
|
352
|
+
> **Deprecated:** `get_issues` provides the same functionality but is deprecated — use `get_issue` with `ids` as shown above; `get_issues` will be removed in 2.0.0.
|
|
353
|
+
|
|
330
354
|
---
|
|
331
355
|
|
|
332
356
|
### List issues (paginated)
|
|
@@ -412,7 +436,7 @@ Pass a comma-separated list of field names to receive only the fields you need.
|
|
|
412
436
|
}
|
|
413
437
|
```
|
|
414
438
|
|
|
415
|
-
> **Note:** Use `
|
|
439
|
+
> **Note:** Use `get_issue_schema()` to see all available field names.
|
|
416
440
|
|
|
417
441
|
> **Note:** `view_url` is always present in all issue responses — it is injected by the MCP server and is not affected by the `select` parameter.
|
|
418
442
|
|
|
@@ -553,6 +577,71 @@ Use a pre-saved MantisBT filter by its ID. This is the recommended approach for
|
|
|
553
577
|
|
|
554
578
|
---
|
|
555
579
|
|
|
580
|
+
### Count issues per status, handler, priority or category
|
|
581
|
+
|
|
582
|
+
Returns the number of matching issues grouped by a single field instead of listing individual issues — far fewer tokens than reading all pages.
|
|
583
|
+
|
|
584
|
+
**Tool:** `list_issues`
|
|
585
|
+
|
|
586
|
+
**Parameters:**
|
|
587
|
+
- `project_id` — _(optional)_ numeric project ID
|
|
588
|
+
- `group_by` — `"status"`, `"handler"`, `"priority"`, or `"category"`
|
|
589
|
+
- `status`, `assigned_to`, `reporter_id`, date filters — _(optional)_ all filters still apply; `page`, `page_size`, and `select` are ignored
|
|
590
|
+
|
|
591
|
+
**Request:**
|
|
592
|
+
|
|
593
|
+
```json
|
|
594
|
+
{
|
|
595
|
+
"project_id": 3,
|
|
596
|
+
"group_by": "status"
|
|
597
|
+
}
|
|
598
|
+
```
|
|
599
|
+
|
|
600
|
+
**Response:**
|
|
601
|
+
|
|
602
|
+
```json
|
|
603
|
+
{
|
|
604
|
+
"group_by": "status",
|
|
605
|
+
"total": 604,
|
|
606
|
+
"groups": [
|
|
607
|
+
{ "id": 80, "name": "resolved", "label": "resolved", "count": 412 },
|
|
608
|
+
{ "id": 50, "name": "assigned", "label": "assigned", "count": 98 },
|
|
609
|
+
{ "id": 40, "name": "confirmed", "label": "confirmed", "count": 57 },
|
|
610
|
+
{ "id": 20, "name": "feedback", "label": "feedback", "count": 37 }
|
|
611
|
+
]
|
|
612
|
+
}
|
|
613
|
+
```
|
|
614
|
+
|
|
615
|
+
Groups are sorted by count descending, then by name ascending. The `label` field contains the localized display name and is omitted for groups that have no label (e.g. handler).
|
|
616
|
+
|
|
617
|
+
**Request (handler, open issues only):**
|
|
618
|
+
|
|
619
|
+
```json
|
|
620
|
+
{
|
|
621
|
+
"project_id": 3,
|
|
622
|
+
"group_by": "handler",
|
|
623
|
+
"status": "open"
|
|
624
|
+
}
|
|
625
|
+
```
|
|
626
|
+
|
|
627
|
+
**Response:**
|
|
628
|
+
|
|
629
|
+
```json
|
|
630
|
+
{
|
|
631
|
+
"group_by": "handler",
|
|
632
|
+
"total": 185,
|
|
633
|
+
"groups": [
|
|
634
|
+
{ "id": 7, "name": "jdoe", "count": 72 },
|
|
635
|
+
{ "id": 4, "name": "jsmith", "count": 68 },
|
|
636
|
+
{ "id": null, "name": "(unassigned)", "count": 45 }
|
|
637
|
+
]
|
|
638
|
+
}
|
|
639
|
+
```
|
|
640
|
+
|
|
641
|
+
> **Note:** The server scans all matching issues up to a limit of 50,000. If the limit is reached, the response contains `"truncated": true` and the counts are incomplete. This is a much larger scan than the 500-issue limit of client-side filters in `list_issues`.
|
|
642
|
+
|
|
643
|
+
---
|
|
644
|
+
|
|
556
645
|
### Create an issue
|
|
557
646
|
|
|
558
647
|
Creates a new issue in MantisBT.
|
|
@@ -564,8 +653,8 @@ Creates a new issue in MantisBT.
|
|
|
564
653
|
- `project_id` — numeric project ID
|
|
565
654
|
- `category` — category name string
|
|
566
655
|
- `description` — _(optional)_ detailed description
|
|
567
|
-
- `priority` — _(optional)_ priority: canonical English name (`none`, `low`, `normal`, `high`, `urgent`, `immediate`) or localized label. Default: `"normal"`. Use `
|
|
568
|
-
- `severity` — _(optional)_ severity: canonical English name (`feature`, `trivial`, `text`, `tweak`, `minor`, `major`, `crash`, `block`) or localized label. Default: `"minor"`. Use `
|
|
656
|
+
- `priority` — _(optional)_ priority: canonical English name (`none`, `low`, `normal`, `high`, `urgent`, `immediate`) or localized label. Default: `"normal"`. Use `get_issue_schema()` to see all available values.
|
|
657
|
+
- `severity` — _(optional)_ severity: canonical English name (`feature`, `trivial`, `text`, `tweak`, `minor`, `major`, `crash`, `block`) or localized label. Default: `"minor"`. Use `get_issue_schema()` to see all available values.
|
|
569
658
|
- `handler` — _(optional)_ assignee username (resolved to ID automatically)
|
|
570
659
|
- `handler_id` — _(optional)_ assignee numeric user ID (alternative to `handler`)
|
|
571
660
|
|
|
@@ -609,11 +698,11 @@ Creates a new issue in MantisBT.
|
|
|
609
698
|
|
|
610
699
|
**Error: unknown severity or priority**
|
|
611
700
|
|
|
612
|
-
The server first checks canonical English names, then falls back to a live
|
|
701
|
+
The server first checks canonical English names, then falls back to a live enum lookup. An error is only returned if the value matches neither:
|
|
613
702
|
|
|
614
|
-
> Error: Invalid severity "xyz". Valid canonical names: feature, trivial, text, tweak, minor, major, crash, block. Call
|
|
703
|
+
> Error: Invalid severity "xyz". Valid canonical names: feature, trivial, text, tweak, minor, major, crash, block. Call get_issue_schema to see localized labels.
|
|
615
704
|
|
|
616
|
-
Use `
|
|
705
|
+
Use `get_issue_schema` to discover all accepted values — both canonical and localized names work.
|
|
617
706
|
|
|
618
707
|
---
|
|
619
708
|
|
|
@@ -655,7 +744,7 @@ Resolves and closes an issue. Always set **both** `status` and `resolution` —
|
|
|
655
744
|
}
|
|
656
745
|
```
|
|
657
746
|
|
|
658
|
-
> **Note:** Resolution ID 20 is "fixed" in a default MantisBT installation. Use `
|
|
747
|
+
> **Note:** Resolution ID 20 is "fixed" in a default MantisBT installation. Use `get_issue_schema()` to confirm the correct ID for your instance.
|
|
659
748
|
|
|
660
749
|
---
|
|
661
750
|
|
|
@@ -710,7 +799,7 @@ Writes custom field values on create or update. The same `custom_fields` format
|
|
|
710
799
|
}
|
|
711
800
|
```
|
|
712
801
|
|
|
713
|
-
> **Note:** Only the listed custom fields are changed — others stay untouched. Use `
|
|
802
|
+
> **Note:** Only the listed custom fields are changed — others stay untouched. Use `get_issue_schema()` or `get_metadata()` to discover available custom fields per project. Values are always strings.
|
|
714
803
|
|
|
715
804
|
---
|
|
716
805
|
|
|
@@ -783,12 +872,54 @@ Sets the `fixed_in_version` field on an issue.
|
|
|
783
872
|
}
|
|
784
873
|
```
|
|
785
874
|
|
|
786
|
-
> **Note:** Use `
|
|
875
|
+
> **Note:** Use `get_project` with `include: ["versions"]` to list valid version names for a project.
|
|
787
876
|
|
|
788
877
|
---
|
|
789
878
|
|
|
790
879
|
## Notes
|
|
791
880
|
|
|
881
|
+
### Get notes for an issue
|
|
882
|
+
|
|
883
|
+
Retrieves only the notes of an issue using server-side field projection. This is the preferred alternative to the deprecated `list_notes` tool.
|
|
884
|
+
|
|
885
|
+
**Tool:** `get_issue`
|
|
886
|
+
|
|
887
|
+
**Parameters:**
|
|
888
|
+
- `id` — numeric issue ID
|
|
889
|
+
- `select` — `"id,notes"` (include `id` so `view_url` is always set even when the projection omits it)
|
|
890
|
+
|
|
891
|
+
**Request:**
|
|
892
|
+
|
|
893
|
+
```json
|
|
894
|
+
{
|
|
895
|
+
"id": 1042,
|
|
896
|
+
"select": "id,notes"
|
|
897
|
+
}
|
|
898
|
+
```
|
|
899
|
+
|
|
900
|
+
**Response:**
|
|
901
|
+
|
|
902
|
+
```json
|
|
903
|
+
{
|
|
904
|
+
"id": 1042,
|
|
905
|
+
"notes": [
|
|
906
|
+
{
|
|
907
|
+
"id": 88,
|
|
908
|
+
"reporter": { "id": 7, "name": "jdoe" },
|
|
909
|
+
"text": "Reproduced on version 2.0.3. Root cause identified in the auth middleware.",
|
|
910
|
+
"view_state": { "id": 10, "name": "public" },
|
|
911
|
+
"created_at": "2024-11-05T14:02:11+00:00",
|
|
912
|
+
"view_url": "https://mantis.example.com/view.php?id=1042#bugnote88"
|
|
913
|
+
}
|
|
914
|
+
],
|
|
915
|
+
"view_url": "https://mantis.example.com/view.php?id=1042"
|
|
916
|
+
}
|
|
917
|
+
```
|
|
918
|
+
|
|
919
|
+
> **Deprecated:** `list_notes` will be removed in 2.0.0 — use `get_issue` with `select: "id,notes"` as shown above.
|
|
920
|
+
|
|
921
|
+
---
|
|
922
|
+
|
|
792
923
|
### Add a public note
|
|
793
924
|
|
|
794
925
|
Adds a publicly visible note to an issue.
|
|
@@ -868,7 +999,7 @@ Permanently removes a note from an issue.
|
|
|
868
999
|
|
|
869
1000
|
**Parameters:**
|
|
870
1001
|
- `issue_id` — numeric issue ID
|
|
871
|
-
- `note_id` — numeric note ID (from `
|
|
1002
|
+
- `note_id` — numeric note ID (from `get_issue`)
|
|
872
1003
|
|
|
873
1004
|
**Request:**
|
|
874
1005
|
|
|
@@ -889,6 +1020,51 @@ Permanently removes a note from an issue.
|
|
|
889
1020
|
|
|
890
1021
|
---
|
|
891
1022
|
|
|
1023
|
+
### Edit a note
|
|
1024
|
+
|
|
1025
|
+
Edits the text and/or visibility of an existing note via `update_issue`. The note ID comes from `get_issue`. At least one of `text` or `view_state` must be given. Multiple notes can be edited in a single call.
|
|
1026
|
+
|
|
1027
|
+
**Tool:** `update_issue`
|
|
1028
|
+
|
|
1029
|
+
**Parameters:**
|
|
1030
|
+
- `id` — numeric issue ID
|
|
1031
|
+
- `fields.notes` — array of note edits: `{ id, text?, view_state? }`; omitting `view_state` keeps the note's current visibility
|
|
1032
|
+
|
|
1033
|
+
**Request:** _(text-only edit)_
|
|
1034
|
+
|
|
1035
|
+
```json
|
|
1036
|
+
{
|
|
1037
|
+
"id": 1042,
|
|
1038
|
+
"fields": {
|
|
1039
|
+
"notes": [
|
|
1040
|
+
{ "id": 88, "text": "Reproduced on version 2.0.4 — auth middleware is missing a null check." }
|
|
1041
|
+
]
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
```
|
|
1045
|
+
|
|
1046
|
+
**Response:**
|
|
1047
|
+
|
|
1048
|
+
```json
|
|
1049
|
+
{
|
|
1050
|
+
"id": 1042,
|
|
1051
|
+
"summary": "Login button unresponsive on mobile Safari",
|
|
1052
|
+
"notes": [
|
|
1053
|
+
{
|
|
1054
|
+
"id": 88,
|
|
1055
|
+
"text": "Reproduced on version 2.0.4 — auth middleware is missing a null check.",
|
|
1056
|
+
"view_state": { "id": 10, "name": "public" },
|
|
1057
|
+
"updated_at": "2024-11-06T12:00:00+00:00"
|
|
1058
|
+
}
|
|
1059
|
+
],
|
|
1060
|
+
"view_url": "https://mantis.example.com/view.php?id=1042"
|
|
1061
|
+
}
|
|
1062
|
+
```
|
|
1063
|
+
|
|
1064
|
+
> **Note:** Unknown note IDs are rejected before any write. If MantisBT did not apply an edit, the response contains `notes_error` with the details instead of failing the call — only when the note edit was the only requested change does the call return an error. To add a new note use the `note` parameter or `add_note`.
|
|
1065
|
+
|
|
1066
|
+
---
|
|
1067
|
+
|
|
892
1068
|
## File Attachments
|
|
893
1069
|
|
|
894
1070
|
### Upload a local file
|
|
@@ -969,36 +1145,45 @@ Attaches a file by passing its base64-encoded content directly. Use this **only*
|
|
|
969
1145
|
|
|
970
1146
|
### List attachments
|
|
971
1147
|
|
|
972
|
-
Returns all file attachments for an issue.
|
|
1148
|
+
Returns all file attachments for an issue using server-side field projection. Each attachment includes a `download_url` built from the MantisBT file download endpoint.
|
|
973
1149
|
|
|
974
|
-
**Tool:** `
|
|
1150
|
+
**Tool:** `get_issue`
|
|
975
1151
|
|
|
976
1152
|
**Parameters:**
|
|
977
|
-
- `
|
|
1153
|
+
- `id` — numeric issue ID
|
|
1154
|
+
- `select` — `"id,attachments"`
|
|
978
1155
|
|
|
979
1156
|
**Request:**
|
|
980
1157
|
|
|
981
1158
|
```json
|
|
982
1159
|
{
|
|
983
|
-
"
|
|
1160
|
+
"id": 1042,
|
|
1161
|
+
"select": "id,attachments"
|
|
984
1162
|
}
|
|
985
1163
|
```
|
|
986
1164
|
|
|
987
1165
|
**Response:**
|
|
988
1166
|
|
|
989
1167
|
```json
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1168
|
+
{
|
|
1169
|
+
"id": 1042,
|
|
1170
|
+
"attachments": [
|
|
1171
|
+
{
|
|
1172
|
+
"id": 23,
|
|
1173
|
+
"filename": "login-error.png",
|
|
1174
|
+
"size": 42318,
|
|
1175
|
+
"content_type": "image/png",
|
|
1176
|
+
"created_at": "2024-11-05T15:30:00+00:00",
|
|
1177
|
+
"reporter": { "id": 4, "name": "jsmith" },
|
|
1178
|
+
"download_url": "https://mantis.example.com/file_download.php?file_id=23&type=bug"
|
|
1179
|
+
}
|
|
1180
|
+
],
|
|
1181
|
+
"view_url": "https://mantis.example.com/view.php?id=1042"
|
|
1182
|
+
}
|
|
1000
1183
|
```
|
|
1001
1184
|
|
|
1185
|
+
> **Deprecated:** `list_issue_files` will be removed in 2.0.0 — use `get_issue` with `select: "id,attachments"` as shown above.
|
|
1186
|
+
|
|
1002
1187
|
---
|
|
1003
1188
|
|
|
1004
1189
|
## Relationships
|
|
@@ -1261,7 +1446,70 @@ Read `tags[].id` from the response.
|
|
|
1261
1446
|
|
|
1262
1447
|
## Monitors (Watchers)
|
|
1263
1448
|
|
|
1264
|
-
###
|
|
1449
|
+
### Change watchers via update_issue
|
|
1450
|
+
|
|
1451
|
+
Adds and/or removes watchers (monitors) of an issue in a single `update_issue` call. `fields` may be omitted — only `add_monitors`, `remove_monitors`, or both are required. Names are matched case-insensitively.
|
|
1452
|
+
|
|
1453
|
+
**Tool:** `update_issue`
|
|
1454
|
+
|
|
1455
|
+
**Parameters:**
|
|
1456
|
+
- `id` — numeric issue ID
|
|
1457
|
+
- `add_monitors` — _(optional)_ array of MantisBT login names to add as watchers
|
|
1458
|
+
- `remove_monitors` — _(optional)_ array of MantisBT login names to remove from watchers; names not currently watching are silently skipped
|
|
1459
|
+
- A user listed in both arrays is rejected.
|
|
1460
|
+
|
|
1461
|
+
**Request:** _(add one watcher)_
|
|
1462
|
+
|
|
1463
|
+
```json
|
|
1464
|
+
{
|
|
1465
|
+
"id": 1042,
|
|
1466
|
+
"add_monitors": ["jsmith"]
|
|
1467
|
+
}
|
|
1468
|
+
```
|
|
1469
|
+
|
|
1470
|
+
**Response:**
|
|
1471
|
+
|
|
1472
|
+
```json
|
|
1473
|
+
{
|
|
1474
|
+
"id": 1042,
|
|
1475
|
+
"view_url": "https://mantis.example.com/view.php?id=1042",
|
|
1476
|
+
"monitors": {
|
|
1477
|
+
"added": ["jsmith"],
|
|
1478
|
+
"current": ["asmith", "jsmith"]
|
|
1479
|
+
}
|
|
1480
|
+
}
|
|
1481
|
+
```
|
|
1482
|
+
|
|
1483
|
+
**Request:** _(remove one watcher)_
|
|
1484
|
+
|
|
1485
|
+
```json
|
|
1486
|
+
{
|
|
1487
|
+
"id": 1042,
|
|
1488
|
+
"remove_monitors": ["jsmith"]
|
|
1489
|
+
}
|
|
1490
|
+
```
|
|
1491
|
+
|
|
1492
|
+
**Response:**
|
|
1493
|
+
|
|
1494
|
+
```json
|
|
1495
|
+
{
|
|
1496
|
+
"id": 1042,
|
|
1497
|
+
"view_url": "https://mantis.example.com/view.php?id=1042",
|
|
1498
|
+
"monitors": {
|
|
1499
|
+
"removed": ["jsmith"],
|
|
1500
|
+
"not_monitoring": [],
|
|
1501
|
+
"current": ["asmith"]
|
|
1502
|
+
}
|
|
1503
|
+
}
|
|
1504
|
+
```
|
|
1505
|
+
|
|
1506
|
+
`monitors.current` always lists all remaining watchers. `monitors.added` lists names successfully added; `monitors.removed` lists names successfully removed; `monitors.not_monitoring` lists names that were not watching and were therefore skipped. Adding or removing other users requires the `monitor_add_others_bug_threshold` / `monitor_delete_others_bug_threshold` access level. The steps run in order — `fields`, monitors, `note`. Once one of them succeeded, a later failure is reported inline as `monitors_error` or `note_error` (nothing is rolled back); only when every requested step failed does the call return an error.
|
|
1507
|
+
|
|
1508
|
+
---
|
|
1509
|
+
|
|
1510
|
+
### Add a watcher (deprecated)
|
|
1511
|
+
|
|
1512
|
+
> **Deprecated:** use `update_issue` with `add_monitors` instead — `add_monitor` will be removed in 2.0.0.
|
|
1265
1513
|
|
|
1266
1514
|
Subscribes a user to notifications for an issue.
|
|
1267
1515
|
|
|
@@ -1269,7 +1517,7 @@ Subscribes a user to notifications for an issue.
|
|
|
1269
1517
|
|
|
1270
1518
|
**Parameters:**
|
|
1271
1519
|
- `issue_id` — numeric issue ID
|
|
1272
|
-
- `username` —
|
|
1520
|
+
- `username` — MantisBT login name
|
|
1273
1521
|
|
|
1274
1522
|
**Request:**
|
|
1275
1523
|
|
|
@@ -1283,12 +1531,19 @@ Subscribes a user to notifications for an issue.
|
|
|
1283
1531
|
**Response:**
|
|
1284
1532
|
|
|
1285
1533
|
```json
|
|
1286
|
-
{
|
|
1534
|
+
{
|
|
1535
|
+
"success": true,
|
|
1536
|
+
"monitors": ["asmith", "jsmith"]
|
|
1537
|
+
}
|
|
1287
1538
|
```
|
|
1288
1539
|
|
|
1540
|
+
`monitors` lists all users now watching the issue. Adding a user who already watches it changes nothing and still succeeds. Adding another user requires the `monitor_add_others_bug_threshold` access level.
|
|
1541
|
+
|
|
1289
1542
|
---
|
|
1290
1543
|
|
|
1291
|
-
### Remove a watcher
|
|
1544
|
+
### Remove a watcher (deprecated)
|
|
1545
|
+
|
|
1546
|
+
> **Deprecated:** use `update_issue` with `remove_monitors` instead — `remove_monitor` will be removed in 2.0.0.
|
|
1292
1547
|
|
|
1293
1548
|
Unsubscribes a user from notifications for an issue.
|
|
1294
1549
|
|
|
@@ -1296,7 +1551,7 @@ Unsubscribes a user from notifications for an issue.
|
|
|
1296
1551
|
|
|
1297
1552
|
**Parameters:**
|
|
1298
1553
|
- `issue_id` — numeric issue ID
|
|
1299
|
-
- `username` —
|
|
1554
|
+
- `username` — MantisBT login name (case-insensitive)
|
|
1300
1555
|
|
|
1301
1556
|
**Request:**
|
|
1302
1557
|
|
|
@@ -1310,9 +1565,15 @@ Unsubscribes a user from notifications for an issue.
|
|
|
1310
1565
|
**Response:**
|
|
1311
1566
|
|
|
1312
1567
|
```json
|
|
1313
|
-
{
|
|
1568
|
+
{
|
|
1569
|
+
"success": true,
|
|
1570
|
+
"removed": true,
|
|
1571
|
+
"monitors": ["asmith"]
|
|
1572
|
+
}
|
|
1314
1573
|
```
|
|
1315
1574
|
|
|
1575
|
+
`monitors` lists the users still watching the issue. If `jsmith` was not a monitor, nothing is changed and the response contains `"removed": false` plus a `message`. Removing another user requires the `monitor_delete_others_bug_threshold` access level; without it the tool returns an error.
|
|
1576
|
+
|
|
1316
1577
|
---
|
|
1317
1578
|
|
|
1318
1579
|
## Semantic Search
|
|
@@ -1323,6 +1584,8 @@ Unsubscribes a user from notifications for an issue.
|
|
|
1323
1584
|
|
|
1324
1585
|
Builds the full vector search index from scratch. Run this once after enabling semantic search.
|
|
1325
1586
|
|
|
1587
|
+
The server also rebuilds the index by itself when it was made with another embedding model or in another way — after `MANTIS_SEARCH_MODEL` was changed, or after an update that changes how issues are embedded. A full rebuild of 7,700 issues took about 6 minutes with the default of 1 thread and less than 3 minutes with `MANTIS_SEARCH_THREADS=4`.
|
|
1588
|
+
|
|
1326
1589
|
**Tool:** `rebuild_search_index`
|
|
1327
1590
|
|
|
1328
1591
|
**Parameters:**
|
|
@@ -1353,7 +1616,7 @@ Builds the full vector search index from scratch. Run this once after enabling s
|
|
|
1353
1616
|
|
|
1354
1617
|
Updates the index with issues added or changed since the last sync. Faster than a full rebuild: only issues changed since then are fetched and re-embedded.
|
|
1355
1618
|
|
|
1356
|
-
Only one server process syncs the shared index at a time. If another process (for example another client session) is already syncing, the tool returns an error ("A search index sync is already running") — try again once that sync has finished. A sync limited to `project_id` does not advance `last_synced_at`, so changes in other projects are still picked up by the next sync.
|
|
1619
|
+
Only one server process syncs the shared index at a time. If another process (for example another client session) is already syncing, the tool returns an error ("A search index sync is already running") — try again once that sync has finished. A sync limited to `project_id` does not advance `last_synced_at`, so changes in other projects are still picked up by the next sync. If the index was made with another embedding model or version, the sync rebuilds it for all projects, even with `project_id`.
|
|
1357
1620
|
|
|
1358
1621
|
**Tool:** `rebuild_search_index`
|
|
1359
1622
|
|
|
@@ -1386,7 +1649,7 @@ Only one server process syncs the shared index at a time. If another process (fo
|
|
|
1386
1649
|
|
|
1387
1650
|
Returns the number of indexed issues, total issue count, and the timestamp of the last sync. `last_synced_at` is the newest `updated_at` the MantisBT server reported at that sync (server time), so it can lie before the actual time of the sync.
|
|
1388
1651
|
|
|
1389
|
-
**Tool:** `
|
|
1652
|
+
**Tool:** `get_metadata`
|
|
1390
1653
|
|
|
1391
1654
|
**Parameters:** _(none)_
|
|
1392
1655
|
|
|
@@ -1396,23 +1659,32 @@ Returns the number of indexed issues, total issue count, and the timestamp of th
|
|
|
1396
1659
|
{}
|
|
1397
1660
|
```
|
|
1398
1661
|
|
|
1399
|
-
**Response:**
|
|
1662
|
+
**Response (relevant excerpt):**
|
|
1400
1663
|
|
|
1401
1664
|
```json
|
|
1402
1665
|
{
|
|
1403
|
-
"
|
|
1404
|
-
"
|
|
1405
|
-
"
|
|
1406
|
-
"
|
|
1407
|
-
"
|
|
1666
|
+
"projects": 24,
|
|
1667
|
+
"tags": 15,
|
|
1668
|
+
"byProject": { "3": { "name": "Webshop", "users": 8, "versions": 12, "categories": 4 } },
|
|
1669
|
+
"cached_at": "2026-03-27T09:00:00.000Z",
|
|
1670
|
+
"ttl_seconds": 82800,
|
|
1671
|
+
"search_index": {
|
|
1672
|
+
"summary": "312/312 (100 %)",
|
|
1673
|
+
"indexed": 312,
|
|
1674
|
+
"total": 312,
|
|
1675
|
+
"percent": 100,
|
|
1676
|
+
"last_synced_at": "2024-11-05T14:00:00+01:00"
|
|
1677
|
+
}
|
|
1408
1678
|
}
|
|
1409
1679
|
```
|
|
1410
1680
|
|
|
1681
|
+
> **Deprecated:** `get_search_index_status` will be removed in 2.0.0 — use `get_metadata` (field `search_index`) as shown above.
|
|
1682
|
+
|
|
1411
1683
|
---
|
|
1412
1684
|
|
|
1413
1685
|
### Search by meaning
|
|
1414
1686
|
|
|
1415
|
-
Finds issues semantically similar to a natural language query. Returns issue IDs and relevance scores.
|
|
1687
|
+
Finds issues semantically similar to a natural language query, combined with keyword matching so that exact terms (identifiers, error codes, version numbers) are found as well. Returns issue IDs and relevance scores. `score` is the semantic similarity; the order follows the combined ranking, so a result with an exact keyword match can come before one with a higher `score`.
|
|
1416
1688
|
|
|
1417
1689
|
**Tool:** `search_issues`
|
|
1418
1690
|
|
|
@@ -1542,68 +1814,159 @@ Shows which part of an issue matched the search query. Each result that has keyw
|
|
|
1542
1814
|
|
|
1543
1815
|
## Projects & Categories
|
|
1544
1816
|
|
|
1817
|
+
### Get a project with categories, users and versions
|
|
1818
|
+
|
|
1819
|
+
Retrieves a project's master data plus any combination of its categories, users and versions in one call. Categories come without the `[All Projects]` prefix — ready for use in `create_issue`. `member_query` filters users by a case-insensitive substring in login name, real name or email, and returns all matches.
|
|
1820
|
+
|
|
1821
|
+
**Tool:** `get_project`
|
|
1822
|
+
|
|
1823
|
+
**Parameters:**
|
|
1824
|
+
- `project_id` — numeric project ID (use `list_projects` to discover)
|
|
1825
|
+
- `include` — _(optional)_ array of `"categories"`, `"users"`, `"versions"` (any combination)
|
|
1826
|
+
- `access_level` — _(optional)_ only users at or above this level (10=viewer, 25=reporter, 40=updater, 55=developer, 70=manager, 90=administrator); implies `"users"`
|
|
1827
|
+
- `member_query` — _(optional)_ case-insensitive substring; implies `"users"`, returns all matches
|
|
1828
|
+
- `obsolete` — _(optional)_ include obsolete versions; implies `"versions"`
|
|
1829
|
+
- `inherit` — _(optional)_ include versions inherited from parent projects; implies `"versions"`
|
|
1830
|
+
|
|
1831
|
+
**Request:** _(master data + categories + users + versions)_
|
|
1832
|
+
|
|
1833
|
+
```json
|
|
1834
|
+
{
|
|
1835
|
+
"project_id": 3,
|
|
1836
|
+
"include": ["categories", "users", "versions"]
|
|
1837
|
+
}
|
|
1838
|
+
```
|
|
1839
|
+
|
|
1840
|
+
**Response:**
|
|
1841
|
+
|
|
1842
|
+
```json
|
|
1843
|
+
{
|
|
1844
|
+
"id": 3,
|
|
1845
|
+
"name": "Webshop",
|
|
1846
|
+
"description": "Main customer-facing storefront",
|
|
1847
|
+
"status": { "id": 10, "name": "development" },
|
|
1848
|
+
"enabled": true,
|
|
1849
|
+
"view_state": { "id": 10, "name": "public" },
|
|
1850
|
+
"categories": [
|
|
1851
|
+
{ "id": 1, "name": "General" },
|
|
1852
|
+
{ "id": 2, "name": "UI" },
|
|
1853
|
+
{ "id": 3, "name": "Backend" }
|
|
1854
|
+
],
|
|
1855
|
+
"users": [
|
|
1856
|
+
{ "id": 4, "name": "jsmith", "real_name": "John Smith", "email": "jsmith@example.com", "access_level": { "id": 55, "name": "developer" } },
|
|
1857
|
+
{ "id": 7, "name": "jdoe", "real_name": "Jane Doe", "email": "jdoe@example.com", "access_level": { "id": 70, "name": "manager" } }
|
|
1858
|
+
],
|
|
1859
|
+
"versions": [
|
|
1860
|
+
{ "id": 42, "name": "1.2.0", "released": false, "obsolete": false, "timestamp": "2026-10-31T00:00:00+00:00" },
|
|
1861
|
+
{ "id": 43, "name": "1.2.1", "released": false, "obsolete": false, "timestamp": "2026-10-31T00:00:00+00:00" }
|
|
1862
|
+
]
|
|
1863
|
+
}
|
|
1864
|
+
```
|
|
1865
|
+
|
|
1866
|
+
**Request:** _(member search)_
|
|
1867
|
+
|
|
1868
|
+
```json
|
|
1869
|
+
{
|
|
1870
|
+
"project_id": 3,
|
|
1871
|
+
"member_query": "smith"
|
|
1872
|
+
}
|
|
1873
|
+
```
|
|
1874
|
+
|
|
1875
|
+
**Response:**
|
|
1876
|
+
|
|
1877
|
+
```json
|
|
1878
|
+
{
|
|
1879
|
+
"id": 3,
|
|
1880
|
+
"name": "Webshop",
|
|
1881
|
+
"status": { "id": 10, "name": "development" },
|
|
1882
|
+
"enabled": true,
|
|
1883
|
+
"users": [
|
|
1884
|
+
{ "id": 4, "name": "jsmith", "real_name": "John Smith", "email": "jsmith@example.com", "access_level": { "id": 55, "name": "developer" } },
|
|
1885
|
+
{ "id": 11, "name": "asmith", "real_name": "Alice Smith", "email": "asmith@example.com", "access_level": { "id": 40, "name": "updater" } }
|
|
1886
|
+
]
|
|
1887
|
+
}
|
|
1888
|
+
```
|
|
1889
|
+
|
|
1890
|
+
> **Note:** `get_project_categories`, `get_project_users`, `get_project_versions`, and `find_project_member` are deprecated in favour of `get_project` with `include` / `member_query` and will be removed in 2.0.0.
|
|
1891
|
+
|
|
1892
|
+
---
|
|
1893
|
+
|
|
1545
1894
|
### List project categories
|
|
1546
1895
|
|
|
1547
1896
|
Returns all categories available for a MantisBT project. Use the returned names directly when creating issues.
|
|
1548
1897
|
|
|
1549
|
-
**Tool:** `
|
|
1898
|
+
**Tool:** `get_project`
|
|
1550
1899
|
|
|
1551
1900
|
**Parameters:**
|
|
1552
1901
|
- `project_id` — numeric project ID
|
|
1902
|
+
- `include` — `["categories"]`
|
|
1553
1903
|
|
|
1554
1904
|
**Request:**
|
|
1555
1905
|
|
|
1556
1906
|
```json
|
|
1557
1907
|
{
|
|
1558
|
-
"project_id": 3
|
|
1908
|
+
"project_id": 3,
|
|
1909
|
+
"include": ["categories"]
|
|
1559
1910
|
}
|
|
1560
1911
|
```
|
|
1561
1912
|
|
|
1562
1913
|
**Response:**
|
|
1563
1914
|
|
|
1564
1915
|
```json
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
{ "id":
|
|
1569
|
-
|
|
1916
|
+
{
|
|
1917
|
+
"id": 3,
|
|
1918
|
+
"name": "Webshop",
|
|
1919
|
+
"status": { "id": 10, "name": "development" },
|
|
1920
|
+
"enabled": true,
|
|
1921
|
+
"categories": [
|
|
1922
|
+
{ "id": 1, "name": "General" },
|
|
1923
|
+
{ "id": 2, "name": "UI" },
|
|
1924
|
+
{ "id": 3, "name": "Backend" }
|
|
1925
|
+
]
|
|
1926
|
+
}
|
|
1570
1927
|
```
|
|
1571
1928
|
|
|
1572
1929
|
> **Note:** Category names prefixed with `[All Projects]` (inherited from the global project) have the prefix automatically stripped in the response.
|
|
1573
1930
|
|
|
1931
|
+
> **Deprecated:** `get_project_categories` will be removed in 2.0.0 — use `get_project` with `include: ["categories"]` as shown above.
|
|
1932
|
+
|
|
1574
1933
|
---
|
|
1575
1934
|
|
|
1576
1935
|
### Find a project member
|
|
1577
1936
|
|
|
1578
|
-
Searches project members by name, real name, or email. The search is case-insensitive and matches any substring.
|
|
1937
|
+
Searches project members by name, real name, or email. The search is case-insensitive and matches any substring. All matching users are returned — there is no `limit`.
|
|
1579
1938
|
|
|
1580
|
-
**Tool:** `
|
|
1939
|
+
**Tool:** `get_project`
|
|
1581
1940
|
|
|
1582
1941
|
**Parameters:**
|
|
1583
1942
|
- `project_id` — numeric project ID
|
|
1584
|
-
- `
|
|
1585
|
-
- `limit` — _(optional)_ maximum number of results, default 10, max 100
|
|
1943
|
+
- `member_query` — substring to match against `name`, `real_name`, or `email`
|
|
1586
1944
|
|
|
1587
1945
|
**Request:**
|
|
1588
1946
|
|
|
1589
1947
|
```json
|
|
1590
1948
|
{
|
|
1591
1949
|
"project_id": 3,
|
|
1592
|
-
"
|
|
1593
|
-
"limit": 5
|
|
1950
|
+
"member_query": "smith"
|
|
1594
1951
|
}
|
|
1595
1952
|
```
|
|
1596
1953
|
|
|
1597
1954
|
**Response:**
|
|
1598
1955
|
|
|
1599
1956
|
```json
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1957
|
+
{
|
|
1958
|
+
"id": 3,
|
|
1959
|
+
"name": "Webshop",
|
|
1960
|
+
"status": { "id": 10, "name": "development" },
|
|
1961
|
+
"enabled": true,
|
|
1962
|
+
"users": [
|
|
1963
|
+
{ "id": 4, "name": "jsmith", "real_name": "John Smith", "email": "jsmith@example.com", "access_level": { "id": 55, "name": "developer" } },
|
|
1964
|
+
{ "id": 11, "name": "asmith", "real_name": "Alice Smith", "email": "asmith@example.com", "access_level": { "id": 40, "name": "updater" } }
|
|
1965
|
+
]
|
|
1966
|
+
}
|
|
1604
1967
|
```
|
|
1605
1968
|
|
|
1606
|
-
> **
|
|
1969
|
+
> **Deprecated:** `find_project_member` will be removed in 2.0.0 — use `get_project` with `member_query` as shown above. Unlike `find_project_member`, `get_project` has no `limit` and returns all matching users.
|
|
1607
1970
|
|
|
1608
1971
|
---
|
|
1609
1972
|
|
|
@@ -1658,12 +2021,13 @@ Updates an existing version of a MantisBT project. Only the fields you pass are
|
|
|
1658
2021
|
|
|
1659
2022
|
**Parameters:**
|
|
1660
2023
|
- `project_id` — numeric project ID
|
|
1661
|
-
- `version_id` — numeric version ID (use `
|
|
2024
|
+
- `version_id` — numeric version ID (use `get_project` with `include: ["versions"]` to discover)
|
|
1662
2025
|
- `name` — _(optional)_ new version name (must be unique within the project)
|
|
1663
2026
|
- `description` — _(optional)_ new version description
|
|
1664
2027
|
- `released` — _(optional)_ released flag
|
|
1665
2028
|
- `obsolete` — _(optional)_ obsolete flag
|
|
1666
2029
|
- `timestamp` — _(optional)_ version date as ISO 8601 string
|
|
2030
|
+
- `next_version` — _(optional, only with `released: true`)_ name of a follow-up version to create as an unreleased placeholder, e.g. `"1.2.1"`; used as-is — no automatic numbering
|
|
1667
2031
|
|
|
1668
2032
|
**Request:** _(mark a version as obsolete)_
|
|
1669
2033
|
|
|
@@ -1687,9 +2051,46 @@ Updates an existing version of a MantisBT project. Only the fields you pass are
|
|
|
1687
2051
|
}
|
|
1688
2052
|
```
|
|
1689
2053
|
|
|
2054
|
+
**Request:** _(release a version and create a follow-up placeholder)_
|
|
2055
|
+
|
|
2056
|
+
```json
|
|
2057
|
+
{
|
|
2058
|
+
"project_id": 3,
|
|
2059
|
+
"version_id": 42,
|
|
2060
|
+
"released": true,
|
|
2061
|
+
"timestamp": "2026-10-31",
|
|
2062
|
+
"next_version": "1.2.1"
|
|
2063
|
+
}
|
|
2064
|
+
```
|
|
2065
|
+
|
|
2066
|
+
**Response:**
|
|
2067
|
+
|
|
2068
|
+
```json
|
|
2069
|
+
{
|
|
2070
|
+
"version": {
|
|
2071
|
+
"id": 42,
|
|
2072
|
+
"name": "1.2.0",
|
|
2073
|
+
"released": true,
|
|
2074
|
+
"obsolete": false,
|
|
2075
|
+
"timestamp": "2026-10-31T00:00:00+00:00"
|
|
2076
|
+
},
|
|
2077
|
+
"next_version": {
|
|
2078
|
+
"id": 43,
|
|
2079
|
+
"name": "1.2.1",
|
|
2080
|
+
"released": false,
|
|
2081
|
+
"obsolete": false,
|
|
2082
|
+
"timestamp": "2026-10-31T00:00:00+00:00"
|
|
2083
|
+
}
|
|
2084
|
+
}
|
|
2085
|
+
```
|
|
2086
|
+
|
|
2087
|
+
Setting `released=true` does not change the version date — always pass `timestamp` with the release date. If creating the follow-up version fails, the update itself stays in effect and the error is reported as `next_version_error` in the response.
|
|
2088
|
+
|
|
1690
2089
|
---
|
|
1691
2090
|
|
|
1692
|
-
### Release a version and create the next bugfix placeholder
|
|
2091
|
+
### Release a version and create the next bugfix placeholder (deprecated)
|
|
2092
|
+
|
|
2093
|
+
> **Deprecated:** use `update_version` with `released: true`, `timestamp`, and optionally `next_version` instead — `release_version` will be removed in 2.0.0. See [Update a project version](#update-a-project-version) for the replacement recipe.
|
|
1693
2094
|
|
|
1694
2095
|
Marks a version as released (setting its date) and creates a follow-up version placeholder in the same call. The follow-up version name is used as-is — no automatic numbering. If the follow-up creation fails, the release stays in effect and the error is reported in `next_version_error`.
|
|
1695
2096
|
|
|
@@ -1735,7 +2136,7 @@ Marks a version as released (setting its date) and creates a follow-up version p
|
|
|
1735
2136
|
}
|
|
1736
2137
|
```
|
|
1737
2138
|
|
|
1738
|
-
> **Note:** Setting `released=true` via `update_version` does not change the version date —
|
|
2139
|
+
> **Note:** Setting `released=true` via `update_version` does not change the version date — always pass `timestamp` for the release date. Use `next_version` to create a follow-up version in the same call.
|
|
1739
2140
|
|
|
1740
2141
|
---
|
|
1741
2142
|
|
|
@@ -1776,9 +2177,11 @@ Returns a compact overview of all cached metadata: total project and tag counts,
|
|
|
1776
2177
|
|
|
1777
2178
|
**Tool:** `get_metadata`
|
|
1778
2179
|
|
|
1779
|
-
**Parameters:**
|
|
2180
|
+
**Parameters:**
|
|
2181
|
+
- `detail` — _(optional)_ `"summary"` (default) for counts only; `"full"` for the complete raw cache
|
|
2182
|
+
- `refresh` — _(optional)_ `true` to re-fetch all metadata from MantisBT before answering; default `false`
|
|
1780
2183
|
|
|
1781
|
-
**Request:**
|
|
2184
|
+
**Request:** _(summary, from cache)_
|
|
1782
2185
|
|
|
1783
2186
|
```json
|
|
1784
2187
|
{}
|
|
@@ -1799,36 +2202,75 @@ Returns a compact overview of all cached metadata: total project and tag counts,
|
|
|
1799
2202
|
}
|
|
1800
2203
|
```
|
|
1801
2204
|
|
|
1802
|
-
|
|
2205
|
+
With `MANTIS_SEARCH_ENABLED=true` the response also contains a `search_index` block:
|
|
2206
|
+
|
|
2207
|
+
```json
|
|
2208
|
+
{
|
|
2209
|
+
"projects": 24,
|
|
2210
|
+
"tags": 15,
|
|
2211
|
+
"byProject": { "3": { "name": "Webshop", "users": 8, "versions": 12, "categories": 4 } },
|
|
2212
|
+
"cached_at": "2026-03-27T09:00:00.000Z",
|
|
2213
|
+
"ttl_seconds": 82800,
|
|
2214
|
+
"search_index": {
|
|
2215
|
+
"summary": "312/312 (100 %)",
|
|
2216
|
+
"indexed": 312,
|
|
2217
|
+
"total": 312,
|
|
2218
|
+
"percent": 100,
|
|
2219
|
+
"last_synced_at": "2026-03-27T08:55:00+01:00"
|
|
2220
|
+
}
|
|
2221
|
+
}
|
|
2222
|
+
```
|
|
2223
|
+
|
|
2224
|
+
> **Note:** For full lists use `list_projects`, `get_project` (with `include`), or `list_tags`.
|
|
2225
|
+
|
|
2226
|
+
---
|
|
2227
|
+
|
|
2228
|
+
### Refresh the metadata cache
|
|
2229
|
+
|
|
2230
|
+
Forces a fresh fetch of all metadata from MantisBT before returning the summary.
|
|
2231
|
+
|
|
2232
|
+
**Tool:** `get_metadata`
|
|
2233
|
+
|
|
2234
|
+
**Parameters:**
|
|
2235
|
+
- `refresh` — `true`
|
|
2236
|
+
|
|
2237
|
+
**Request:**
|
|
2238
|
+
|
|
2239
|
+
```json
|
|
2240
|
+
{ "refresh": true }
|
|
2241
|
+
```
|
|
2242
|
+
|
|
2243
|
+
**Response:** same shape as the summary above, with `cached_at` updated to now.
|
|
1803
2244
|
|
|
1804
2245
|
---
|
|
1805
2246
|
|
|
1806
2247
|
### Get the full metadata cache
|
|
1807
2248
|
|
|
1808
|
-
Returns the complete raw metadata cache as minified JSON.
|
|
2249
|
+
Returns the complete raw metadata cache as minified JSON. The cache structure is `{ timestamp, projects, byProject: {"<id>": { users, versions, categories }}, tags }`.
|
|
1809
2250
|
|
|
1810
|
-
**Tool:** `
|
|
2251
|
+
**Tool:** `get_metadata`
|
|
1811
2252
|
|
|
1812
|
-
**Parameters:**
|
|
2253
|
+
**Parameters:**
|
|
2254
|
+
- `detail` — `"full"`
|
|
1813
2255
|
|
|
1814
2256
|
**Request:**
|
|
1815
2257
|
|
|
1816
2258
|
```json
|
|
1817
|
-
{}
|
|
2259
|
+
{ "detail": "full" }
|
|
1818
2260
|
```
|
|
1819
2261
|
|
|
1820
2262
|
**Response:**
|
|
1821
2263
|
|
|
1822
2264
|
```json
|
|
1823
2265
|
{
|
|
2266
|
+
"timestamp": 1743066000000,
|
|
1824
2267
|
"projects": [
|
|
1825
|
-
{
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
"enabled": true,
|
|
2268
|
+
{ "id": 3, "name": "Webshop", "status": { "id": 10, "name": "development" }, "enabled": true }
|
|
2269
|
+
],
|
|
2270
|
+
"byProject": {
|
|
2271
|
+
"3": {
|
|
1830
2272
|
"users": [
|
|
1831
|
-
{ "id": 4, "name": "jsmith", "real_name": "John Smith", "email": "jsmith@example.com"
|
|
2273
|
+
{ "id": 4, "name": "jsmith", "real_name": "John Smith", "email": "jsmith@example.com" }
|
|
1832
2274
|
],
|
|
1833
2275
|
"versions": [
|
|
1834
2276
|
{ "id": 21, "name": "2.4.0", "released": false, "obsolete": false }
|
|
@@ -1838,81 +2280,57 @@ Returns the complete raw metadata cache as minified JSON. Contains all projects
|
|
|
1838
2280
|
{ "id": 2, "name": "UI" }
|
|
1839
2281
|
]
|
|
1840
2282
|
}
|
|
1841
|
-
|
|
2283
|
+
},
|
|
1842
2284
|
"tags": [
|
|
1843
2285
|
{ "id": 1, "name": "regression" },
|
|
1844
2286
|
{ "id": 2, "name": "hotfix" }
|
|
1845
|
-
]
|
|
1846
|
-
"cached_at": "2026-03-27T09:00:00.000Z"
|
|
2287
|
+
]
|
|
1847
2288
|
}
|
|
1848
2289
|
```
|
|
1849
2290
|
|
|
1850
|
-
> **
|
|
2291
|
+
> **Deprecated:** `get_metadata_full` will be removed in 2.0.0 — use `get_metadata` with `detail: "full"` as shown above.
|
|
1851
2292
|
|
|
1852
2293
|
---
|
|
1853
2294
|
|
|
1854
2295
|
## Version & Diagnostics
|
|
1855
2296
|
|
|
1856
|
-
### Get MCP server
|
|
1857
|
-
|
|
1858
|
-
Returns the version of this mantisbt-mcp-server instance.
|
|
1859
|
-
|
|
1860
|
-
**Tool:** `get_mcp_version`
|
|
1861
|
-
|
|
1862
|
-
**Parameters:** _(none)_
|
|
1863
|
-
|
|
1864
|
-
**Request:**
|
|
2297
|
+
### Get versions (MCP server and MantisBT)
|
|
1865
2298
|
|
|
1866
|
-
|
|
1867
|
-
{}
|
|
1868
|
-
```
|
|
2299
|
+
Returns the version of this mantisbt-mcp-server and of the connected MantisBT installation in one response. With `check_latest: true` (default) the MantisBT version is compared against the latest release on GitHub (outbound HTTPS, up to 5 s). If MantisBT cannot be reached, `mantis` holds an `error` and the MCP server version is still returned.
|
|
1869
2300
|
|
|
1870
|
-
**
|
|
1871
|
-
|
|
1872
|
-
```json
|
|
1873
|
-
{
|
|
1874
|
-
"version": "1.5.8"
|
|
1875
|
-
}
|
|
1876
|
-
```
|
|
1877
|
-
|
|
1878
|
-
---
|
|
1879
|
-
|
|
1880
|
-
### Get MantisBT version
|
|
1881
|
-
|
|
1882
|
-
Returns the version of the connected MantisBT installation and optionally compares it against the latest official release on GitHub.
|
|
1883
|
-
|
|
1884
|
-
**Tool:** `get_mantis_version`
|
|
2301
|
+
**Tool:** `get_version`
|
|
1885
2302
|
|
|
1886
2303
|
**Parameters:**
|
|
1887
|
-
- `check_latest` — _(optional)_
|
|
2304
|
+
- `check_latest` — _(optional)_ compare MantisBT against the latest GitHub release; default `true`
|
|
1888
2305
|
|
|
1889
2306
|
**Request:**
|
|
1890
2307
|
|
|
1891
2308
|
```json
|
|
1892
|
-
{
|
|
1893
|
-
"check_latest": true
|
|
1894
|
-
}
|
|
2309
|
+
{}
|
|
1895
2310
|
```
|
|
1896
2311
|
|
|
1897
2312
|
**Response:**
|
|
1898
2313
|
|
|
1899
2314
|
```json
|
|
1900
2315
|
{
|
|
1901
|
-
"
|
|
1902
|
-
"
|
|
1903
|
-
|
|
2316
|
+
"mcp_server": { "version": "1.15.0" },
|
|
2317
|
+
"mantis": {
|
|
2318
|
+
"installed_version": "2.27.0",
|
|
2319
|
+
"latest_version": "2.27.1",
|
|
2320
|
+
"status": "update-available"
|
|
2321
|
+
}
|
|
1904
2322
|
}
|
|
1905
2323
|
```
|
|
1906
2324
|
|
|
1907
|
-
Possible values for `status`: `up-to-date`, `update-available`, `newer-than-release`, `unknown`.
|
|
2325
|
+
Possible values for `status`: `up-to-date`, `update-available`, `newer-than-release`, `unknown`. Set `check_latest: false` to skip the GitHub comparison.
|
|
1908
2326
|
|
|
1909
|
-
> **
|
|
2327
|
+
> **Deprecated:** `get_mcp_version` and `get_mantis_version` will be removed in 2.0.0 — use `get_version` as shown above.
|
|
1910
2328
|
|
|
1911
2329
|
---
|
|
1912
2330
|
|
|
1913
2331
|
### Get the current user
|
|
1914
2332
|
|
|
1915
|
-
Returns the profile of the user associated with the configured API key. Useful to verify the connection and confirm which account is being used.
|
|
2333
|
+
Returns the profile of the user associated with the configured API key. Useful to verify the connection and confirm which account is being used. The `language` field tells you which MantisBT language is configured for this user — use it as a hint for the language to write issue texts and notes in, and expect localized enum labels in that language.
|
|
1916
2334
|
|
|
1917
2335
|
**Tool:** `get_current_user`
|
|
1918
2336
|
|
|
@@ -1932,6 +2350,7 @@ Returns the profile of the user associated with the configured API key. Useful t
|
|
|
1932
2350
|
"name": "jsmith",
|
|
1933
2351
|
"real_name": "John Smith",
|
|
1934
2352
|
"email": "jsmith@example.com",
|
|
2353
|
+
"language": "english",
|
|
1935
2354
|
"access_level": { "id": 55, "name": "developer" }
|
|
1936
2355
|
}
|
|
1937
2356
|
```
|
|
@@ -1974,7 +2393,7 @@ Returns all MantisBT projects accessible with the configured API key.
|
|
|
1974
2393
|
|
|
1975
2394
|
**Resource URI:** `mantis://projects`
|
|
1976
2395
|
|
|
1977
|
-
**Fetch behaviour:** Served from the MetadataCache (default TTL 24 h). Falls back to a live API call when the cache is empty. Run `
|
|
2396
|
+
**Fetch behaviour:** Served from the MetadataCache (default TTL 24 h). Falls back to a live API call when the cache is empty. Run `get_metadata` with `refresh: true` to force a refresh.
|
|
1978
2397
|
|
|
1979
2398
|
**Response:**
|
|
1980
2399
|
|
|
@@ -2064,7 +2483,7 @@ Returns valid ID/name pairs for all issue enum fields (severity, priority, statu
|
|
|
2064
2483
|
}
|
|
2065
2484
|
```
|
|
2066
2485
|
|
|
2067
|
-
> **Tip:** The `
|
|
2486
|
+
> **Tip:** The `get_issue_schema` tool provides enum values for clients that do not support Resources (and also returns the valid `select` fields).
|
|
2068
2487
|
|
|
2069
2488
|
---
|
|
2070
2489
|
|
|
@@ -2090,7 +2509,7 @@ Collects structured bug data and calls `create_issue`.
|
|
|
2090
2509
|
- `actual` — actual (observed) behavior
|
|
2091
2510
|
- `environment` — environment details (OS, browser, version, etc.)
|
|
2092
2511
|
|
|
2093
|
-
**What happens:** The prompt returns a message that instructs the LLM to call `
|
|
2512
|
+
**What happens:** The prompt returns a message that instructs the LLM to call `get_issue_schema` (to resolve valid severity/priority values) and then `create_issue` with the provided data.
|
|
2094
2513
|
|
|
2095
2514
|
**Example call:**
|
|
2096
2515
|
|
|
@@ -2184,6 +2603,8 @@ Lists all issues for a project and generates a status report grouped by severity
|
|
|
2184
2603
|
|
|
2185
2604
|
## Destructive Operations
|
|
2186
2605
|
|
|
2606
|
+
> To hide all destructive tools at once — e.g. for a session that should never delete anything — set `MANTIS_DISABLE_DESTRUCTIVE=true`; see [Offer only some tool groups](#offer-only-some-tool-groups).
|
|
2607
|
+
|
|
2187
2608
|
### Delete an issue
|
|
2188
2609
|
|
|
2189
2610
|
Permanently deletes a MantisBT issue. This action cannot be undone.
|