Skip to content

Policy blocks MCP server discovery and prevents authentication flow. #6197

@sangee2004

Description

@sangee2004

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:

  1. 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.
Image
  1. As any user who is not connected to Gmail MCP server, Launch Agent.
  2. 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.
Image

Expected behavior
Policy restricting number of emails to be listed should not block users from searching for MCP servers and connecting to it.

Metadata

Metadata

Assignees

Labels

Type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions