Skip to content

feature: Generic request / response checking with nemo checks #35

@evaline-ju

Description

@evaline-ju

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions