@softeria/ms-365-mcp-server 0.180.6 → 0.181.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/dist/__tests__/graph-tools.test.js +140 -0
- package/dist/endpoints.json +11 -4
- package/dist/graph-tools.js +57 -3
- package/dist/lib/param-descriptions.js +2 -0
- package/dist/lib/tool-schema.js +14 -1
- package/package.json +1 -1
- package/src/endpoints.json +11 -4
|
@@ -1407,6 +1407,146 @@ describe("graph-tools", () => {
|
|
|
1407
1407
|
expect(path).toContain("$top=5");
|
|
1408
1408
|
expect(path).toContain("$skiptoken=tok");
|
|
1409
1409
|
});
|
|
1410
|
+
it("points a deltaToken tool at token when skiptoken gets a token= link", async () => {
|
|
1411
|
+
mockEndpoints.push(makeEndpoint({ alias: "drive-delta", path: "/me/drive/delta()" }));
|
|
1412
|
+
mockEndpointsJson = [
|
|
1413
|
+
makeConfig({ toolName: "drive-delta", pathPattern: "/me/drive/delta()", deltaToken: true })
|
|
1414
|
+
];
|
|
1415
|
+
const graphClient = createMockGraphClient();
|
|
1416
|
+
const server = createMockServer();
|
|
1417
|
+
const { registerGraphTools } = await loadModule();
|
|
1418
|
+
registerGraphTools(server, graphClient);
|
|
1419
|
+
const result = await server.tools.get("drive-delta").handler({
|
|
1420
|
+
skiptoken: "https://graph.microsoft.com/v1.0/me/drive/delta?token=abc"
|
|
1421
|
+
});
|
|
1422
|
+
const payload = JSON.parse(result.content[0].text);
|
|
1423
|
+
expect(payload.error).toBe("invalid_skiptoken");
|
|
1424
|
+
expect(payload.message).toContain("pass that link as token");
|
|
1425
|
+
expect(graphClient.graphRequest).not.toHaveBeenCalled();
|
|
1426
|
+
});
|
|
1427
|
+
});
|
|
1428
|
+
describe("delta token", () => {
|
|
1429
|
+
const deltaEndpoint = () => makeEndpoint({
|
|
1430
|
+
alias: "items-delta",
|
|
1431
|
+
path: "/sites/:siteId/lists/:listId/items/delta()",
|
|
1432
|
+
parameters: [
|
|
1433
|
+
{ name: "select", type: "Query", schema: z.string().optional() },
|
|
1434
|
+
{ name: "expand", type: "Query", schema: z.string().optional() },
|
|
1435
|
+
{ name: "top", type: "Query", schema: z.number().optional() }
|
|
1436
|
+
]
|
|
1437
|
+
});
|
|
1438
|
+
const register = async (deltaToken) => {
|
|
1439
|
+
mockEndpoints.push(deltaEndpoint());
|
|
1440
|
+
mockEndpointsJson = [
|
|
1441
|
+
makeConfig({
|
|
1442
|
+
toolName: "items-delta",
|
|
1443
|
+
pathPattern: "/sites/{site-id}/lists/{list-id}/items/delta()",
|
|
1444
|
+
queryParams: ["select", "expand", "top"],
|
|
1445
|
+
...deltaToken === void 0 ? {} : { deltaToken }
|
|
1446
|
+
})
|
|
1447
|
+
];
|
|
1448
|
+
const graphClient = createMockGraphClient();
|
|
1449
|
+
const server = createMockServer();
|
|
1450
|
+
const { registerGraphTools } = await loadModule();
|
|
1451
|
+
registerGraphTools(server, graphClient);
|
|
1452
|
+
return { server, graphClient };
|
|
1453
|
+
};
|
|
1454
|
+
const callForResult = async (args) => {
|
|
1455
|
+
const { server, graphClient } = await register(true);
|
|
1456
|
+
const result = await server.tools.get("items-delta").handler({
|
|
1457
|
+
siteId: "s1",
|
|
1458
|
+
listId: "l1",
|
|
1459
|
+
...args
|
|
1460
|
+
});
|
|
1461
|
+
return { result, graphClient };
|
|
1462
|
+
};
|
|
1463
|
+
const callWith = async (args) => {
|
|
1464
|
+
const { result, graphClient } = await callForResult(args);
|
|
1465
|
+
expect(result.isError).not.toBe(true);
|
|
1466
|
+
return graphClient.graphRequest.mock.calls[0][0];
|
|
1467
|
+
};
|
|
1468
|
+
it("advertises token on a deltaToken tool", async () => {
|
|
1469
|
+
const { server } = await register(true);
|
|
1470
|
+
expect(server.tools.get("items-delta").schema.token).toBeDefined();
|
|
1471
|
+
});
|
|
1472
|
+
it.each([void 0, false])("omits token when deltaToken is %s", async (flag) => {
|
|
1473
|
+
const { server } = await register(flag);
|
|
1474
|
+
expect(server.tools.get("items-delta").schema.token).toBeUndefined();
|
|
1475
|
+
});
|
|
1476
|
+
it("shows token in discovery mode only on a deltaToken tool", async () => {
|
|
1477
|
+
const { describeToolSchema } = await import("../lib/tool-schema.js");
|
|
1478
|
+
const names = (deltaToken) => describeToolSchema(deltaEndpoint(), {
|
|
1479
|
+
queryParams: ["select", "expand", "top"],
|
|
1480
|
+
deltaToken
|
|
1481
|
+
}).parameters.map((p) => p.name);
|
|
1482
|
+
expect(names(true)).toContain("token");
|
|
1483
|
+
expect(names()).not.toContain("token");
|
|
1484
|
+
});
|
|
1485
|
+
it("sends a bare token as token=", async () => {
|
|
1486
|
+
const path = await callWith({ token: "abc123" });
|
|
1487
|
+
expect(path).toBe("/sites/s1/lists/l1/items/delta()?token=abc123");
|
|
1488
|
+
});
|
|
1489
|
+
it("sends latest as token=latest", async () => {
|
|
1490
|
+
const path = await callWith({ token: "latest" });
|
|
1491
|
+
expect(path).toContain("?token=latest");
|
|
1492
|
+
});
|
|
1493
|
+
it("reads the token out of a whole @odata.deltaLink", async () => {
|
|
1494
|
+
const path = await callWith({
|
|
1495
|
+
token: "https://graph.microsoft.com/v1.0/sites/s1/lists/l1/items/delta?token=MzslMjM0OyUyMzE7Mw"
|
|
1496
|
+
});
|
|
1497
|
+
expect(path).toBe("/sites/s1/lists/l1/items/delta()?token=MzslMjM0OyUyMzE7Mw");
|
|
1498
|
+
});
|
|
1499
|
+
it("reads the token out of a @odata.nextLink with params after it", async () => {
|
|
1500
|
+
const path = await callWith({
|
|
1501
|
+
token: "https://graph.microsoft.com/v1.0/sites/s1/lists/l1/items/delta?token=tok1&$top=5",
|
|
1502
|
+
top: 5
|
|
1503
|
+
});
|
|
1504
|
+
expect(path).toContain("token=tok1");
|
|
1505
|
+
expect(path).not.toContain("tok1%26");
|
|
1506
|
+
expect(path).not.toContain("graph.microsoft.com");
|
|
1507
|
+
});
|
|
1508
|
+
it.each([
|
|
1509
|
+
["token=tok1", "tok1"],
|
|
1510
|
+
["https://graph.microsoft.com/v1.0/me/drive/root/delta(token='tok1')", "tok1"],
|
|
1511
|
+
["https://graph.microsoft.com/v1.0/me/drive/root/delta?(token='tok1')", "tok1"],
|
|
1512
|
+
["https://graph.microsoft.com/v1.0/me/drive/delta(token=tok1)", "tok1"]
|
|
1513
|
+
])("reads the token out of %s", async (value, expected) => {
|
|
1514
|
+
const path = await callWith({ token: value });
|
|
1515
|
+
expect(path).toContain(`?token=${expected}`);
|
|
1516
|
+
expect(path).not.toContain("'");
|
|
1517
|
+
});
|
|
1518
|
+
it("percent-decodes a token copied out of a link once, so it is not encoded twice", async () => {
|
|
1519
|
+
const path = await callWith({
|
|
1520
|
+
token: "https://graph.microsoft.com/v1.0/sites/delta?token=a%2Bb%3D%3D"
|
|
1521
|
+
});
|
|
1522
|
+
expect(path).toContain("token=a%2Bb%3D%3D");
|
|
1523
|
+
expect(path).not.toContain("%25");
|
|
1524
|
+
});
|
|
1525
|
+
it("does not read a $deltatoken or $skiptoken as token=", async () => {
|
|
1526
|
+
const path = await callWith({
|
|
1527
|
+
token: "https://graph.microsoft.com/v1.0/sites/delta?$deltatoken=dt1"
|
|
1528
|
+
});
|
|
1529
|
+
expect(path).toContain("$deltatoken=dt1");
|
|
1530
|
+
expect(path).not.toContain("?token=");
|
|
1531
|
+
});
|
|
1532
|
+
it.each(["", " "])("sends no token when blank (%j)", async (blank) => {
|
|
1533
|
+
const path = await callWith({ token: blank });
|
|
1534
|
+
expect(path).not.toContain("token");
|
|
1535
|
+
});
|
|
1536
|
+
it.each([
|
|
1537
|
+
"https://graph.microsoft.com/v1.0/sites/s1/lists/l1/items/delta?$top=5",
|
|
1538
|
+
"https://graph.microsoft.com/v1.0/sites/s1/lists/l1/items/delta?token=&$top=5"
|
|
1539
|
+
])("refuses a link with no token to resume from: %s", async (link) => {
|
|
1540
|
+
const { result, graphClient } = await callForResult({ token: link });
|
|
1541
|
+
expect(result.isError).toBe(true);
|
|
1542
|
+
expect(JSON.parse(result.content[0].text).error).toBe("invalid_delta_token");
|
|
1543
|
+
expect(graphClient.graphRequest).not.toHaveBeenCalled();
|
|
1544
|
+
});
|
|
1545
|
+
it("drops token on a tool without deltaToken", async () => {
|
|
1546
|
+
const { server, graphClient } = await register(void 0);
|
|
1547
|
+
await server.tools.get("items-delta").handler({ siteId: "s1", listId: "l1", token: "x" });
|
|
1548
|
+
expect(graphClient.graphRequest.mock.calls[0][0]).not.toContain("token");
|
|
1549
|
+
});
|
|
1410
1550
|
});
|
|
1411
1551
|
describe("fetchAllPages pagination", () => {
|
|
1412
1552
|
it("should follow @odata.nextLink and combine results", async () => {
|
package/dist/endpoints.json
CHANGED
|
@@ -739,7 +739,8 @@
|
|
|
739
739
|
"presets": ["files", "onedrive", "personal"],
|
|
740
740
|
"scopes": ["Files.Read"],
|
|
741
741
|
"appScopes": [["Files.Read.All"], ["Sites.Read.All"], ["Sites.Selected"]],
|
|
742
|
-
"
|
|
742
|
+
"deltaToken": true,
|
|
743
|
+
"llmTip": "Tracks changes to a driveItem and its children over time. Returns a collection of driveItems that have been created, modified, or deleted. Use get-drive-root-item first to get the root driveItem-id, then pass it here. Supports $select. For incremental sync, pass the @odata.deltaLink from the last page as token on the next call."
|
|
743
744
|
},
|
|
744
745
|
{
|
|
745
746
|
"pathPattern": "/drives/{drive-id}/root",
|
|
@@ -2381,7 +2382,8 @@
|
|
|
2381
2382
|
"presets": ["work"],
|
|
2382
2383
|
"workScopes": [["Sites.Read.All"], ["Sites.Selected"]],
|
|
2383
2384
|
"appScopes": [["Sites.Read.All"], ["Sites.Selected"]],
|
|
2384
|
-
"queryParams": ["select", "expand", "top"]
|
|
2385
|
+
"queryParams": ["select", "expand", "top"],
|
|
2386
|
+
"deltaToken": true
|
|
2385
2387
|
},
|
|
2386
2388
|
{
|
|
2387
2389
|
"pathPattern": "/sites/{site-id}/lists/{list-id}/items/{listItem-id}/versions",
|
|
@@ -2506,7 +2508,8 @@
|
|
|
2506
2508
|
"toolName": "get-sharepoint-sites-delta",
|
|
2507
2509
|
"presets": ["work"],
|
|
2508
2510
|
"workScopes": ["Sites.Read.All"],
|
|
2509
|
-
"appScopes": [["Sites.Read.All"], ["Sites.FullControl.All"], ["Sites.Manage.All"]]
|
|
2511
|
+
"appScopes": [["Sites.Read.All"], ["Sites.FullControl.All"], ["Sites.Manage.All"]],
|
|
2512
|
+
"deltaToken": true
|
|
2510
2513
|
},
|
|
2511
2514
|
{
|
|
2512
2515
|
"pathPattern": "/search/query",
|
|
@@ -2652,7 +2655,11 @@
|
|
|
2652
2655
|
"presets": ["teams", "work"],
|
|
2653
2656
|
"workScopes": ["CallTranscripts.Read.All"],
|
|
2654
2657
|
"acceptType": "text/vtt",
|
|
2655
|
-
"
|
|
2658
|
+
"acceptFallback": {
|
|
2659
|
+
"innerErrorCode": "SpeakerAttributionNotAllowed",
|
|
2660
|
+
"accept": "application/vnd.microsoft.graph.transcript+text"
|
|
2661
|
+
},
|
|
2662
|
+
"llmTip": "Returns the transcript of an ad hoc call as WebVTT with speaker tags and timestamps. Take adhocCallId (the callId) and callTranscriptId (the id) from list-adhoc-call-transcripts; copy both exactly. Falls back to text without speaker names when the tenant disables speaker attribution."
|
|
2656
2663
|
},
|
|
2657
2664
|
{
|
|
2658
2665
|
"pathPattern": "/me/onlineMeetings/{onlineMeeting-id}/recordings",
|
package/dist/graph-tools.js
CHANGED
|
@@ -48,6 +48,7 @@ import {
|
|
|
48
48
|
getMaxPages,
|
|
49
49
|
isFetchAllPagesApplicable,
|
|
50
50
|
isSkiptokenApplicable,
|
|
51
|
+
DELTA_TOKEN_PARAM_DESCRIPTION,
|
|
51
52
|
MEMBER_NAME_PARAM_DESCRIPTION,
|
|
52
53
|
paginationAllowed,
|
|
53
54
|
positiveIntFromEnv,
|
|
@@ -312,7 +313,7 @@ function normalizeSearchQueryParam(queryParams, path2, toolAlias) {
|
|
|
312
313
|
queryParams["$search"] = normalized;
|
|
313
314
|
}
|
|
314
315
|
}
|
|
315
|
-
function normalizeSkiptokenQueryParam(queryParams, toolAlias) {
|
|
316
|
+
function normalizeSkiptokenQueryParam(queryParams, toolAlias, deltaToken = false) {
|
|
316
317
|
const raw = queryParams["$skiptoken"];
|
|
317
318
|
if (raw === void 0) return;
|
|
318
319
|
delete queryParams["$skiptoken"];
|
|
@@ -327,7 +328,7 @@ function normalizeSkiptokenQueryParam(queryParams, toolAlias) {
|
|
|
327
328
|
text: JSON.stringify({
|
|
328
329
|
error: "invalid_skiptoken",
|
|
329
330
|
tool: toolAlias,
|
|
330
|
-
message: "The value passed as skiptoken has no $skiptoken or $skip to page with.
|
|
331
|
+
message: "The value passed as skiptoken has no $skiptoken or $skip to page with." + (deltaToken ? " This tool pages and resumes with a token= link: pass that link as token instead of skiptoken." : " Delta tools that page with a token= link take it in their token parameter, where they have one.") + (paginationAllowed() ? " Remove skiptoken and retry with fetchAllPages set to true to follow the link, or remove it for the first page." : " Remove skiptoken and retry for the first page.")
|
|
331
332
|
})
|
|
332
333
|
}
|
|
333
334
|
],
|
|
@@ -356,6 +357,47 @@ function normalizeSkiptokenQueryParam(queryParams, toolAlias) {
|
|
|
356
357
|
}
|
|
357
358
|
queryParams["$skiptoken"] = token;
|
|
358
359
|
}
|
|
360
|
+
function normalizeDeltaTokenParam(raw, queryParams, toolAlias) {
|
|
361
|
+
if (raw === void 0 || raw === null) return;
|
|
362
|
+
let token = `${raw}`.trim();
|
|
363
|
+
if (token === "") return;
|
|
364
|
+
const invalidToken = () => {
|
|
365
|
+
logger.warn(`Refusing ${toolAlias}: 'token' has no token value to resume from`);
|
|
366
|
+
return {
|
|
367
|
+
content: [
|
|
368
|
+
{
|
|
369
|
+
type: "text",
|
|
370
|
+
text: JSON.stringify({
|
|
371
|
+
error: "invalid_delta_token",
|
|
372
|
+
tool: toolAlias,
|
|
373
|
+
message: "The value passed as token has no token= value. Pass the @odata.nextLink or @odata.deltaLink this tool returned, the bare token from it, or latest. Remove token to enumerate from the start."
|
|
374
|
+
})
|
|
375
|
+
}
|
|
376
|
+
],
|
|
377
|
+
isError: true
|
|
378
|
+
};
|
|
379
|
+
};
|
|
380
|
+
const marker = token.match(/(?:^|[?&(,])token=(?:'([^']*)'|([^&)#']*))/i);
|
|
381
|
+
if (marker) {
|
|
382
|
+
token = marker[1] ?? marker[2];
|
|
383
|
+
} else if (/:\/\/|[?(]/.test(token)) {
|
|
384
|
+
const deltatoken = token.match(/(?:^|[?&])(?:\$|%24)deltatoken=([^&#]*)/i)?.[1];
|
|
385
|
+
if (!deltatoken) return invalidToken();
|
|
386
|
+
queryParams["$deltatoken"] = decodeOnce(deltatoken);
|
|
387
|
+
return;
|
|
388
|
+
}
|
|
389
|
+
if (token === "") return invalidToken();
|
|
390
|
+
queryParams["token"] = decodeOnce(token);
|
|
391
|
+
}
|
|
392
|
+
function decodeOnce(value) {
|
|
393
|
+
if (!value.includes("%")) return value;
|
|
394
|
+
try {
|
|
395
|
+
return decodeURIComponent(value);
|
|
396
|
+
} catch {
|
|
397
|
+
logger.warn("Delta token looks percent-encoded but could not be decoded; sending as-is");
|
|
398
|
+
return value;
|
|
399
|
+
}
|
|
400
|
+
}
|
|
359
401
|
const DEFAULT_MAX_ITEMS = 1e4;
|
|
360
402
|
function isConfirmGateEnabled() {
|
|
361
403
|
return process.env.MS365_MCP_REQUIRE_CONFIRM === "true";
|
|
@@ -1888,6 +1930,7 @@ async function executeGraphTool(tool, config, graphClient, params, authManager,
|
|
|
1888
1930
|
for (const [paramName, paramValue] of Object.entries(params)) {
|
|
1889
1931
|
if (paramName === "fileName" && config?.blobOutput) continue;
|
|
1890
1932
|
if (paramName === "name" && config?.nameFilter) continue;
|
|
1933
|
+
if (paramName === "token" && config?.deltaToken) continue;
|
|
1891
1934
|
if ([
|
|
1892
1935
|
"account",
|
|
1893
1936
|
"confirm",
|
|
@@ -2082,8 +2125,16 @@ async function executeGraphTool(tool, config, graphClient, params, authManager,
|
|
|
2082
2125
|
}
|
|
2083
2126
|
body = rewritten.body;
|
|
2084
2127
|
}
|
|
2085
|
-
const skiptokenError = normalizeSkiptokenQueryParam(
|
|
2128
|
+
const skiptokenError = normalizeSkiptokenQueryParam(
|
|
2129
|
+
queryParams,
|
|
2130
|
+
tool.alias,
|
|
2131
|
+
config?.deltaToken
|
|
2132
|
+
);
|
|
2086
2133
|
if (skiptokenError) return skiptokenError;
|
|
2134
|
+
if (config?.deltaToken) {
|
|
2135
|
+
const deltaTokenError = normalizeDeltaTokenParam(params.token, queryParams, tool.alias);
|
|
2136
|
+
if (deltaTokenError) return deltaTokenError;
|
|
2137
|
+
}
|
|
2087
2138
|
clampTopQueryParam(queryParams);
|
|
2088
2139
|
const searchError = normalizeSearchQueryParam(queryParams, tool.path, tool.alias);
|
|
2089
2140
|
if (searchError) return searchError;
|
|
@@ -2469,6 +2520,9 @@ function registerGraphToolWithMcp(server, tool, endpointConfig, graphClient, opt
|
|
|
2469
2520
|
if (isSkiptokenApplicable(tool, Object.keys(paramSchema), endpointConfig)) {
|
|
2470
2521
|
paramSchema["skiptoken"] = z.string().optional().describe(SKIPTOKEN_PARAM_DESCRIPTION);
|
|
2471
2522
|
}
|
|
2523
|
+
if (endpointConfig?.deltaToken) {
|
|
2524
|
+
paramSchema["token"] = z.string().optional().describe(DELTA_TOKEN_PARAM_DESCRIPTION);
|
|
2525
|
+
}
|
|
2472
2526
|
if (multiAccount) {
|
|
2473
2527
|
paramSchema["account"] = z.string().optional().describe(getAccountParamDescription(accountNames));
|
|
2474
2528
|
}
|
|
@@ -65,6 +65,7 @@ function isSkiptokenApplicable(tool, paramNames, config) {
|
|
|
65
65
|
}
|
|
66
66
|
return false;
|
|
67
67
|
}
|
|
68
|
+
const DELTA_TOKEN_PARAM_DESCRIPTION = "Delta state to resume from: the @odata.deltaLink from the last sync to get only the changes since then, the @odata.nextLink for the next page, or latest to skip existing items and get a deltaLink for changes from now. Omit to enumerate everything.";
|
|
68
69
|
const COUNT_PARAM_DESCRIPTION = "Set true to enable advanced query mode (ConsistencyLevel: eventual). Required for complex $filter on flag/flagStatus or contains(). The response then includes @odata.count, the total for the filtered collection, which can exceed the items returned when fetchAllPages hits its page/item cap.";
|
|
69
70
|
const MEMBER_NAME_PARAM_DESCRIPTION = "Case-insensitive text to match against each member's displayName and email. Applied after $select projection, so only fields you can see are matched. Without fetchAllPages only the fetched page is filtered, and @odata.count still reports the unfiltered total.";
|
|
70
71
|
const CONFIRM_PARAM_DESCRIPTION = 'For destructive operations when the confirm gate is enabled (MS365_MCP_REQUIRE_CONFIRM=true; off by default). Set to true only after the user has explicitly approved this action. When the gate is on, calls without confirm: true return { error: "confirmation_required" } without touching user data.';
|
|
@@ -112,6 +113,7 @@ export {
|
|
|
112
113
|
CONFIRM_PARAM_DESCRIPTION,
|
|
113
114
|
COUNT_PARAM_DESCRIPTION,
|
|
114
115
|
DEFAULT_MAX_PAGES,
|
|
116
|
+
DELTA_TOKEN_PARAM_DESCRIPTION,
|
|
115
117
|
EXPAND_EXTENDED_PROPERTIES_PARAM_DESCRIPTION,
|
|
116
118
|
MEMBER_NAME_PARAM_DESCRIPTION,
|
|
117
119
|
ORDERBY_PARAM_DESCRIPTION,
|
package/dist/lib/tool-schema.js
CHANGED
|
@@ -14,7 +14,8 @@ import {
|
|
|
14
14
|
TIMEZONE_PARAM_DESCRIPTION,
|
|
15
15
|
EXPAND_EXTENDED_PROPERTIES_PARAM_DESCRIPTION,
|
|
16
16
|
getAcceptParamDescription,
|
|
17
|
-
MEMBER_NAME_PARAM_DESCRIPTION
|
|
17
|
+
MEMBER_NAME_PARAM_DESCRIPTION,
|
|
18
|
+
DELTA_TOKEN_PARAM_DESCRIPTION
|
|
18
19
|
} from "./param-descriptions.js";
|
|
19
20
|
function unwrapOptional(schema) {
|
|
20
21
|
if (schema instanceof z.ZodOptional || schema instanceof z.ZodDefault || schema instanceof z.ZodNullable) {
|
|
@@ -108,6 +109,18 @@ function describeToolSchema(tool, config, ctx = {}) {
|
|
|
108
109
|
schema: { type: "string" }
|
|
109
110
|
});
|
|
110
111
|
}
|
|
112
|
+
if (config?.deltaToken) {
|
|
113
|
+
const synthetic = {
|
|
114
|
+
name: "token",
|
|
115
|
+
in: "Query",
|
|
116
|
+
required: false,
|
|
117
|
+
description: DELTA_TOKEN_PARAM_DESCRIPTION,
|
|
118
|
+
schema: { type: "string" }
|
|
119
|
+
};
|
|
120
|
+
const existing = params.findIndex((p) => p.name === "token");
|
|
121
|
+
if (existing >= 0) params[existing] = synthetic;
|
|
122
|
+
else params.push(synthetic);
|
|
123
|
+
}
|
|
111
124
|
if (ctx.multiAccount) {
|
|
112
125
|
params.push({
|
|
113
126
|
name: "account",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@softeria/ms-365-mcp-server",
|
|
3
3
|
"mcpName": "io.github.Softeria/ms-365-mcp-server",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.181.0",
|
|
5
5
|
"description": " A Model Context Protocol (MCP) server for interacting with Microsoft 365 and Office services through the Graph API",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/index.js",
|
package/src/endpoints.json
CHANGED
|
@@ -739,7 +739,8 @@
|
|
|
739
739
|
"presets": ["files", "onedrive", "personal"],
|
|
740
740
|
"scopes": ["Files.Read"],
|
|
741
741
|
"appScopes": [["Files.Read.All"], ["Sites.Read.All"], ["Sites.Selected"]],
|
|
742
|
-
"
|
|
742
|
+
"deltaToken": true,
|
|
743
|
+
"llmTip": "Tracks changes to a driveItem and its children over time. Returns a collection of driveItems that have been created, modified, or deleted. Use get-drive-root-item first to get the root driveItem-id, then pass it here. Supports $select. For incremental sync, pass the @odata.deltaLink from the last page as token on the next call."
|
|
743
744
|
},
|
|
744
745
|
{
|
|
745
746
|
"pathPattern": "/drives/{drive-id}/root",
|
|
@@ -2381,7 +2382,8 @@
|
|
|
2381
2382
|
"presets": ["work"],
|
|
2382
2383
|
"workScopes": [["Sites.Read.All"], ["Sites.Selected"]],
|
|
2383
2384
|
"appScopes": [["Sites.Read.All"], ["Sites.Selected"]],
|
|
2384
|
-
"queryParams": ["select", "expand", "top"]
|
|
2385
|
+
"queryParams": ["select", "expand", "top"],
|
|
2386
|
+
"deltaToken": true
|
|
2385
2387
|
},
|
|
2386
2388
|
{
|
|
2387
2389
|
"pathPattern": "/sites/{site-id}/lists/{list-id}/items/{listItem-id}/versions",
|
|
@@ -2506,7 +2508,8 @@
|
|
|
2506
2508
|
"toolName": "get-sharepoint-sites-delta",
|
|
2507
2509
|
"presets": ["work"],
|
|
2508
2510
|
"workScopes": ["Sites.Read.All"],
|
|
2509
|
-
"appScopes": [["Sites.Read.All"], ["Sites.FullControl.All"], ["Sites.Manage.All"]]
|
|
2511
|
+
"appScopes": [["Sites.Read.All"], ["Sites.FullControl.All"], ["Sites.Manage.All"]],
|
|
2512
|
+
"deltaToken": true
|
|
2510
2513
|
},
|
|
2511
2514
|
{
|
|
2512
2515
|
"pathPattern": "/search/query",
|
|
@@ -2652,7 +2655,11 @@
|
|
|
2652
2655
|
"presets": ["teams", "work"],
|
|
2653
2656
|
"workScopes": ["CallTranscripts.Read.All"],
|
|
2654
2657
|
"acceptType": "text/vtt",
|
|
2655
|
-
"
|
|
2658
|
+
"acceptFallback": {
|
|
2659
|
+
"innerErrorCode": "SpeakerAttributionNotAllowed",
|
|
2660
|
+
"accept": "application/vnd.microsoft.graph.transcript+text"
|
|
2661
|
+
},
|
|
2662
|
+
"llmTip": "Returns the transcript of an ad hoc call as WebVTT with speaker tags and timestamps. Take adhocCallId (the callId) and callTranscriptId (the id) from list-adhoc-call-transcripts; copy both exactly. Falls back to text without speaker names when the tenant disables speaker attribution."
|
|
2656
2663
|
},
|
|
2657
2664
|
{
|
|
2658
2665
|
"pathPattern": "/me/onlineMeetings/{onlineMeeting-id}/recordings",
|