@dpesch/mantisbt-mcp-server 1.5.8 → 1.6.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.
@@ -0,0 +1,1664 @@
1
+ # Cookbook
2
+
3
+ Tool-oriented recipes for the MantisBT MCP server — each recipe shows exactly which tool to call and with which parameters. For natural language prompt examples, see [examples.md](examples.md).
4
+
5
+ ---
6
+
7
+ - [Discovering your instance](#discovering-your-instance)
8
+ - [Get all projects](#get-all-projects)
9
+ - [Discover valid enum values (severity, status, priority)](#discover-valid-enum-values-severity-status-priority)
10
+ - [Discover valid field names for `select`](#discover-valid-field-names-for-select)
11
+ - [Issues](#issues)
12
+ - [Fetch a single issue](#fetch-a-single-issue)
13
+ - [List issues (paginated)](#list-issues-paginated)
14
+ - [Reduce response size with `select`](#reduce-response-size-with-select)
15
+ - [Filter by status](#filter-by-status)
16
+ - [Filter by assignee or reporter](#filter-by-assignee-or-reporter)
17
+ - [Apply a saved filter](#apply-a-saved-filter)
18
+ - [Create an issue](#create-an-issue)
19
+ - [Close an issue (status + resolution)](#close-an-issue-status--resolution)
20
+ - [Reassign an issue](#reassign-an-issue)
21
+ - [Set fix version](#set-fix-version)
22
+ - [Notes](#notes)
23
+ - [Add a public note](#add-a-public-note)
24
+ - [Add a private note](#add-a-private-note)
25
+ - [Delete a note](#delete-a-note)
26
+ - [File Attachments](#file-attachments)
27
+ - [Upload a local file](#upload-a-local-file)
28
+ - [Upload file content (base64)](#upload-file-content-base64)
29
+ - [List attachments](#list-attachments)
30
+ - [Relationships](#relationships)
31
+ - [Mark as duplicate](#mark-as-duplicate)
32
+ - [Link as related](#link-as-related)
33
+ - [Set a blocking relationship](#set-a-blocking-relationship)
34
+ - [Remove a relationship](#remove-a-relationship)
35
+ - [Tags](#tags)
36
+ - [Attach tags by name](#attach-tags-by-name)
37
+ - [Detach a tag](#detach-a-tag)
38
+ - [Monitors (Watchers)](#monitors-watchers)
39
+ - [Add a watcher](#add-a-watcher)
40
+ - [Remove a watcher](#remove-a-watcher)
41
+ - [Semantic Search](#semantic-search)
42
+ - [Build the initial index](#build-the-initial-index)
43
+ - [Incremental index update](#incremental-index-update)
44
+ - [Check index status](#check-index-status)
45
+ - [Search by meaning](#search-by-meaning)
46
+ - [Search with field enrichment](#search-with-field-enrichment)
47
+ - [Projects & Categories](#projects--categories)
48
+ - [List project categories](#list-project-categories)
49
+ - [Version & Diagnostics](#version--diagnostics)
50
+ - [Get MCP server version](#get-mcp-server-version)
51
+ - [Get MantisBT version](#get-mantis-version)
52
+ - [Get the current user](#get-the-current-user)
53
+ - [Resources](#resources)
54
+ - [Read the current user profile](#read-the-current-user-profile)
55
+ - [Read all projects](#read-all-projects)
56
+ - [Read issue enum values](#read-issue-enum-values)
57
+ - [Prompts](#prompts)
58
+ - [Create a bug report](#create-a-bug-report)
59
+ - [Create a feature request](#create-a-feature-request)
60
+ - [Summarize an issue](#summarize-an-issue)
61
+ - [Project status report](#project-status-report)
62
+ - [Destructive Operations](#destructive-operations)
63
+ - [Delete an issue](#delete-an-issue)
64
+
65
+ ---
66
+
67
+ ## Discovering your instance
68
+
69
+ ### Get all projects
70
+
71
+ Returns the full list of projects accessible with your API key.
72
+
73
+ **Tool:** `list_projects`
74
+
75
+ **Parameters:** _(none)_
76
+
77
+ **Request:**
78
+
79
+ ```json
80
+ {}
81
+ ```
82
+
83
+ **Response:**
84
+
85
+ ```json
86
+ [
87
+ { "id": 3, "name": "Webshop", "status": { "id": 10, "name": "development" }, "enabled": true },
88
+ { "id": 5, "name": "Backend API", "status": { "id": 10, "name": "development" }, "enabled": true }
89
+ ]
90
+ ```
91
+
92
+ ---
93
+
94
+ ### Discover valid enum values (severity, status, priority)
95
+
96
+ Returns the enum values configured on your specific MantisBT instance. Use this before creating or updating issues to know which values are valid.
97
+
98
+ **Tool:** `get_issue_enums`
99
+
100
+ **Parameters:** _(none)_
101
+
102
+ **Request:**
103
+
104
+ ```json
105
+ {}
106
+ ```
107
+
108
+ **Response:**
109
+
110
+ ```json
111
+ {
112
+ "priorities": [
113
+ { "id": 10, "name": "none" },
114
+ { "id": 20, "name": "low" },
115
+ { "id": 30, "name": "normal" },
116
+ { "id": 40, "name": "high" },
117
+ { "id": 50, "name": "urgent" },
118
+ { "id": 60, "name": "immediate" }
119
+ ],
120
+ "severities": [
121
+ { "id": 10, "name": "feature" },
122
+ { "id": 20, "name": "trivial" },
123
+ { "id": 50, "name": "major" },
124
+ { "id": 60, "name": "crash" }
125
+ // ...
126
+ ],
127
+ "statuses": [
128
+ { "id": 10, "name": "new" },
129
+ { "id": 50, "name": "assigned" },
130
+ { "id": 80, "name": "resolved" },
131
+ { "id": 90, "name": "closed" }
132
+ // ...
133
+ ],
134
+ "resolutions": [
135
+ { "id": 10, "name": "open" },
136
+ { "id": 20, "name": "fixed" },
137
+ { "id": 60, "name": "duplicate" }
138
+ // ...
139
+ ]
140
+ }
141
+ ```
142
+
143
+ > **Note:** The names returned by `get_issue_enums()` may be localized. `create_issue` and `update_issue` require **canonical English names** for `severity` and `priority` (e.g. `minor`, `major`, `normal`) — look at the `canonical_name` field in the response if you are unsure.
144
+
145
+ ---
146
+
147
+ ### Discover valid field names for `select`
148
+
149
+ Returns all field names that can be passed to the `select` parameter of `list_issues`.
150
+
151
+ **Tool:** `get_issue_fields`
152
+
153
+ **Parameters:**
154
+ - `project_id` — _(optional)_ restrict to fields available for a specific project
155
+
156
+ **Request:**
157
+
158
+ ```json
159
+ {
160
+ "project_id": 3
161
+ }
162
+ ```
163
+
164
+ **Response:**
165
+
166
+ ```json
167
+ {
168
+ "fields": [
169
+ "additional_information", "attachments", "category", "created_at",
170
+ "description", "fixed_in_version", "handler", "id", "notes",
171
+ "priority", "project", "relationships", "reporter", "resolution",
172
+ "severity", "status", "summary", "tags", "target_version",
173
+ "updated_at", "version", "view_state"
174
+ ],
175
+ "source": "live"
176
+ }
177
+ ```
178
+
179
+ ---
180
+
181
+ ## Issues
182
+
183
+ ### Fetch a single issue
184
+
185
+ Retrieves a single issue by its numeric ID including notes, attachments, tags, and relationships.
186
+
187
+ **Tool:** `get_issue`
188
+
189
+ **Parameters:**
190
+ - `id` — numeric issue ID
191
+
192
+ **Request:**
193
+
194
+ ```json
195
+ {
196
+ "id": 1042
197
+ }
198
+ ```
199
+
200
+ **Response:**
201
+
202
+ ```json
203
+ {
204
+ "id": 1042,
205
+ "summary": "Login button unresponsive on mobile Safari",
206
+ "description": "Tapping the login button on iPhone 14 / Safari 17 does nothing.",
207
+ "project": { "id": 3, "name": "Webshop" },
208
+ "category": { "id": 1, "name": "UI" },
209
+ "status": { "id": 50, "name": "assigned" },
210
+ "resolution": { "id": 10, "name": "open" },
211
+ "priority": { "id": 30, "name": "normal" },
212
+ "severity": { "id": 50, "name": "major" },
213
+ "reporter": { "id": 4, "name": "jsmith" },
214
+ "handler": { "id": 7, "name": "jdoe" },
215
+ "created_at": "2024-11-03T09:14:22+00:00",
216
+ "updated_at": "2024-11-05T14:02:11+00:00",
217
+ "tags": [],
218
+ "notes": [],
219
+ "attachments": [],
220
+ "relationships": []
221
+ }
222
+ ```
223
+
224
+ ---
225
+
226
+ ### List issues (paginated)
227
+
228
+ Returns a paginated list of issues, optionally scoped to a project.
229
+
230
+ **Tool:** `list_issues`
231
+
232
+ **Parameters:**
233
+ - `project_id` — _(optional)_ numeric project ID
234
+ - `page` — _(optional)_ page number, default 1
235
+ - `page_size` — _(optional)_ issues per page, default 50
236
+
237
+ **Request:**
238
+
239
+ ```json
240
+ {
241
+ "project_id": 3,
242
+ "page": 1,
243
+ "page_size": 25
244
+ }
245
+ ```
246
+
247
+ **Response:**
248
+
249
+ ```json
250
+ {
251
+ "issues": [
252
+ {
253
+ "id": 1042,
254
+ "summary": "Login button unresponsive on mobile Safari",
255
+ "status": { "id": 50, "name": "assigned" },
256
+ "handler": { "id": 7, "name": "jdoe" }
257
+ },
258
+ {
259
+ "id": 1041,
260
+ "summary": "Checkout total rounds incorrectly",
261
+ "status": { "id": 40, "name": "confirmed" },
262
+ "handler": { "id": 4, "name": "jsmith" }
263
+ }
264
+ // ...
265
+ ]
266
+ }
267
+ ```
268
+
269
+ ---
270
+
271
+ ### Reduce response size with `select`
272
+
273
+ Pass a comma-separated list of field names to receive only the fields you need. Significantly reduces payload size for large lists.
274
+
275
+ **Tool:** `list_issues`
276
+
277
+ **Parameters:**
278
+ - `project_id` — _(optional)_ numeric project ID
279
+ - `select` — comma-separated field names
280
+
281
+ **Request:**
282
+
283
+ ```json
284
+ {
285
+ "project_id": 3,
286
+ "select": "id,summary,status,handler"
287
+ }
288
+ ```
289
+
290
+ **Response:**
291
+
292
+ ```json
293
+ {
294
+ "issues": [
295
+ {
296
+ "id": 1042,
297
+ "summary": "Login button unresponsive on mobile Safari",
298
+ "status": { "id": 50, "name": "assigned" },
299
+ "handler": { "id": 7, "name": "jdoe" }
300
+ }
301
+ // ...
302
+ ]
303
+ }
304
+ ```
305
+
306
+ > **Note:** Use `get_issue_fields()` to see all available field names.
307
+
308
+ ---
309
+
310
+ ### Filter by status
311
+
312
+ Returns only issues with a specific status. The filter is applied client-side — the tool scans up to 500 issues internally.
313
+
314
+ **Tool:** `list_issues`
315
+
316
+ **Parameters:**
317
+ - `project_id` — _(optional)_ numeric project ID
318
+ - `status` — status name string (e.g. `"new"`, `"assigned"`, `"resolved"`)
319
+
320
+ **Request:**
321
+
322
+ ```json
323
+ {
324
+ "project_id": 3,
325
+ "status": "assigned"
326
+ }
327
+ ```
328
+
329
+ **Response:**
330
+
331
+ ```json
332
+ {
333
+ "issues": [
334
+ {
335
+ "id": 1042,
336
+ "summary": "Login button unresponsive on mobile Safari",
337
+ "status": { "id": 50, "name": "assigned" },
338
+ "handler": { "id": 7, "name": "jdoe" }
339
+ }
340
+ // ...
341
+ ]
342
+ }
343
+ ```
344
+
345
+ > **Note:** For large projects with many issues, use a pre-saved MantisBT filter via `filter_id` instead — client-side filtering only scans the first 500 issues (10 pages × 50).
346
+
347
+ ---
348
+
349
+ ### Filter by assignee or reporter
350
+
351
+ Returns issues filtered by the assigned user or reporter. Both filters are applied client-side.
352
+
353
+ **Tool:** `list_issues`
354
+
355
+ **Parameters:**
356
+ - `project_id` — _(optional)_ numeric project ID
357
+ - `assigned_to` — _(optional)_ numeric user ID of the assignee
358
+ - `reporter_id` — _(optional)_ numeric user ID of the reporter
359
+
360
+ **Request:**
361
+
362
+ ```json
363
+ {
364
+ "project_id": 3,
365
+ "assigned_to": 7
366
+ }
367
+ ```
368
+
369
+ **Response:**
370
+
371
+ ```json
372
+ {
373
+ "issues": [
374
+ {
375
+ "id": 1042,
376
+ "summary": "Login button unresponsive on mobile Safari",
377
+ "status": { "id": 50, "name": "assigned" },
378
+ "handler": { "id": 7, "name": "jdoe" }
379
+ }
380
+ // ...
381
+ ]
382
+ }
383
+ ```
384
+
385
+ ---
386
+
387
+ ### Apply a saved filter
388
+
389
+ Use a pre-saved MantisBT filter by its ID. This is the recommended approach for large datasets.
390
+
391
+ **Step 1 — List available filters:**
392
+
393
+ **Tool:** `list_filters`
394
+
395
+ **Request:**
396
+
397
+ ```json
398
+ {}
399
+ ```
400
+
401
+ **Response:**
402
+
403
+ ```json
404
+ [
405
+ { "id": 12, "name": "My open issues", "owner": { "id": 4, "name": "jsmith" } },
406
+ { "id": 15, "name": "Critical bugs", "owner": { "id": 4, "name": "jsmith" } }
407
+ ]
408
+ ```
409
+
410
+ **Step 2 — Fetch issues using the filter ID:**
411
+
412
+ **Tool:** `list_issues`
413
+
414
+ **Parameters:**
415
+ - `filter_id` — numeric filter ID from step 1
416
+
417
+ **Request:**
418
+
419
+ ```json
420
+ {
421
+ "filter_id": 12
422
+ }
423
+ ```
424
+
425
+ **Response:**
426
+
427
+ ```json
428
+ {
429
+ "issues": [
430
+ {
431
+ "id": 1042,
432
+ "summary": "Login button unresponsive on mobile Safari",
433
+ "status": { "id": 50, "name": "assigned" },
434
+ "handler": { "id": 7, "name": "jdoe" }
435
+ }
436
+ // ...
437
+ ]
438
+ }
439
+ ```
440
+
441
+ ---
442
+
443
+ ### Create an issue
444
+
445
+ Creates a new issue in MantisBT.
446
+
447
+ **Tool:** `create_issue`
448
+
449
+ **Parameters:**
450
+ - `summary` — issue title
451
+ - `project_id` — numeric project ID
452
+ - `category` — category name string
453
+ - `description` — _(optional)_ detailed description
454
+ - `priority` — _(optional)_ canonical English priority name: `none`, `low`, `normal`, `high`, `urgent`, `immediate` — call `get_issue_enums()` to see localized labels
455
+ - `severity` — _(optional)_ canonical English severity name: `feature`, `trivial`, `text`, `tweak`, `minor`, `major`, `crash`, `block`; default is `"minor"` — call `get_issue_enums()` to see localized labels
456
+ - `handler` — _(optional)_ assignee username (resolved to ID automatically)
457
+ - `handler_id` — _(optional)_ assignee numeric user ID (alternative to `handler`)
458
+
459
+ **Request:**
460
+
461
+ ```json
462
+ {
463
+ "summary": "Login button unresponsive on mobile Safari",
464
+ "project_id": 3,
465
+ "category": "UI",
466
+ "description": "Tapping the login button on iPhone 14 / Safari 17 does nothing.",
467
+ "severity": "major",
468
+ "handler": "jsmith"
469
+ }
470
+ ```
471
+
472
+ **Response:**
473
+
474
+ ```json
475
+ {
476
+ "id": 1042,
477
+ "summary": "Login button unresponsive on mobile Safari",
478
+ "description": "Tapping the login button on iPhone 14 / Safari 17 does nothing.",
479
+ "project": { "id": 3, "name": "Webshop" },
480
+ "category": { "id": 1, "name": "UI" },
481
+ "status": { "id": 10, "name": "new" },
482
+ "resolution": { "id": 10, "name": "open" },
483
+ "priority": { "id": 30, "name": "normal" },
484
+ "severity": { "id": 50, "name": "major" },
485
+ "reporter": { "id": 4, "name": "jsmith" },
486
+ "handler": { "id": 4, "name": "jsmith" },
487
+ "created_at": "2024-11-03T09:14:22+00:00",
488
+ "updated_at": "2024-11-03T09:14:22+00:00",
489
+ "tags": [],
490
+ "notes": [],
491
+ "attachments": [],
492
+ "relationships": []
493
+ }
494
+ ```
495
+
496
+ **Error: unknown severity or priority**
497
+
498
+ If an unrecognized name is passed for `severity` or `priority`, the server returns an error listing valid values:
499
+
500
+ > Error: Invalid severity "schwerer Fehler". Valid canonical names: feature, trivial, text, tweak, minor, major, crash, block. Call get_issue_enums to see localized labels.
501
+
502
+ Use `get_issue_enums` to discover the canonical names accepted by `create_issue`.
503
+
504
+ ---
505
+
506
+ ### Close an issue (status + resolution)
507
+
508
+ Resolves and closes an issue. Always set **both** `status` and `resolution` — setting only status leaves resolution as "open".
509
+
510
+ **Tool:** `update_issue`
511
+
512
+ **Parameters:**
513
+ - `id` — numeric issue ID
514
+ - `fields.status` — status object with name
515
+ - `fields.resolution` — resolution object with id
516
+
517
+ **Request:**
518
+
519
+ ```json
520
+ {
521
+ "id": 1042,
522
+ "fields": {
523
+ "status": { "name": "resolved" },
524
+ "resolution": { "id": 20 }
525
+ }
526
+ }
527
+ ```
528
+
529
+ **Response:**
530
+
531
+ ```json
532
+ {
533
+ "id": 1042,
534
+ "summary": "Login button unresponsive on mobile Safari",
535
+ "status": { "id": 80, "name": "resolved" },
536
+ "resolution": { "id": 20, "name": "fixed" },
537
+ "updated_at": "2024-11-06T10:30:00+00:00"
538
+ }
539
+ ```
540
+
541
+ > **Note:** Resolution ID 20 is "fixed" in a default MantisBT installation. Use `get_issue_enums()` to confirm the correct ID for your instance.
542
+
543
+ ---
544
+
545
+ ### Reassign an issue
546
+
547
+ Changes the handler (assignee) of an existing issue.
548
+
549
+ **Tool:** `update_issue`
550
+
551
+ **Parameters:**
552
+ - `id` — numeric issue ID
553
+ - `fields.handler` — username string (resolved to ID automatically)
554
+
555
+ **Request:**
556
+
557
+ ```json
558
+ {
559
+ "id": 1042,
560
+ "fields": {
561
+ "handler": "jdoe"
562
+ }
563
+ }
564
+ ```
565
+
566
+ **Response:**
567
+
568
+ ```json
569
+ {
570
+ "id": 1042,
571
+ "summary": "Login button unresponsive on mobile Safari",
572
+ "status": { "id": 50, "name": "assigned" },
573
+ "handler": { "id": 7, "name": "jdoe" },
574
+ "updated_at": "2024-11-06T11:00:00+00:00"
575
+ }
576
+ ```
577
+
578
+ ---
579
+
580
+ ### Set fix version
581
+
582
+ Sets the `fixed_in_version` field on an issue.
583
+
584
+ **Tool:** `update_issue`
585
+
586
+ **Parameters:**
587
+ - `id` — numeric issue ID
588
+ - `fields.fixed_in_version` — version name string
589
+
590
+ **Request:**
591
+
592
+ ```json
593
+ {
594
+ "id": 1042,
595
+ "fields": {
596
+ "fixed_in_version": "2.1.0"
597
+ }
598
+ }
599
+ ```
600
+
601
+ **Response:**
602
+
603
+ ```json
604
+ {
605
+ "id": 1042,
606
+ "summary": "Login button unresponsive on mobile Safari",
607
+ "fixed_in_version": { "name": "2.1.0" },
608
+ "updated_at": "2024-11-06T11:15:00+00:00"
609
+ }
610
+ ```
611
+
612
+ > **Note:** Use `get_project_versions(project_id)` to list valid version names for a project.
613
+
614
+ ---
615
+
616
+ ## Notes
617
+
618
+ ### Add a public note
619
+
620
+ Adds a publicly visible note to an issue.
621
+
622
+ **Tool:** `add_note`
623
+
624
+ **Parameters:**
625
+ - `issue_id` — numeric issue ID
626
+ - `text` — note content
627
+ - `view_state` — _(optional)_ `"public"` (default) or `"private"`
628
+
629
+ **Request:**
630
+
631
+ ```json
632
+ {
633
+ "issue_id": 1042,
634
+ "text": "Reproduced on version 2.0.3. Root cause identified in the auth middleware."
635
+ }
636
+ ```
637
+
638
+ **Response:**
639
+
640
+ ```json
641
+ {
642
+ "id": 88,
643
+ "reporter": { "id": 7, "name": "jdoe" },
644
+ "text": "Reproduced on version 2.0.3. Root cause identified in the auth middleware.",
645
+ "view_state": { "id": 10, "name": "public" },
646
+ "created_at": "2024-11-05T14:02:11+00:00"
647
+ }
648
+ ```
649
+
650
+ ---
651
+
652
+ ### Add a private note
653
+
654
+ Adds a note visible only to developers and managers.
655
+
656
+ **Tool:** `add_note`
657
+
658
+ **Parameters:**
659
+ - `issue_id` — numeric issue ID
660
+ - `text` — note content
661
+ - `view_state` — `"private"`
662
+
663
+ **Request:**
664
+
665
+ ```json
666
+ {
667
+ "issue_id": 1042,
668
+ "text": "Internal: this is caused by the session token not being refreshed.",
669
+ "view_state": "private"
670
+ }
671
+ ```
672
+
673
+ **Response:**
674
+
675
+ ```json
676
+ {
677
+ "id": 89,
678
+ "reporter": { "id": 7, "name": "jdoe" },
679
+ "text": "Internal: this is caused by the session token not being refreshed.",
680
+ "view_state": { "id": 50, "name": "private" },
681
+ "created_at": "2024-11-05T14:05:00+00:00"
682
+ }
683
+ ```
684
+
685
+ ---
686
+
687
+ ### Delete a note
688
+
689
+ Permanently removes a note from an issue.
690
+
691
+ **Tool:** `delete_note`
692
+
693
+ **Parameters:**
694
+ - `issue_id` — numeric issue ID
695
+ - `note_id` — numeric note ID (from `list_notes` or `get_issue`)
696
+
697
+ **Request:**
698
+
699
+ ```json
700
+ {
701
+ "issue_id": 1042,
702
+ "note_id": 88
703
+ }
704
+ ```
705
+
706
+ **Response:**
707
+
708
+ ```
709
+ "Note #88 deleted from issue #1042."
710
+ ```
711
+
712
+ > **Note:** This action is permanent and cannot be undone.
713
+
714
+ ---
715
+
716
+ ## File Attachments
717
+
718
+ ### Upload a local file
719
+
720
+ Attaches a file from the local filesystem to an issue.
721
+
722
+ **Tool:** `upload_file`
723
+
724
+ **Parameters:**
725
+ - `issue_id` — numeric issue ID
726
+ - `file_path` — absolute path to the file
727
+
728
+ **Request:**
729
+
730
+ ```json
731
+ {
732
+ "issue_id": 1042,
733
+ "file_path": "/home/user/screenshots/login-error.png"
734
+ }
735
+ ```
736
+
737
+ **Response:**
738
+
739
+ ```json
740
+ {
741
+ "id": 101,
742
+ "file_name": "login-error.png",
743
+ "size": 14523,
744
+ "content_type": "image/png"
745
+ }
746
+ ```
747
+
748
+ > **Note:** If the MantisBT instance does not return file metadata, the response is `{ "success": true }`.
749
+
750
+ > **Note:** If `MANTIS_UPLOAD_DIR` is set, `file_path` must point to a file inside that directory. Paths outside the directory or path traversal attempts (`../`) are rejected with an error.
751
+
752
+ ---
753
+
754
+ ### Upload file content (base64)
755
+
756
+ Attaches a file by passing its base64-encoded content directly. Use this when the file is not on a local filesystem accessible to the server.
757
+
758
+ **Tool:** `upload_file`
759
+
760
+ **Parameters:**
761
+ - `issue_id` — numeric issue ID
762
+ - `content` — base64-encoded file content
763
+ - `filename` — filename including extension (required when using `content`)
764
+ - `content_type` — _(optional)_ MIME type
765
+ - `description` — _(optional)_ attachment description
766
+
767
+ **Request:**
768
+
769
+ ```json
770
+ {
771
+ "issue_id": 1042,
772
+ "content": "iVBORw0KGgoAAAANSUhEUgAA...",
773
+ "filename": "screenshot.png",
774
+ "content_type": "image/png",
775
+ "description": "Login error on mobile Safari"
776
+ }
777
+ ```
778
+
779
+ **Response:**
780
+
781
+ ```json
782
+ {
783
+ "id": 101,
784
+ "file_name": "screenshot.png",
785
+ "size": 14523,
786
+ "content_type": "image/png"
787
+ }
788
+ ```
789
+
790
+ > **Note:** If the MantisBT instance does not return file metadata, the response is `{ "success": true }`.
791
+
792
+ ---
793
+
794
+ ### List attachments
795
+
796
+ Returns all file attachments for an issue.
797
+
798
+ **Tool:** `list_issue_files`
799
+
800
+ **Parameters:**
801
+ - `issue_id` — numeric issue ID
802
+
803
+ **Request:**
804
+
805
+ ```json
806
+ {
807
+ "issue_id": 1042
808
+ }
809
+ ```
810
+
811
+ **Response:**
812
+
813
+ ```json
814
+ [
815
+ {
816
+ "id": 23,
817
+ "filename": "login-error.png",
818
+ "size": 42318,
819
+ "content_type": "image/png",
820
+ "description": "Login error on mobile Safari",
821
+ "created_at": "2024-11-05T15:30:00+00:00"
822
+ }
823
+ ]
824
+ ```
825
+
826
+ ---
827
+
828
+ ## Relationships
829
+
830
+ ### Mark as duplicate
831
+
832
+ Links issue A as a duplicate of issue B.
833
+
834
+ **Tool:** `add_relationship`
835
+
836
+ **Parameters:**
837
+ - `issue_id` — ID of the duplicate issue (A)
838
+ - `target_id` — ID of the original issue (B)
839
+ - `type_name` — `"duplicate_of"`
840
+
841
+ **Request:**
842
+
843
+ ```json
844
+ {
845
+ "issue_id": 1055,
846
+ "target_id": 1042,
847
+ "type_name": "duplicate_of"
848
+ }
849
+ ```
850
+
851
+ **Response:**
852
+
853
+ ```json
854
+ {
855
+ "id": 5,
856
+ "issue": { "id": 1055 },
857
+ "type": { "id": 0, "name": "duplicate of" }
858
+ }
859
+ ```
860
+
861
+ ---
862
+
863
+ ### Link as related
864
+
865
+ Creates a non-directional "related to" link between two issues.
866
+
867
+ **Tool:** `add_relationship`
868
+
869
+ **Parameters:**
870
+ - `issue_id` — numeric issue ID
871
+ - `target_id` — numeric ID of the related issue
872
+ - `type_name` — `"related_to"`
873
+
874
+ **Request:**
875
+
876
+ ```json
877
+ {
878
+ "issue_id": 1042,
879
+ "target_id": 1038,
880
+ "type_name": "related_to"
881
+ }
882
+ ```
883
+
884
+ **Response:**
885
+
886
+ ```json
887
+ {
888
+ "id": 6,
889
+ "issue": { "id": 1042 },
890
+ "type": { "id": 1, "name": "related to" }
891
+ }
892
+ ```
893
+
894
+ ---
895
+
896
+ ### Set a blocking relationship
897
+
898
+ Marks issue A as blocking issue B (B cannot proceed until A is done). The direction matters — read carefully.
899
+
900
+ **Tool:** `add_relationship`
901
+
902
+ **Parameters:**
903
+ - `issue_id` — ID of the blocking issue (A)
904
+ - `target_id` — ID of the blocked issue (B)
905
+ - `type_name` — `"parent_of"` (A blocks B) or `"child_of"` (A is blocked by B)
906
+
907
+ **Example — A blocks B:**
908
+
909
+ **Request:**
910
+
911
+ ```json
912
+ {
913
+ "issue_id": 1038,
914
+ "target_id": 1042,
915
+ "type_name": "parent_of"
916
+ }
917
+ ```
918
+
919
+ **Response:**
920
+
921
+ ```json
922
+ {
923
+ "id": 7,
924
+ "issue": { "id": 1038 },
925
+ "type": { "id": 2, "name": "parent of" }
926
+ }
927
+ ```
928
+
929
+ Accepted values for `type_name`:
930
+ - `duplicate_of` / `has_duplicate`
931
+ - `related_to` / `related-to`
932
+ - `parent_of` / `parent-of` / `depends_on`
933
+ - `child_of` / `child-of` / `blocks`
934
+
935
+ > **Note:** "A `child_of` B" means A is blocked by B (A depends on B). "A `parent_of` B" means A blocks B. Aliases `depends_on` (→ `parent_of`) and `blocks` (→ `child_of`) are also accepted. Dash variants (e.g. `related-to`, `parent-of`) work as well. Getting the direction wrong inverts the dependency.
936
+
937
+ ---
938
+
939
+ ### Remove a relationship
940
+
941
+ Removes a relationship from an issue.
942
+
943
+ **Step 1 — Get the relationship ID:**
944
+
945
+ **Tool:** `get_issue`
946
+
947
+ **Request:**
948
+
949
+ ```json
950
+ {
951
+ "id": 1042
952
+ }
953
+ ```
954
+
955
+ **Response:**
956
+
957
+ ```json
958
+ {
959
+ "id": 1042,
960
+ "summary": "Login button unresponsive on mobile Safari",
961
+ "relationships": [
962
+ { "id": 5, "type": { "id": 0, "name": "duplicate of" }, "issue": { "id": 1055 } }
963
+ ]
964
+ }
965
+ ```
966
+
967
+ Read `relationships[].id` from the response.
968
+
969
+ **Step 2 — Remove the relationship:**
970
+
971
+ **Tool:** `remove_relationship`
972
+
973
+ **Parameters:**
974
+ - `issue_id` — numeric issue ID
975
+ - `relationship_id` — numeric relationship ID from step 1
976
+
977
+ **Request:**
978
+
979
+ ```json
980
+ {
981
+ "issue_id": 1042,
982
+ "relationship_id": 5
983
+ }
984
+ ```
985
+
986
+ **Response:**
987
+
988
+ ```json
989
+ { "success": true }
990
+ ```
991
+
992
+ > **Note:** `relationship_id` is the ID of the relationship record itself, not the type ID or the target issue ID.
993
+
994
+ ---
995
+
996
+ ## Tags
997
+
998
+ ### Attach tags by name
999
+
1000
+ Attaches one or more tags to an issue by name. Unknown tag names are automatically created.
1001
+
1002
+ **Tool:** `attach_tags`
1003
+
1004
+ **Parameters:**
1005
+ - `issue_id` — numeric issue ID
1006
+ - `tags` — array of tag objects; use `{name: "..."}` to reference by name or `{id: N}` to reference by ID
1007
+
1008
+ **Request:**
1009
+
1010
+ ```json
1011
+ {
1012
+ "issue_id": 1042,
1013
+ "tags": [
1014
+ { "name": "needs-review" },
1015
+ { "name": "regression" }
1016
+ ]
1017
+ }
1018
+ ```
1019
+
1020
+ **Response:**
1021
+
1022
+ ```
1023
+ "Tags successfully attached to issue #1042."
1024
+ ```
1025
+
1026
+ ---
1027
+
1028
+ ### Detach a tag
1029
+
1030
+ Removes a tag from an issue. Requires the numeric tag ID.
1031
+
1032
+ **Step 1 — Get the tag ID:**
1033
+
1034
+ **Tool:** `get_issue`
1035
+
1036
+ **Request:**
1037
+
1038
+ ```json
1039
+ {
1040
+ "id": 1042
1041
+ }
1042
+ ```
1043
+
1044
+ **Response:**
1045
+
1046
+ ```json
1047
+ {
1048
+ "id": 1042,
1049
+ "summary": "Login button unresponsive on mobile Safari",
1050
+ "tags": [
1051
+ { "id": 14, "name": "needs-review" },
1052
+ { "id": 17, "name": "regression" }
1053
+ ]
1054
+ }
1055
+ ```
1056
+
1057
+ Read `tags[].id` from the response.
1058
+
1059
+ **Step 2 — Detach the tag:**
1060
+
1061
+ **Tool:** `detach_tag`
1062
+
1063
+ **Parameters:**
1064
+ - `issue_id` — numeric issue ID
1065
+ - `tag_id` — numeric tag ID from step 1
1066
+
1067
+ **Request:**
1068
+
1069
+ ```json
1070
+ {
1071
+ "issue_id": 1042,
1072
+ "tag_id": 14
1073
+ }
1074
+ ```
1075
+
1076
+ **Response:**
1077
+
1078
+ ```
1079
+ "Tag #14 successfully removed from issue #1042."
1080
+ ```
1081
+
1082
+ > **Note:** `detach_tag` requires a numeric ID, not the tag name. There is no lookup by name — always retrieve the ID first via `get_issue` or `get_metadata`.
1083
+
1084
+ ---
1085
+
1086
+ ## Monitors (Watchers)
1087
+
1088
+ ### Add a watcher
1089
+
1090
+ Subscribes a user to notifications for an issue.
1091
+
1092
+ **Tool:** `add_monitor`
1093
+
1094
+ **Parameters:**
1095
+ - `issue_id` — numeric issue ID
1096
+ - `username` — username string
1097
+
1098
+ **Request:**
1099
+
1100
+ ```json
1101
+ {
1102
+ "issue_id": 1042,
1103
+ "username": "jsmith"
1104
+ }
1105
+ ```
1106
+
1107
+ **Response:**
1108
+
1109
+ ```json
1110
+ { "success": true }
1111
+ ```
1112
+
1113
+ ---
1114
+
1115
+ ### Remove a watcher
1116
+
1117
+ Unsubscribes a user from notifications for an issue.
1118
+
1119
+ **Tool:** `remove_monitor`
1120
+
1121
+ **Parameters:**
1122
+ - `issue_id` — numeric issue ID
1123
+ - `username` — username string
1124
+
1125
+ **Request:**
1126
+
1127
+ ```json
1128
+ {
1129
+ "issue_id": 1042,
1130
+ "username": "jsmith"
1131
+ }
1132
+ ```
1133
+
1134
+ **Response:**
1135
+
1136
+ ```json
1137
+ { "success": true }
1138
+ ```
1139
+
1140
+ ---
1141
+
1142
+ ## Semantic Search
1143
+
1144
+ > **Note:** All tools in this section require `MANTIS_SEARCH_ENABLED=true` in the server configuration.
1145
+
1146
+ ### Build the initial index
1147
+
1148
+ Builds the full vector search index from scratch. Run this once after enabling semantic search.
1149
+
1150
+ **Tool:** `rebuild_search_index`
1151
+
1152
+ **Parameters:**
1153
+ - `full` — set to `true` to clear the existing index before rebuilding
1154
+
1155
+ **Request:**
1156
+
1157
+ ```json
1158
+ {
1159
+ "full": true
1160
+ }
1161
+ ```
1162
+
1163
+ **Response:**
1164
+
1165
+ ```json
1166
+ {
1167
+ "indexed": 312,
1168
+ "skipped": 0,
1169
+ "total": 312,
1170
+ "duration_ms": 48203
1171
+ }
1172
+ ```
1173
+
1174
+ ---
1175
+
1176
+ ### Incremental index update
1177
+
1178
+ Updates the index with issues added or changed since the last build. Faster than a full rebuild.
1179
+
1180
+ **Tool:** `rebuild_search_index`
1181
+
1182
+ **Parameters:**
1183
+ - `project_id` — _(optional)_ limit to a single project
1184
+ - `full` — omit or set to `false` for incremental mode
1185
+
1186
+ **Request:**
1187
+
1188
+ ```json
1189
+ {
1190
+ "project_id": 3
1191
+ }
1192
+ ```
1193
+
1194
+ **Response:**
1195
+
1196
+ ```json
1197
+ {
1198
+ "indexed": 14,
1199
+ "skipped": 298,
1200
+ "total": 312,
1201
+ "duration_ms": 2104
1202
+ }
1203
+ ```
1204
+
1205
+ ---
1206
+
1207
+ ### Check index status
1208
+
1209
+ Returns the number of indexed issues, total issue count, and the timestamp of the last sync.
1210
+
1211
+ **Tool:** `get_search_index_status`
1212
+
1213
+ **Parameters:** _(none)_
1214
+
1215
+ **Request:**
1216
+
1217
+ ```json
1218
+ {}
1219
+ ```
1220
+
1221
+ **Response:**
1222
+
1223
+ ```json
1224
+ {
1225
+ "summary": "312/312 (100 %)",
1226
+ "indexed": 312,
1227
+ "total": 312,
1228
+ "percent": 100,
1229
+ "last_synced_at": "2024-11-05T14:00:00.000Z"
1230
+ }
1231
+ ```
1232
+
1233
+ ---
1234
+
1235
+ ### Search by meaning
1236
+
1237
+ Finds issues semantically similar to a natural language query. Returns issue IDs and relevance scores.
1238
+
1239
+ **Tool:** `search_issues`
1240
+
1241
+ **Parameters:**
1242
+ - `query` — natural language search query
1243
+ - `top_n` — _(optional)_ number of results to return; default 10
1244
+
1245
+ **Request:**
1246
+
1247
+ ```json
1248
+ {
1249
+ "query": "authentication fails after password reset",
1250
+ "top_n": 5
1251
+ }
1252
+ ```
1253
+
1254
+ **Response:**
1255
+
1256
+ ```json
1257
+ [
1258
+ { "id": 1042, "score": 0.91 },
1259
+ { "id": 987, "score": 0.84 },
1260
+ { "id": 1015, "score": 0.79 }
1261
+ ]
1262
+ ```
1263
+
1264
+ > **Note:** Semantic search returns the top-N most similar issues — it does not guarantee exhaustive recall. It is not suitable for "find all issues about X" census queries.
1265
+
1266
+ ---
1267
+
1268
+ ### Search with field enrichment
1269
+
1270
+ Enriches search results with specific fields fetched from MantisBT. Without `select`, only `id` and score are returned.
1271
+
1272
+ **Tool:** `search_issues`
1273
+
1274
+ **Parameters:**
1275
+ - `query` — natural language search query
1276
+ - `top_n` — _(optional)_ number of results
1277
+ - `select` — comma-separated field names to fetch for each result
1278
+
1279
+ **Request:**
1280
+
1281
+ ```json
1282
+ {
1283
+ "query": "authentication fails after password reset",
1284
+ "top_n": 10,
1285
+ "select": "id,summary,status,handler"
1286
+ }
1287
+ ```
1288
+
1289
+ **Response:**
1290
+
1291
+ ```json
1292
+ [
1293
+ {
1294
+ "id": 1042,
1295
+ "score": 0.91,
1296
+ "summary": "Login button unresponsive on mobile Safari",
1297
+ "status": { "id": 50, "name": "assigned" },
1298
+ "handler": { "id": 7, "name": "jdoe" }
1299
+ }
1300
+ // ...
1301
+ ]
1302
+ ```
1303
+
1304
+ > **Note:** Using `select` triggers additional API calls to MantisBT for each result. Keep `top_n` small when using enrichment to avoid excessive requests.
1305
+
1306
+ ---
1307
+
1308
+ ## Projects & Categories
1309
+
1310
+ ### List project categories
1311
+
1312
+ Returns all categories available for a MantisBT project. Use the returned names directly when creating issues.
1313
+
1314
+ **Tool:** `get_project_categories`
1315
+
1316
+ **Parameters:**
1317
+ - `project_id` — numeric project ID
1318
+
1319
+ **Request:**
1320
+
1321
+ ```json
1322
+ {
1323
+ "project_id": 3
1324
+ }
1325
+ ```
1326
+
1327
+ **Response:**
1328
+
1329
+ ```json
1330
+ [
1331
+ { "id": 1, "name": "General" },
1332
+ { "id": 2, "name": "UI" },
1333
+ { "id": 3, "name": "Backend" }
1334
+ ]
1335
+ ```
1336
+
1337
+ > **Note:** Category names prefixed with `[All Projects]` (inherited from the global project) have the prefix automatically stripped in the response.
1338
+
1339
+ ---
1340
+
1341
+ ## Version & Diagnostics
1342
+
1343
+ ### Get MCP server version
1344
+
1345
+ Returns the version of this mantisbt-mcp-server instance.
1346
+
1347
+ **Tool:** `get_mcp_version`
1348
+
1349
+ **Parameters:** _(none)_
1350
+
1351
+ **Request:**
1352
+
1353
+ ```json
1354
+ {}
1355
+ ```
1356
+
1357
+ **Response:**
1358
+
1359
+ ```json
1360
+ {
1361
+ "version": "1.5.8"
1362
+ }
1363
+ ```
1364
+
1365
+ ---
1366
+
1367
+ ### Get MantisBT version
1368
+
1369
+ Returns the version of the connected MantisBT installation and optionally compares it against the latest official release on GitHub.
1370
+
1371
+ **Tool:** `get_mantis_version`
1372
+
1373
+ **Parameters:**
1374
+ - `check_latest` — _(optional)_ whether to compare against the latest GitHub release; default `true`
1375
+
1376
+ **Request:**
1377
+
1378
+ ```json
1379
+ {
1380
+ "check_latest": true
1381
+ }
1382
+ ```
1383
+
1384
+ **Response:**
1385
+
1386
+ ```json
1387
+ {
1388
+ "installed_version": "2.27.0",
1389
+ "latest_version": "2.27.1",
1390
+ "status": "update-available"
1391
+ }
1392
+ ```
1393
+
1394
+ Possible values for `status`: `up-to-date`, `update-available`, `newer-than-release`, `unknown`.
1395
+
1396
+ > **Note:** The GitHub comparison requires an outbound HTTPS request. Set `check_latest` to `false` to skip it.
1397
+
1398
+ ---
1399
+
1400
+ ### Get the current user
1401
+
1402
+ Returns the profile of the user associated with the configured API key. Useful to verify the connection and confirm which account is being used.
1403
+
1404
+ **Tool:** `get_current_user`
1405
+
1406
+ **Parameters:** _(none)_
1407
+
1408
+ **Request:**
1409
+
1410
+ ```json
1411
+ {}
1412
+ ```
1413
+
1414
+ **Response:**
1415
+
1416
+ ```json
1417
+ {
1418
+ "id": 4,
1419
+ "name": "jsmith",
1420
+ "real_name": "John Smith",
1421
+ "email": "jsmith@example.com",
1422
+ "access_level": { "id": 55, "name": "developer" }
1423
+ }
1424
+ ```
1425
+
1426
+ ---
1427
+
1428
+ ## Resources
1429
+
1430
+ MCP Resources are URI-addressable, read-only data. Clients that support Resources can fetch them directly by URI — no tool call required. Note that Resource support is less widely implemented in MCP clients than Tools; check your client's documentation.
1431
+
1432
+ > **Note:** Resources are read-only. Writing to them is not possible via the Resource primitive — use the corresponding tool (`create_issue`, `update_issue`, etc.) for write operations.
1433
+
1434
+ ### Read the current user profile
1435
+
1436
+ Returns the profile of the authenticated API user.
1437
+
1438
+ **Resource URI:** `mantis://me`
1439
+
1440
+ **Fetch behaviour:** Always live — calls `GET /users/me` on every access.
1441
+
1442
+ **Response:**
1443
+
1444
+ ```json
1445
+ {
1446
+ "id": 4,
1447
+ "name": "jsmith",
1448
+ "real_name": "John Smith",
1449
+ "email": "jsmith@example.com",
1450
+ "access_level": { "id": 55, "name": "developer" }
1451
+ }
1452
+ ```
1453
+
1454
+ > **Tip:** The `get_current_user` tool provides the same data for clients that do not support Resources.
1455
+
1456
+ ---
1457
+
1458
+ ### Read all projects
1459
+
1460
+ Returns all MantisBT projects accessible with the configured API key.
1461
+
1462
+ **Resource URI:** `mantis://projects`
1463
+
1464
+ **Fetch behaviour:** Served from the MetadataCache (default TTL 24 h). Falls back to a live API call when the cache is empty. Run `sync_metadata` to force a refresh.
1465
+
1466
+ **Response:**
1467
+
1468
+ ```json
1469
+ [
1470
+ { "id": 3, "name": "Webshop", "status": { "id": 10, "name": "development" }, "enabled": true },
1471
+ { "id": 5, "name": "Backend API", "status": { "id": 10, "name": "development" }, "enabled": true }
1472
+ ]
1473
+ ```
1474
+
1475
+ > **Tip:** The `list_projects` tool provides the same data for clients that do not support Resources.
1476
+
1477
+ ---
1478
+
1479
+ ### Read issue enum values
1480
+
1481
+ Returns valid ID/name pairs for all issue enum fields (severity, priority, status, resolution, reproducibility). Use this to look up canonical English names before calling `create_issue` or `update_issue`.
1482
+
1483
+ **Resource URI:** `mantis://enums`
1484
+
1485
+ **Fetch behaviour:** Always live — calls the MantisBT config endpoint on every access.
1486
+
1487
+ **Response:**
1488
+
1489
+ ```json
1490
+ {
1491
+ "priorities": [
1492
+ { "id": 10, "name": "none" },
1493
+ { "id": 20, "name": "low" },
1494
+ { "id": 30, "name": "normal" },
1495
+ { "id": 40, "name": "high" },
1496
+ { "id": 50, "name": "urgent" },
1497
+ { "id": 60, "name": "immediate" }
1498
+ ],
1499
+ "severities": [
1500
+ { "id": 10, "name": "feature" },
1501
+ { "id": 20, "name": "trivial" },
1502
+ { "id": 50, "name": "major" },
1503
+ { "id": 60, "name": "crash" }
1504
+ ],
1505
+ "statuses": [
1506
+ { "id": 10, "name": "new" },
1507
+ { "id": 50, "name": "assigned" },
1508
+ { "id": 80, "name": "resolved" },
1509
+ { "id": 90, "name": "closed" }
1510
+ ],
1511
+ "resolutions": [
1512
+ { "id": 10, "name": "open" },
1513
+ { "id": 20, "name": "fixed" },
1514
+ { "id": 60, "name": "duplicate" }
1515
+ ]
1516
+ }
1517
+ ```
1518
+
1519
+ > **Tip:** The `get_issue_enums` tool provides the same data for clients that do not support Resources.
1520
+
1521
+ ---
1522
+
1523
+ ## Prompts
1524
+
1525
+ MCP prompt templates initiate a guided conversation — the client sends the prompt arguments and the server returns a pre-filled message that instructs the LLM to call the appropriate tools. For natural language equivalents, see [examples.md](examples.md).
1526
+
1527
+ ### Create a bug report
1528
+
1529
+ Collects structured bug data and calls `create_issue`.
1530
+
1531
+ **Prompt:** `create-bug-report`
1532
+
1533
+ **Required arguments:**
1534
+ - `project_id` — numeric project ID
1535
+ - `category` — category name string
1536
+ - `summary` — issue title
1537
+ - `description` — detailed description of the bug
1538
+
1539
+ **Optional arguments:**
1540
+ - `steps_to_reproduce` — step-by-step reproduction instructions
1541
+ - `expected` — expected behavior
1542
+ - `actual` — actual (observed) behavior
1543
+ - `environment` — environment details (OS, browser, version, etc.)
1544
+
1545
+ **What happens:** The prompt returns a message that instructs the LLM to call `get_issue_enums` (to resolve valid severity/priority values) and then `create_issue` with the provided data.
1546
+
1547
+ **Example call:**
1548
+
1549
+ ```json
1550
+ {
1551
+ "project_id": 3,
1552
+ "category": "UI",
1553
+ "summary": "Login button unresponsive on mobile Safari",
1554
+ "description": "Tapping the login button on iPhone 14 / Safari 17 does nothing.",
1555
+ "steps_to_reproduce": "1. Open login page on iPhone 14\n2. Tap 'Login'\n3. Nothing happens",
1556
+ "expected": "User is logged in and redirected to dashboard",
1557
+ "actual": "Page stays on login form, no error message",
1558
+ "environment": "iPhone 14, iOS 17, Safari 17"
1559
+ }
1560
+ ```
1561
+
1562
+ ---
1563
+
1564
+ ### Create a feature request
1565
+
1566
+ Collects feature details and calls `create_issue`.
1567
+
1568
+ **Prompt:** `create-feature-request`
1569
+
1570
+ **Required arguments:**
1571
+ - `project_id` — numeric project ID
1572
+ - `category` — category name string
1573
+ - `summary` — feature title
1574
+ - `description` — detailed description of the feature
1575
+
1576
+ **Optional arguments:**
1577
+ - `use_case` — concrete use case or motivation for the feature
1578
+
1579
+ **What happens:** The prompt returns a message that instructs the LLM to call `create_issue` with severity `feature`.
1580
+
1581
+ **Example call:**
1582
+
1583
+ ```json
1584
+ {
1585
+ "project_id": 5,
1586
+ "category": "UX",
1587
+ "summary": "Dark mode for user settings",
1588
+ "description": "Add a dark mode toggle to the user settings page.",
1589
+ "use_case": "Users working in low-light environments report eye strain with the current bright UI."
1590
+ }
1591
+ ```
1592
+
1593
+ ---
1594
+
1595
+ ### Summarize an issue
1596
+
1597
+ Fetches a single issue and returns a concise summary.
1598
+
1599
+ **Prompt:** `summarize-issue`
1600
+
1601
+ **Required arguments:**
1602
+ - `issue_id` — numeric issue ID
1603
+
1604
+ **What happens:** The prompt returns a message that instructs the LLM to call `get_issue` and summarize the result — including status, priority, recent notes, and suggested next steps.
1605
+
1606
+ **Example call:**
1607
+
1608
+ ```json
1609
+ {
1610
+ "issue_id": 1042
1611
+ }
1612
+ ```
1613
+
1614
+ ---
1615
+
1616
+ ### Project status report
1617
+
1618
+ Lists all issues for a project and generates a status report grouped by severity.
1619
+
1620
+ **Prompt:** `project-status`
1621
+
1622
+ **Required arguments:**
1623
+ - `project_id` — numeric project ID
1624
+
1625
+ **What happens:** The prompt returns a message that instructs the LLM to call `list_issues` for the project and produce a structured report: open issue count, breakdown by severity, and a list of the most critical items.
1626
+
1627
+ **Example call:**
1628
+
1629
+ ```json
1630
+ {
1631
+ "project_id": 3
1632
+ }
1633
+ ```
1634
+
1635
+ ---
1636
+
1637
+ ## Destructive Operations
1638
+
1639
+ ### Delete an issue
1640
+
1641
+ Permanently deletes a MantisBT issue. This action cannot be undone.
1642
+
1643
+ **Tool:** `delete_issue`
1644
+
1645
+ **Parameters:**
1646
+ - `id` — numeric issue ID
1647
+
1648
+ **Request:**
1649
+
1650
+ ```json
1651
+ {
1652
+ "id": 42
1653
+ }
1654
+ ```
1655
+
1656
+ **Response:**
1657
+
1658
+ ```
1659
+ "Issue #42 deleted successfully."
1660
+ ```
1661
+
1662
+ > **Warning:** This action is permanent and cannot be undone.
1663
+
1664
+ ---