posit-dev / posit-dev/mcptools
Support async tool handlers (promises)
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 196
- Forks
- 21
- Avg merge
- 1h 14m
- Merged PRs (30d)
- 1
Description
execute_tool_call() is synchronous and the HTTP transport returns plain lists from the httpuv call. Tools that need to wait (long-poll patterns, external requests via {promises}) can't be expressed.
httpuv already supports returning a promise from call; if a tool handler returns a promise, mcptools could chain the JSON-RPC response onto it. Shiny's MCP tunnel depends on this (a receive tool holds its response until the app has messages to flush).
Part of #115.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing execute_tool_call() through the HTTP transport and its httpuv call. Read how tool results become JSON-RPC responses, then inspect the {promises} behavior described in the issue. Done means a promise returned by a tool handler can defer the JSON-RPC response while synchronous handlers continue to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100