Skip to content

Conversation

@kendelljoseph
Copy link
Contributor

@kendelljoseph kendelljoseph commented Nov 17, 2025

In order to be able to use the payload object or the same access control strategy in our custom tools without having to do additional lookups, we now included a req in the custom tool handlers.

  • Adds a req to the custom tool handlers.

Previously handlers did not include a req argument:

handler: async (args: Record<string, unknown>) => {}

Now they do!

handler: async (args: Record<string, unknown>, req:PayloadRequest, _extra) => {}
@kendelljoseph kendelljoseph self-assigned this Nov 17, 2025
@kendelljoseph kendelljoseph changed the title feat(plugin-mcp): Adds a PayloadRequest to custom tool handlers feat(plugin-mcp): adds a PayloadRequest to custom tool handlers Nov 17, 2025
@kendelljoseph kendelljoseph changed the title feat(plugin-mcp): adds a PayloadRequest to custom tool handlers feat(mcp-plugin): adds a PayloadRequest to custom tool handlers Nov 17, 2025
@kendelljoseph kendelljoseph changed the title feat(mcp-plugin): adds a PayloadRequest to custom tool handlers feat(plugin-mcp): adds a PayloadRequest to custom tool handlers Nov 17, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 17, 2025

📦 esbuild Bundle Analysis for payload

This analysis was generated by esbuild-bundle-analyzer. 🤖
This PR introduced no changes to the esbuild bundle! 🙌

@kendelljoseph kendelljoseph marked this pull request as ready for review November 17, 2025 19:36
Copy link
Contributor

@DanRibbens DanRibbens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it too late to move to arg objects or would it be breaking?

@kendelljoseph kendelljoseph changed the title feat(plugin-mcp): adds a PayloadRequest to custom tool handlers feat(plugin-mcp): adds a PayloadRequest to custom tool, prompt, and resource handlers Nov 17, 2025
@DanRibbens DanRibbens merged commit 0d14b06 into main Nov 20, 2025
95 checks passed
@DanRibbens DanRibbens deleted the feat/mcp-plugin-handler-req branch November 20, 2025 17:51
@github-actions
Copy link
Contributor

🚀 This is included in version v3.65.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment