@softeria/ms-365-mcp-server 0.5.1 → 0.6.1
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/bin/modules/generate-mcp-tools.mjs +1 -1
- package/dist/endpoints.json +1 -1
- package/dist/generated/client.js +1082 -1139
- package/dist/graph-tools.js +23 -0
- package/package.json +1 -1
- package/src/endpoints.json +1 -1
- package/src/generated/README.md +0 -5
package/dist/graph-tools.js
CHANGED
|
@@ -82,6 +82,29 @@ export function registerGraphTools(server, graphClient, readOnly = false) {
|
|
|
82
82
|
}
|
|
83
83
|
logger.info(`Making graph request to ${path} with options: ${JSON.stringify(options)}`);
|
|
84
84
|
const response = await graphClient.graphRequest(path, options);
|
|
85
|
+
if (response && response.content && response.content.length > 0) {
|
|
86
|
+
const responseText = response.content[0].text;
|
|
87
|
+
const responseSize = responseText.length;
|
|
88
|
+
logger.info(`Response size: ${responseSize} characters`);
|
|
89
|
+
try {
|
|
90
|
+
const jsonResponse = JSON.parse(responseText);
|
|
91
|
+
if (jsonResponse.value && Array.isArray(jsonResponse.value)) {
|
|
92
|
+
logger.info(`Response contains ${jsonResponse.value.length} items`);
|
|
93
|
+
if (jsonResponse.value.length > 0 && jsonResponse.value[0].body) {
|
|
94
|
+
logger.info(`First item has body field with size: ${JSON.stringify(jsonResponse.value[0].body).length} characters`);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
if (jsonResponse['@odata.nextLink']) {
|
|
98
|
+
logger.info(`Response has pagination nextLink: ${jsonResponse['@odata.nextLink']}`);
|
|
99
|
+
}
|
|
100
|
+
const preview = responseText.substring(0, 500);
|
|
101
|
+
logger.info(`Response preview: ${preview}${responseText.length > 500 ? '...' : ''}`);
|
|
102
|
+
}
|
|
103
|
+
catch (e) {
|
|
104
|
+
const preview = responseText.substring(0, 500);
|
|
105
|
+
logger.info(`Response preview (non-JSON): ${preview}${responseText.length > 500 ? '...' : ''}`);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
85
108
|
// Convert McpResponse to CallToolResult with the correct structure
|
|
86
109
|
const content = response.content.map((item) => {
|
|
87
110
|
// GraphClient only returns text content items, so create proper TextContent items
|
package/package.json
CHANGED
package/src/endpoints.json
CHANGED
|
@@ -213,7 +213,7 @@
|
|
|
213
213
|
]
|
|
214
214
|
},
|
|
215
215
|
{
|
|
216
|
-
"pathPattern": "/me/onenote/
|
|
216
|
+
"pathPattern": "/me/onenote/sections/{onenoteSection-id}/pages",
|
|
217
217
|
"method": "get",
|
|
218
218
|
"toolName": "list-onenote-section-pages",
|
|
219
219
|
"scopes": [
|
package/src/generated/README.md
CHANGED
|
@@ -2,11 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
This directory contains the generated TypeScript client for the Microsoft 365 API based on the OpenAPI specification.
|
|
4
4
|
|
|
5
|
-
> **Important Note for NPM Package Users**:
|
|
6
|
-
> The source file `client.ts` (approximately 1MB) is excluded from the npm package to reduce package size,
|
|
7
|
-
> but the compiled JavaScript file `client.js` is included. This means the package is fully functional,
|
|
8
|
-
> but you won't see the TypeScript source in the node_modules directory.
|
|
9
|
-
|
|
10
5
|
## The Evolution
|
|
11
6
|
|
|
12
7
|
### Version 1: AI-Generated Mappings
|