Skip to content

Agent calling tool many times when tool respond with more than 10 seconds #285

@rsaulo

Description

@rsaulo

Describe the bug
When the agent call a tool and does not receive a responde within 10 seconds, the agent call the cool again, generation problem for tools that need more than 10 seconds to respond.

To Reproduce
Just call a tool that respond with more than 10 seconds.

Expected behavior
We need a parameter to configure the timeout in seconds, this cannot be fixed in code.

Additional context
The problem is in the line McpSessionManager class :

McpSyncClient client =
McpClient.sync(transport)
.requestTimeout(Duration.ofSeconds(10))
.capabilities(ClientCapabilities.builder().build())
.build();

Metadata

Metadata

Assignees

No one assigned

    Labels

    waiting on reporterWaiting for reaction by reporter. Failing that, maintainers will eventually closed it as stale.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions