Skip to content

"Error executing tool test: object NoneType can't be used in 'await' expression" #103

Closed
@zudsniper

Description

@zudsniper

Receiving this error when attempting to use asyncio's Context at all in this test tool:

@mcp.tool()
async def test(message: str, ctx: Context = None) -> str:
    """Simple echo test function."""
    if ctx:
        await ctx.info(f"Echo test: {message}")
    return f"Echo: {message}"

I'm testing using mcp-inspector and on fastmcp v0.4.1. Anyone have any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions