@payloadcms/plugin-mcp 3.77.0-canary.8 → 3.77.0-internal-debug.98d2e4d
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/mcp/getMcpHandler.d.ts.map +1 -1
- package/dist/mcp/getMcpHandler.js +8 -4
- package/dist/mcp/getMcpHandler.js.map +1 -1
- package/dist/mcp/tools/auth/auth.d.ts.map +1 -1
- package/dist/mcp/tools/auth/auth.js +4 -1
- package/dist/mcp/tools/auth/auth.js.map +1 -1
- package/dist/mcp/tools/auth/forgotPassword.d.ts.map +1 -1
- package/dist/mcp/tools/auth/forgotPassword.js +4 -1
- package/dist/mcp/tools/auth/forgotPassword.js.map +1 -1
- package/dist/mcp/tools/auth/login.d.ts.map +1 -1
- package/dist/mcp/tools/auth/login.js +4 -1
- package/dist/mcp/tools/auth/login.js.map +1 -1
- package/dist/mcp/tools/auth/resetPassword.d.ts.map +1 -1
- package/dist/mcp/tools/auth/resetPassword.js +4 -1
- package/dist/mcp/tools/auth/resetPassword.js.map +1 -1
- package/dist/mcp/tools/auth/unlock.d.ts.map +1 -1
- package/dist/mcp/tools/auth/unlock.js +4 -1
- package/dist/mcp/tools/auth/unlock.js.map +1 -1
- package/dist/mcp/tools/auth/verify.d.ts.map +1 -1
- package/dist/mcp/tools/auth/verify.js +4 -1
- package/dist/mcp/tools/auth/verify.js.map +1 -1
- package/dist/mcp/tools/collection/create.d.ts.map +1 -1
- package/dist/mcp/tools/collection/create.js +4 -1
- package/dist/mcp/tools/collection/create.js.map +1 -1
- package/dist/mcp/tools/collection/delete.d.ts.map +1 -1
- package/dist/mcp/tools/collection/delete.js +4 -1
- package/dist/mcp/tools/collection/delete.js.map +1 -1
- package/dist/mcp/tools/collection/find.d.ts.map +1 -1
- package/dist/mcp/tools/collection/find.js +4 -1
- package/dist/mcp/tools/collection/find.js.map +1 -1
- package/dist/mcp/tools/collection/update.d.ts.map +1 -1
- package/dist/mcp/tools/collection/update.js +4 -1
- package/dist/mcp/tools/collection/update.js.map +1 -1
- package/dist/mcp/tools/config/find.d.ts.map +1 -1
- package/dist/mcp/tools/config/find.js +4 -1
- package/dist/mcp/tools/config/find.js.map +1 -1
- package/dist/mcp/tools/config/update.d.ts.map +1 -1
- package/dist/mcp/tools/config/update.js +4 -1
- package/dist/mcp/tools/config/update.js.map +1 -1
- package/dist/mcp/tools/global/find.d.ts.map +1 -1
- package/dist/mcp/tools/global/find.js +4 -1
- package/dist/mcp/tools/global/find.js.map +1 -1
- package/dist/mcp/tools/global/update.d.ts.map +1 -1
- package/dist/mcp/tools/global/update.js +4 -1
- package/dist/mcp/tools/global/update.js.map +1 -1
- package/dist/mcp/tools/job/create.d.ts.map +1 -1
- package/dist/mcp/tools/job/create.js +4 -1
- package/dist/mcp/tools/job/create.js.map +1 -1
- package/dist/mcp/tools/job/run.d.ts.map +1 -1
- package/dist/mcp/tools/job/run.js +4 -1
- package/dist/mcp/tools/job/run.js.map +1 -1
- package/dist/mcp/tools/job/update.d.ts.map +1 -1
- package/dist/mcp/tools/job/update.js +4 -1
- package/dist/mcp/tools/job/update.js.map +1 -1
- package/dist/mcp/tools/resource/create.d.ts.map +1 -1
- package/dist/mcp/tools/resource/create.js +4 -1
- package/dist/mcp/tools/resource/create.js.map +1 -1
- package/dist/mcp/tools/resource/delete.d.ts.map +1 -1
- package/dist/mcp/tools/resource/delete.js +4 -1
- package/dist/mcp/tools/resource/delete.js.map +1 -1
- package/dist/mcp/tools/resource/find.d.ts.map +1 -1
- package/dist/mcp/tools/resource/find.js +4 -1
- package/dist/mcp/tools/resource/find.js.map +1 -1
- package/dist/mcp/tools/resource/update.d.ts.map +1 -1
- package/dist/mcp/tools/resource/update.js +4 -1
- package/dist/mcp/tools/resource/update.js.map +1 -1
- package/dist/types.d.ts +11 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +5 -5
- package/src/mcp/getMcpHandler.ts +9 -6
- package/src/mcp/tools/auth/auth.ts +5 -3
- package/src/mcp/tools/auth/forgotPassword.ts +5 -3
- package/src/mcp/tools/auth/login.ts +5 -3
- package/src/mcp/tools/auth/resetPassword.ts +5 -3
- package/src/mcp/tools/auth/unlock.ts +5 -3
- package/src/mcp/tools/auth/verify.ts +5 -3
- package/src/mcp/tools/collection/create.ts +5 -3
- package/src/mcp/tools/collection/delete.ts +5 -3
- package/src/mcp/tools/collection/find.ts +5 -3
- package/src/mcp/tools/collection/update.ts +5 -3
- package/src/mcp/tools/config/find.ts +5 -3
- package/src/mcp/tools/config/update.ts +5 -3
- package/src/mcp/tools/global/find.ts +5 -3
- package/src/mcp/tools/global/update.ts +5 -3
- package/src/mcp/tools/job/create.ts +5 -3
- package/src/mcp/tools/job/run.ts +5 -3
- package/src/mcp/tools/job/update.ts +6 -3
- package/src/mcp/tools/resource/create.ts +5 -3
- package/src/mcp/tools/resource/delete.ts +5 -3
- package/src/mcp/tools/resource/find.ts +5 -3
- package/src/mcp/tools/resource/update.ts +5 -3
- package/src/types.ts +11 -2
|
@@ -204,10 +204,12 @@ ${JSON.stringify(errors, null, 2)}
|
|
|
204
204
|
}
|
|
205
205
|
|
|
206
206
|
if (collections?.[collectionSlug]?.enabled) {
|
|
207
|
-
server.
|
|
207
|
+
server.registerTool(
|
|
208
208
|
`delete${collectionSlug.charAt(0).toUpperCase() + toCamelCase(collectionSlug).slice(1)}`,
|
|
209
|
-
|
|
210
|
-
|
|
209
|
+
{
|
|
210
|
+
description: `${collections?.[collectionSlug]?.description || toolSchemas.deleteResource.description.trim()}`,
|
|
211
|
+
inputSchema: toolSchemas.deleteResource.parameters.shape,
|
|
212
|
+
},
|
|
211
213
|
async ({ id, depth, fallbackLocale, locale, where }) => {
|
|
212
214
|
return await tool(id, where, depth, locale, fallbackLocale)
|
|
213
215
|
},
|
|
@@ -221,10 +221,12 @@ Page: ${result.page} of ${result.totalPages}
|
|
|
221
221
|
}
|
|
222
222
|
|
|
223
223
|
if (collections?.[collectionSlug]?.enabled) {
|
|
224
|
-
server.
|
|
224
|
+
server.registerTool(
|
|
225
225
|
`find${collectionSlug.charAt(0).toUpperCase() + toCamelCase(collectionSlug).slice(1)}`,
|
|
226
|
-
|
|
227
|
-
|
|
226
|
+
{
|
|
227
|
+
description: `${collections?.[collectionSlug]?.description || toolSchemas.findResources.description.trim()}`,
|
|
228
|
+
inputSchema: toolSchemas.findResources.parameters.shape,
|
|
229
|
+
},
|
|
228
230
|
async ({ id, depth, draft, fallbackLocale, limit, locale, page, select, sort, where }) => {
|
|
229
231
|
return await tool(
|
|
230
232
|
id,
|
|
@@ -335,10 +335,12 @@ ${JSON.stringify(errors, null, 2)}
|
|
|
335
335
|
.describe('JSON string for where clause to update multiple documents'),
|
|
336
336
|
})
|
|
337
337
|
|
|
338
|
-
server.
|
|
338
|
+
server.registerTool(
|
|
339
339
|
`update${collectionSlug.charAt(0).toUpperCase() + toCamelCase(collectionSlug).slice(1)}`,
|
|
340
|
-
|
|
341
|
-
|
|
340
|
+
{
|
|
341
|
+
description: `${collections?.[collectionSlug]?.description || toolSchemas.updateResource.description.trim()}`,
|
|
342
|
+
inputSchema: updateResourceSchema.shape,
|
|
343
|
+
},
|
|
342
344
|
async (params: Record<string, unknown>) => {
|
|
343
345
|
const {
|
|
344
346
|
id,
|
package/src/types.ts
CHANGED
|
@@ -342,17 +342,26 @@ export type MCPHandlerOptions = {
|
|
|
342
342
|
* @default /api
|
|
343
343
|
*/
|
|
344
344
|
basePath?: string
|
|
345
|
+
/**
|
|
346
|
+
* If true, disables the SSE endpoint. Only Streamable HTTP will be available.
|
|
347
|
+
* @default true
|
|
348
|
+
*/
|
|
349
|
+
disableSse?: boolean
|
|
345
350
|
/**
|
|
346
351
|
* Set the maximum duration of the MCP handler. This is the maximum duration that the MCP handler will run for.
|
|
347
352
|
* @default 60
|
|
348
353
|
*/
|
|
349
354
|
maxDuration?: number
|
|
355
|
+
/**
|
|
356
|
+
* Callback function that receives MCP events.
|
|
357
|
+
* This can be used to track analytics, debug issues, or implement custom behaviors.
|
|
358
|
+
*/
|
|
359
|
+
onEvent?: (event: unknown) => void
|
|
350
360
|
/**
|
|
351
361
|
* Set the Redis URL for the MCP handler. This is the URL that will be used to access the Redis server.
|
|
352
362
|
* @default process.env.REDIS_URL
|
|
353
|
-
* INFO: Disabled until developer clarity is reached for server side streaming and we have an auth pattern for all SSE patterns
|
|
354
363
|
*/
|
|
355
|
-
|
|
364
|
+
redisUrl?: string
|
|
356
365
|
/**
|
|
357
366
|
* Set verbose logging.
|
|
358
367
|
* @default false
|