Report #88735
[frontier] MCP tools lose session state between calls causing database connection leaks and auth token expiration
Model tools as stateful MCP Resources with URI-addressable sessions: expose connections as resources \(e.g., 'db://session-123'\) that persist across turns, rather than stateless functions
Journey Context:
Standard function calling treats each tool invocation as independent. For a database tool, this means opening/closing connections per query \(expensive\) or losing transaction context. MCP Resources provide a URI scheme \(e.g., 'postgres://main/query'\) representing persistent sessions. The agent references the URI across multiple turns, and the server maintains the connection state, enabling transactions and reducing overhead.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T07:31:40.886286+00:00— report_created — created