wzhero1 opened a new issue, #770:
URL: https://github.com/apache/flink-agents/issues/770

   ### Search before asking
   
   - [x] I searched in the 
[issues](https://github.com/apache/flink-agents/issues) and found nothing 
similar.
   
   ### Description
   
   Found during MCP doc verification (#762).
   
   The Java `MCPServer` reads its timeout from the `ResourceDescriptor` with 
key `"timeoutSeconds"`,
   but the docs, the test, the Python implementation, and all other connections 
use `"timeout"`.
   So `addInitialArgument("timeout", N)` is silently ignored and the 30s 
default always applies.
   
   - Bug: `integrations/mcp/.../MCPServer.java` — `FIELD_TIMEOUT_SECONDS = 
"timeoutSeconds"`, read in the
     `MCPServer(ResourceDescriptor, ResourceContext)` constructor.
   - Docs (already correct): `docs/content/docs/development/mcp.md` lines 56, 
102, 163 use `"timeout"`.
   
   Fix: make the Java implementation read/serialize `"timeout"` (Python uses 
`timeout`; every other
   connection reads `getArgument("timeout")`). No doc change needed.
   
   ### How to reproduce
   
   ```java
   ResourceDescriptor.Builder.newBuilder(ResourceName.MCP_SERVER)
           .addInitialArgument("endpoint", "http://127.0.0.1:8000/mcp";)
           .addInitialArgument("timeout", 60)   // expected 60s
           .build();
   ```
   The resolved `MCPServer.getTimeoutSeconds()` returns `30`, not `60`.
   
   ### Version and environment
   
   Flink Agents 0.3.0 (`main`), all Flink versions. Java MCP only; Python 
unaffected.
   
   ### Are you willing to submit a PR?
   
   - [x] I'm willing to submit a PR!
   


-- 
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