Closed
Description
Describe the bug
When a tool includes client-side logging with, the client seems to hang.
The following tool works ok with Claude Desktop and Inspector, but does not complete with a Python client.
@mcp.tool()
async def simple_tool_with_logging(x:float, y:float, ctx:Context) -> str:
await ctx.info(f"Processing Simple Tool")
logger.debug("IN SIMPLE_TOOL")
await ctx.report_progress(1, 2)
return x*y
To Reproduce
Will check in a PR with test and proposed fix.
Expected behavior
I would expect the tool to run to completion.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: OSX
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context
Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
No labels