Skip to content

Conversation

uinstinct
Copy link
Contributor

@uinstinct uinstinct commented Sep 5, 2025

Description

Use the mcpServers.connectionTimeout (initially used for mcp connection timeout) to specify request timeout when calling mcp tool.

closes #7509

AI Code Review

  • Team members only: AI review runs automatically when PR is opened or marked ready for review
  • Team members can also trigger a review by commenting @continue-general-review or @continue-detailed-review

Checklist

  • [] I've read the contributing guide
  • [] The relevant docs, if any, have been updated or created
  • [] The relevant tests, if any, have been updated or created

Screen recording or screenshot

Tests

[ What tests were added or updated to ensure the changes work as expected? ]


Summary by cubic

Adds a per-request timeout for MCP tool calls using the existing mcpServers.connectionTimeout setting. This prevents hanging calls and aligns connection and request timeouts.

  • New Features
    • Passes client.options.timeout to client.client.callTool for request-level timeouts.
    • Validates responses with CallToolResultSchema during tool invocation.

@uinstinct uinstinct requested a review from a team as a code owner September 5, 2025 13:47
@uinstinct uinstinct requested review from sestinj and removed request for a team September 5, 2025 13:47
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Sep 5, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Sep 8, 2025
@github-project-automation github-project-automation bot moved this from Todo to In Progress in Issues and PRs Sep 8, 2025
Copy link
Collaborator

@RomneyDa RomneyDa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@uinstinct could we only add this if it's defined? Or verify that it won't break anything if not defined

@dosubot dosubot bot removed the lgtm This PR has been approved by a maintainer label Sep 8, 2025
@uinstinct
Copy link
Contributor Author

@RomneyDa verified now that it does not break anything if is not defined. (it is client.options.timeout is undefined if it is not defined in config.yaml, hence does not affect anything)

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Sep 11, 2025
@RomneyDa RomneyDa merged commit 71c947a into continuedev:main Sep 11, 2025
96 of 100 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Issues and PRs Sep 11, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Sep 11, 2025
@sestinj
Copy link
Contributor

sestinj commented Sep 11, 2025

🎉 This PR is included in version 1.13.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@uinstinct uinstinct deleted the mcp-request-timeout branch September 15, 2025 05:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm This PR has been approved by a maintainer released size:S This PR changes 10-29 lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

MCP Server Timeout not working
3 participants