freshservice-mcp 0.1.0 → 0.1.2
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 +2 -0
- package/dist/index.js +12 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# freshservice-mcp
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/freshservice-mcp)
|
|
4
|
+
[](https://www.npmjs.com/package/freshservice-mcp)
|
|
3
5
|
[](LICENSE)
|
|
4
6
|
[](https://nodejs.org)
|
|
5
7
|
|
package/dist/index.js
CHANGED
|
@@ -11038,7 +11038,7 @@ async function fsRequest(config2, method, path, params = {}, body) {
|
|
|
11038
11038
|
if (!res.ok) {
|
|
11039
11039
|
const text = await res.text().catch(() => "");
|
|
11040
11040
|
throw new Error(
|
|
11041
|
-
`Freshservice API ${method} ${path} \u2192 ${res.status}: ${text.slice(0,
|
|
11041
|
+
`Freshservice API ${method} ${path} \u2192 ${res.status}: ${text.slice(0, 2e3)}`
|
|
11042
11042
|
);
|
|
11043
11043
|
}
|
|
11044
11044
|
if (res.status === 204) return void 0;
|
|
@@ -21266,6 +21266,7 @@ var StdioServerTransport = class {
|
|
|
21266
21266
|
// src/tools/tickets.ts
|
|
21267
21267
|
init_esm();
|
|
21268
21268
|
init_freshservice_client();
|
|
21269
|
+
var HTML_FIELD_HINT = 'HTML is supported \u2014 pass RAW tags (<p>, <b>, <ul>, <li>, <code>). Do NOT HTML-escape the markup: the value is stored verbatim, so <p> renders as the literal text "<p>" instead of a paragraph. Use entities only for characters that must appear literally in the content.';
|
|
21269
21270
|
function statusLabel(status, statusMap) {
|
|
21270
21271
|
return statusMap[status] ?? String(status);
|
|
21271
21272
|
}
|
|
@@ -21387,7 +21388,7 @@ function registerTicketTools(server, config2) {
|
|
|
21387
21388
|
description: "Create a new Freshservice ticket. Either `email` or `requester_id` must be provided.",
|
|
21388
21389
|
inputSchema: external_exports.object({
|
|
21389
21390
|
subject: external_exports.string().min(1).describe("Ticket subject / title"),
|
|
21390
|
-
description: external_exports.string().optional().describe(
|
|
21391
|
+
description: external_exports.string().optional().describe(`Ticket description. ${HTML_FIELD_HINT}`),
|
|
21391
21392
|
email: external_exports.string().email().optional().describe("Requester email address"),
|
|
21392
21393
|
requester_id: external_exports.number().int().positive().optional().describe("Requester agent/user ID"),
|
|
21393
21394
|
priority: external_exports.enum(["1", "2", "3", "4"]).optional().describe("Priority: 1=Low, 2=Medium, 3=High, 4=Urgent (default: 2)"),
|
|
@@ -21396,10 +21397,14 @@ function registerTicketTools(server, config2) {
|
|
|
21396
21397
|
responder_id: external_exports.number().int().positive().optional().describe("Agent ID to assign to"),
|
|
21397
21398
|
tags: external_exports.array(external_exports.string()).optional().describe("List of tags"),
|
|
21398
21399
|
type: external_exports.string().optional().describe("Ticket type, e.g. Incident, Service Request"),
|
|
21400
|
+
category: external_exports.string().optional().describe(
|
|
21401
|
+
"Ticket category. Required on Freshservice instances where the category field is mandatory (create_ticket fails with a 400 validation error listing the allowed values if omitted on such instances)."
|
|
21402
|
+
),
|
|
21403
|
+
sub_category: external_exports.string().optional().describe("Ticket sub-category. Only meaningful together with `category`."),
|
|
21399
21404
|
cc_emails: external_exports.array(external_exports.string().email()).optional().describe("CC email addresses")
|
|
21400
21405
|
})
|
|
21401
21406
|
},
|
|
21402
|
-
async ({ subject, description, email: email2, requester_id, priority, status, group_id, responder_id, tags, type, cc_emails }) => {
|
|
21407
|
+
async ({ subject, description, email: email2, requester_id, priority, status, group_id, responder_id, tags, type, category, sub_category, cc_emails }) => {
|
|
21403
21408
|
const ticket = await createTicket(config2, {
|
|
21404
21409
|
subject,
|
|
21405
21410
|
description,
|
|
@@ -21411,6 +21416,8 @@ function registerTicketTools(server, config2) {
|
|
|
21411
21416
|
responder_id,
|
|
21412
21417
|
tags,
|
|
21413
21418
|
type,
|
|
21419
|
+
category,
|
|
21420
|
+
sub_category,
|
|
21414
21421
|
cc_emails
|
|
21415
21422
|
});
|
|
21416
21423
|
const result = normalizeTicket(ticket, DEFAULT_STATUS_MAP);
|
|
@@ -21434,7 +21441,7 @@ ${JSON.stringify(result, null, 2)}`
|
|
|
21434
21441
|
inputSchema: external_exports.object({
|
|
21435
21442
|
ticket_id: external_exports.number().int().positive().describe("Freshservice ticket ID"),
|
|
21436
21443
|
subject: external_exports.string().optional().describe("New subject"),
|
|
21437
|
-
description: external_exports.string().optional().describe(
|
|
21444
|
+
description: external_exports.string().optional().describe(`New description. ${HTML_FIELD_HINT}`),
|
|
21438
21445
|
priority: external_exports.enum(["1", "2", "3", "4"]).optional().describe("Priority: 1=Low, 2=Medium, 3=High, 4=Urgent"),
|
|
21439
21446
|
status: external_exports.number().int().optional().describe("New status code (e.g. 2=Open, 3=Pending, 4=Resolved, 5=Closed)"),
|
|
21440
21447
|
group_id: external_exports.number().int().positive().optional().describe("Agent group ID"),
|
|
@@ -21474,7 +21481,7 @@ ${JSON.stringify(result, null, 2)}`
|
|
|
21474
21481
|
description: "Add a private note or public reply to a Freshservice ticket.",
|
|
21475
21482
|
inputSchema: external_exports.object({
|
|
21476
21483
|
ticket_id: external_exports.number().int().positive().describe("Freshservice ticket ID"),
|
|
21477
|
-
body: external_exports.string().min(1).describe(
|
|
21484
|
+
body: external_exports.string().min(1).describe(`Note or reply body. ${HTML_FIELD_HINT}`),
|
|
21478
21485
|
private: external_exports.boolean().optional().describe("true = private note (default), false = public reply visible to requester"),
|
|
21479
21486
|
notify_emails: external_exports.array(external_exports.string().email()).optional().describe("Additional email addresses to notify")
|
|
21480
21487
|
})
|