Skip to content

feat: Progress Support for Long Running Tool Calls ⏳#271

Merged
cliffhall merged 10 commits intomodelcontextprotocol:mainfrom
pulkitsharma07:progress_flow_support
Apr 8, 2025
Merged

feat: Progress Support for Long Running Tool Calls ⏳#271
cliffhall merged 10 commits intomodelcontextprotocol:mainfrom
pulkitsharma07:progress_flow_support

Conversation

@pulkitsharma07
Copy link
Contributor

@pulkitsharma07 pulkitsharma07 commented Apr 5, 2025

Progress Support for Long Running Tool Calls

progress_flow.mov

The MCP Inspector now fully supports the Model Context Protocol Progress Flow specification, which enables:

  • Optional progress tracking for long-running operations
  • Added new configuration settings to the MCP Inspector for supporting this:
    • MCP_REQUEST_TIMEOUT_RESET_ON_PROGRESS: Controls whether timeouts reset on progress notifications. Default: true
    • MCP_REQUEST_MAX_TOTAL_TIMEOUT: Sets maximum total timeout for requests with progress notifications. Default: 60000 ms

Other Changes

  1. Run tool button now shows as a spinner while the tool is running (and becomes disabled).
  2. Improves error handling for callTool exceptions.
  3. Some minor code-refactoring, to improve readability.
  4. Progress notifications are now handled little differently than other notifications, check .onprogress hook in useConnection

Testing

  • Used the everything MCP Server's longRunningOperation tool.
  • To enable progress notifications set MCP_REQUEST_TIMEOUT_RESET_ON_PROGRESS to true (default).
    • if tool response duration is less than MCP_REQUEST_MAX_TOTAL_TIMEOUT then tool call will succeed.
    • otherwise, it will fail with MCP error -32001: Maximum total timeout exceeded
      Screenshot 2025-04-05 at 1 17 51 AM
  • Increased MCP_REQUEST_MAX_TOTAL_TIMEOUT to 200000 (200 seconds) and verified if duration is set to 150 seconds, the tool execution completes fine.
Screenshot 2025-04-05 at 1 48 54 PM
  • Disabled MCP_REQUEST_TIMEOUT_RESET_ON_PROGRESS and verified that tool correctly times out.

Related Issues

@pulkitsharma07
Copy link
Contributor Author

Hi, @cliffhall, pinging this for review (apologies if already checking)

Copy link
Member

@cliffhall cliffhall left a comment

Choose a reason for hiding this comment

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

Tested locally and this works great. Verified max timeout works. Only one beef with the makeRequest renaming.

@cliffhall cliffhall added enhancement New feature request waiting on submitter Waiting for the submitter to provide more info labels Apr 8, 2025
Copy link
Member

@cliffhall cliffhall left a comment

Choose a reason for hiding this comment

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

One more suggestion here.

These configuration variable names are really not looking good, particularly with wrapping.

Screenshot 2025-04-08 at 3 13 51 PM

Could we show just words like:

  • Request Timeout
  • Reset Timeout on Progress
  • Max Timeout with Progress
  • Proxy Full Address

The env var to use could be in the tooltip or just in the README.

@pulkitsharma07
Copy link
Contributor Author

Fully agree with that. The env var by itself is not descriptive, so I have added a label in configItem, and used that in the UI. The description remains in the tooltip.

Screenshot 2025-04-09 at 1 19 42 AM

Copy link
Member

@cliffhall cliffhall left a comment

Choose a reason for hiding this comment

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

Much better looking.
Screenshot 2025-04-08 at 3 58 30 PM

@cliffhall cliffhall merged commit da4e2fa into modelcontextprotocol:main Apr 8, 2025
2 checks passed
@pulkitsharma07 pulkitsharma07 deleted the progress_flow_support branch April 8, 2025 20:08
IgnacioC44 referenced this pull request in MCPJam/inspector Jun 21, 2025
feat: Progress Support for Long Running Tool Calls ⏳
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature request waiting on submitter Waiting for the submitter to provide more info

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Usability issue for long-running tasks

2 participants