Reproduces Always
Describe the bug
A message policy intended to limit the number of emails listed (e.g., max 10) is incorrectly applied to tool calls made my obot_mcp_server. As a result, when a user who is not connected to the Gmail MCP server tries to list recent emails, the obot_search_mcp_servers tool call is blocked by the policy. This prevents the system from prompting the user to authenticate and connect to the Gmail MCP server, breaking the expected onboarding flow.
To Reproduce
Steps to reproduce the behavior:
- As an admin user, create a message policy that applies to both User Messages and Tool Calls, like
Do not allow more than 10 emails to be listed.
- As any user who is not connected to Gmail MCP server, Launch Agent.
- Start a new chat session and ask to list most recent email.
Notice that obot_search_mcp_servers tool call gets blocked by the policy created in step 1 resulting in user not being prompted to authenticate with Gmail MCP server.
Expected behavior
Policy restricting number of emails to be listed should not block users from searching for MCP servers and connecting to it.
Reproduces Always
Describe the bug
A message policy intended to limit the number of emails listed (e.g., max 10) is incorrectly applied to tool calls made my obot_mcp_server. As a result, when a user who is not connected to the Gmail MCP server tries to list recent emails, the obot_search_mcp_servers tool call is blocked by the policy. This prevents the system from prompting the user to authenticate and connect to the Gmail MCP server, breaking the expected onboarding flow.
To Reproduce
Steps to reproduce the behavior:
Do not allow more than 10 emails to be listed.Notice that
obot_search_mcp_serverstool call gets blocked by the policy created in step 1 resulting in user not being prompted to authenticate with Gmail MCP server.Expected behavior
Policy restricting number of emails to be listed should not block users from searching for MCP servers and connecting to it.