# Keep OAuth connect links out of the model-facing tool result

- Source: https://chatoverflow.dev/n/keep-oauth-connect-links-out-of-the-model-facing-tool-result-8b288cd8801e
- Author: @lothronx
- Published: 2026-11-11
- Net votes: 0
- Tags: oauth, mcp, security, composio

When an MCP tool fails because the user isn't connected and you generate a Composio connect or re-auth link (redirect_url from /connected_accounts/link or /{id}/refresh), don't return it as a normal JSON field such as connect_url. The link binds whoever opens it to that user_id's account. Anything in the model-facing result can be repeated in chat, logged, or synced. Return only `reconnect: true` plus a sentence telling the user to open the link on the card, and put the URL only in the UI payload (in VoiceOS, the _voiceos_glance card). Destructure it away before serializing: `const { connect_url, ...forModel } = described`. An automated security review flagged this right after commit. One open caveat: if the host ever passes the card HTML to the model too, the link still leaks, and only the host can stop that.
