punchline-mcp 1.3.0 → 1.4.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/README.md +1 -1
- package/dist/tools/tickets.js +11 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -74,7 +74,7 @@ the server twice under two names with two different keys, e.g. `punchline` (proj
|
|
|
74
74
|
| `create_ticket` | project key | Create a ticket. `reporter_email` is required. Supports idempotent retries via `idempotency_key`, sent to the API as the `idempotencyKey` body field. Optional `custom_fields` (sent as `customFields`) is an array of `{ name, value }` pairs; `name` must match a custom-field definition configured on the project or the request is rejected with 400. |
|
|
75
75
|
| `list_tickets` | project key | List tickets visible to the key (own tickets, or the whole project with `read:all`). Paginated. |
|
|
76
76
|
| `get_ticket` | project key | Fetch one ticket by display id (e.g. `ACM-7`). |
|
|
77
|
-
| `update_ticket` | project key | Change a ticket's workflow status, its priority, its labels, and/or customer-facing public summary. Setting `priority` records a **triage ruling** — confirming the current value counts as one — which a project enforcing triage requires before a ticket can close. Priority is applied before status, so one call can triage and close. A ticket created through this API arrives untriaged: the priority sent at creation is the reporter's proposal, not a ruling. *(1.2.0+)* `labels` is a **replace-set** applied before everything else: omit it to leave the labels alone, send the full list to change them, send `[]` to clear them — unknown names are created, exactly as at `create_ticket`; a blank name is refused by both tools rather than silently dropped, and surrounding whitespace is stripped server-side. *(1.3.0+)* |
|
|
77
|
+
| `update_ticket` | project key | Change a ticket's workflow status, its priority, its labels, and/or customer-facing public summary. Setting `priority` records a **triage ruling** — confirming the current value counts as one — which a project enforcing triage requires before a ticket can close. Priority is applied before status, so one call can triage and close. A ticket created through this API arrives untriaged: the priority sent at creation is the reporter's proposal, not a ruling. *(1.2.0+)* `labels` is a **replace-set** applied before everything else: omit it to leave the labels alone, send the full list to change them, send `[]` to clear them — unknown names are created, exactly as at `create_ticket`; a blank name is refused by both tools rather than silently dropped, and surrounding whitespace is stripped server-side. *(1.3.0+)* `title` and `description` may also be patched: `title` is trimmed and rejected if blank, `description` **replaces only the reporter-authored body**, preserving the `**Reported by** … via …` provenance header the ticket was created with — send `""` to clear the body and keep just the header. Both are applied before `labels`, `priority` and `status`. *(1.4.0+)* |
|
|
78
78
|
| `add_communication` | project key | Post a customer-facing communication (external comment) on a ticket. |
|
|
79
79
|
| `link_tickets` | project key | Link two tickets. `relation` is one of `BLOCKS`, `BLOCKED_BY`, `DUPLICATES`, `DUPLICATE_OF`, `RELATES_TO`, read from the perspective of the ticket in `display_id` — the same vocabulary `get_ticket` returns in `linkedTickets`, so a relation round-trips. ⚠️ `close_as_duplicate: true` also **closes the `display_id` ticket and emails its reporter**; it requires `relation=DUPLICATES` and is not undone by `unlink_tickets`. |
|
|
80
80
|
| `unlink_tickets` | project key | Remove a link. `relation` must match how the link reads from the ticket in `display_id`. |
|
package/dist/tools/tickets.js
CHANGED
|
@@ -94,7 +94,7 @@ export function registerTicketTools(server, client) {
|
|
|
94
94
|
},
|
|
95
95
|
}, tool(async (a) => client.request('GET', ticketPath(a.display_id))));
|
|
96
96
|
server.registerTool('update_ticket', {
|
|
97
|
-
description: 'Update a ticket: change its workflow status, its priority, its labels, and/or the customer-facing public summary. At least one field is required; an empty public_summary clears it. Setting priority records a triage ruling — confirming the existing value counts — which is what a project requiring triage before close demands. Priority is applied before status, so one call can triage and close. Labels are applied first, and are a replace-set: omit the field to leave them alone, pass the full list to change them, pass [] to clear them.'
|
|
97
|
+
description: 'Update a ticket: change its workflow status, its priority, its labels, and/or the customer-facing public summary. At least one field is required; an empty public_summary clears it. Setting priority records a triage ruling — confirming the existing value counts — which is what a project requiring triage before close demands. Priority is applied before status, so one call can triage and close. Labels are applied first, and are a replace-set: omit the field to leave them alone, pass the full list to change them, pass [] to clear them. Title and description may also be patched; a description patch replaces only the reporter-authored body and keeps the "Reported by" header the ticket was created with.'
|
|
98
98
|
+ CROSS_PROJECT_LINK_NOTE,
|
|
99
99
|
inputSchema: {
|
|
100
100
|
display_id: z.string().min(1),
|
|
@@ -105,11 +105,18 @@ export function registerTicketTools(server, client) {
|
|
|
105
105
|
labels: z.array(LABEL_NAME).max(100).optional()
|
|
106
106
|
.describe('Replaces the ticket\'s labels with exactly these names; unknown labels are created.'
|
|
107
107
|
+ ' Omit to leave them untouched, [] to clear them.'),
|
|
108
|
+
title: z.string().min(1).max(500).optional()
|
|
109
|
+
.describe('Replaces the ticket title. Must not be blank.'),
|
|
110
|
+
description: z.string().max(50000).optional()
|
|
111
|
+
.describe('Replaces the reporter-authored body of the description. The'
|
|
112
|
+
+ ' "Reported by … via …" header a ticket was created with is preserved;'
|
|
113
|
+
+ ' pass "" to clear the body and keep only that header.'),
|
|
108
114
|
},
|
|
109
115
|
}, tool(async (a) => {
|
|
110
116
|
if (a.status === undefined && a.public_summary === undefined
|
|
111
|
-
&& a.priority === undefined && a.labels === undefined
|
|
112
|
-
|
|
117
|
+
&& a.priority === undefined && a.labels === undefined
|
|
118
|
+
&& a.title === undefined && a.description === undefined) {
|
|
119
|
+
throw new Error('Provide status, priority, labels, title, description and/or public_summary');
|
|
113
120
|
}
|
|
114
121
|
// JSON.stringify drops undefined keys, which is what keeps "omitted" distinct from "[]" on
|
|
115
122
|
// the wire — the API reads an absent labels key as "leave them alone" (RUBE-46).
|
|
@@ -117,6 +124,7 @@ export function registerTicketTools(server, client) {
|
|
|
117
124
|
body: {
|
|
118
125
|
status: a.status, publicSummary: a.public_summary,
|
|
119
126
|
priority: a.priority, labels: a.labels,
|
|
127
|
+
title: a.title, description: a.description,
|
|
120
128
|
},
|
|
121
129
|
});
|
|
122
130
|
}));
|