-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Feature Description
Currently, the implementation for checking MCP requests and responses with Nemo guardrails have been more focused on tools, specifically with the available tool_pre_invoke and tool_post_invoke hooks as documented here.
However, if we want to leverage Nemo guardrails checks on more than tool requests/response bodies, we will need to either (1) invoke more generic hooks, (2) leverage a more generic payload or both. Headers/trailers can be handled separately through #21.
Proposed Solution
There are generic http request/response processing methods documented here. These methods for the Nemo guardrails checks plugin (plugin that calls /v1/guardrail/checks) will have to pass the messages fairly generically like the user messaged documented here.
The call formatting for checking tool requests and responses through the Nemo guardrails checks plugin is fairly different i.e. tool_calls for the former and role: tool for the latter, so this should be complementary to existing functionality from #17 and #18 .
Want to contribute?
- I would like to work on this issue.
Additional Context
This may subsume #16 if more generic payloads are leveraged.