Skip to content

Allow setting the timeout with the "timeout" URL parameter#100

Merged
ashwin-ant merged 1 commit into
modelcontextprotocol:mainfrom
evalstate:fix/tool-timeout
Dec 5, 2024
Merged

Allow setting the timeout with the "timeout" URL parameter#100
ashwin-ant merged 1 commit into
modelcontextprotocol:mainfrom
evalstate:fix/tool-timeout

Conversation

@evalstate

@evalstate evalstate commented Dec 4, 2024

Copy link
Copy Markdown
Member

Allows setting the Request Timeout in milliseconds with a "timeout" URL parameter

Motivation and Context

Enables testing of tools which take > 10s to respond.

How Has This Been Tested?

This has been tested using the mcp-everything server

image

Breaking Changes

No breaking changes.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

@ashwin-ant this is intended to cover simple cases - I considered matching progress updates to requestids to reset the timer - but that seems over-engineered for the need.

ashwin-ant
ashwin-ant previously approved these changes Dec 4, 2024

@ashwin-ant ashwin-ant left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you!

@evalstate

Copy link
Copy Markdown
Member Author

Build failing - think it is related to this commit in the SDK:

modelcontextprotocol/typescript-sdk@e911ece

Will fix.

@ashwin-ant

Copy link
Copy Markdown
Member

@evalstate I have a PR open to update the SDK #101

@evalstate

evalstate commented Dec 4, 2024

Copy link
Copy Markdown
Member Author

OK. I've added a commit - I'll wait for your PR to go through and merge. Best.

@jspahrsummers

Copy link
Copy Markdown
Member

Sorry about the breakage here! Per discussion on #101, didn't mean to release this breaking change—working on fixing it up now 😟

@ashwin-ant

Copy link
Copy Markdown
Member

@evalstate I've updated the SDK to 1.0.3, mind rebasing this PR (and removing the second commit)?

@evalstate evalstate reopened this Dec 5, 2024
@evalstate

Copy link
Copy Markdown
Member Author

Rebased; commits tidied.

@ashwin-ant ashwin-ant merged commit 18dc4d0 into modelcontextprotocol:main Dec 5, 2024
@TornjV TornjV mentioned this pull request Mar 5, 2025
IgnacioC44 referenced this pull request in MCPJam/inspector Jun 21, 2025
Allow setting the timeout with the "timeout" URL parameter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants