feature: Async support using Resource by bzsurbhi · Pull Request #651 · modelcontextprotocol/modelcontextprotocol · GitHub
Skip to content

feature: Async support using Resource - #651

Closed
bzsurbhi wants to merge 2 commits into
modelcontextprotocol:mainfrom
bzsurbhi:feature/async-callToolResult
Closed

feature: Async support using Resource#651
bzsurbhi wants to merge 2 commits into
modelcontextprotocol:mainfrom
bzsurbhi:feature/async-callToolResult

Conversation

@bzsurbhi

@bzsurbhi bzsurbhi commented Jun 5, 2025

Copy link
Copy Markdown

Added support for long-running operations by making use of Resource and it's subscribe/notify features. Some other approaches and discussions are out there already #617 and #549

This approach modifies ReadResourceResult to support CallToolResult

Motivation and Context

  • Client → Server - CallToolAsyncRequest
  • Server → Client - CallToolAsyncResult(AsyncOperation)
  • Client → Server(poll) - GetOperationRequest
  • Server → Client - GetOperationResult(resourceUri and status)
  • Once status is ACTIVE → Client can read the resource using resourceUri

pLN1Rjim3BtxAuYSEY1DxWPIr73Sma2N5ccwox23gh2EC5dI93bR4FJVHrbssWrU0lIINHoRv2CV7oNcsdbcVLFBnD2luC8mvI6N0fN_m_I8TeisIMOpA9NmWdcX5SncIOo5owik90MljNHJpgJCt4vns2jMunYOhPgQGjqOlYEQJ8ejlYOH19U4ZvbIo0cveXmjUeckaHxssg1jQwRGsk_xxzSaKTeZw92cOmbG_4BUa3Lm

How Has This Been Tested?

Breaking Changes

Non breaking change

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

@mikekistler

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Status: Draft

Development

Successfully merging this pull request may close these issues.

3 participants