GreatEugenius commented on code in PR #786:
URL: https://github.com/apache/flink-agents/pull/786#discussion_r3371134490


##########
docs/content/docs/development/mcp.md:
##########
@@ -119,6 +119,29 @@ public static ResourceDescriptor authenticatedMcpServer() {
 - `BasicAuth` - For username/password authentication
 - `ApiKeyAuth` - For API key authentication via custom headers
 
+### Retries
+
+Remote calls to an MCP server (listing/calling tools and prompts) are retried 
with exponential backoff on transient failures. You can tune the retry behavior 
per server with the following descriptor arguments:

Review Comment:
   Thanks for catching this. The key name was changed back to "timeout" in 
#771, so "timeout" is now correct again. I've kept the examples using "timeout" 
to match the current FIELD_TIMEOUT field.



##########
docs/content/docs/development/mcp.md:
##########
@@ -119,6 +119,29 @@ public static ResourceDescriptor authenticatedMcpServer() {
 - `BasicAuth` - For username/password authentication
 - `ApiKeyAuth` - For API key authentication via custom headers
 
+### Retries
+
+Remote calls to an MCP server (listing/calling tools and prompts) are retried 
with exponential backoff on transient failures. You can tune the retry behavior 
per server with the following descriptor arguments:
+
+| Argument           | Default | Description                                   
       |
+|--------------------|---------|------------------------------------------------------|
+| `maxRetries`       | 3       | Maximum number of retries for a failed remote 
call.  |
+| `initialBackoffMs` | 100     | Initial backoff before the first retry, in 
milliseconds. |
+| `maxBackoffMs`     | 10000   | Upper bound for the backoff between retries, 
in milliseconds. |
+
+```java
+@MCPServer
+public static ResourceDescriptor myMcp() {
+    return ResourceDescriptor.Builder.newBuilder(ResourceName.MCP_SERVER)
+                .addInitialArgument("endpoint", MCP_ENDPOINT)
+                .addInitialArgument("timeout", 30)

Review Comment:
   Thanks for catching this. The key name was changed back to "timeout" in 
https://github.com/apache/flink-agents/pull/771, so "timeout" is now correct 
again. I've kept the examples using "timeout" to match the current 
FIELD_TIMEOUT field.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to