Skip to content

Add configurable retry policy for MCP tool resolution#170

Draft
paul-cayet wants to merge 1 commit into
mainfrom
mcp-tools-resolution-retry
Draft

Add configurable retry policy for MCP tool resolution#170
paul-cayet wants to merge 1 commit into
mainfrom
mcp-tools-resolution-retry

Conversation

@paul-cayet
Copy link
Copy Markdown
Member

@paul-cayet paul-cayet commented May 29, 2026

#161

Adds optional tool_resolution_retry_policy support to MCPTool and MCPToolBox so clients can retry MCP list_tools() resolution when expected tools are transiently missing from a partial server response.

This keeps the default behavior unchanged: no retry is performed unless a retry policy is explicitly configured and WayFlow knows which tools are expected.

Changes include:

  • Add tool_resolution_retry_policy: Optional[RetryPolicy] to MCPTool and MCPToolBox
  • Retry only when expected MCP tools are configured and missing
  • Enrich NoSuchToolFoundOnMCPServerError with missing, expected, exposed tool names, and attempts
  • Add serialization support for the new retry policy field
  • Add tests for retry success, retry exhaustion, no-retry behavior, direct MCPTool, toolbox behavior, and serialization

@oracle-contributor-agreement oracle-contributor-agreement Bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant