Skip to content

Example unit test is broken #836

@the-isz

Description

@the-isz

I'm new to MCP in general and not quite an expert with Rust yet.
This ticket may very well be invalid because I misunderstood something or did something wrong!

Thank you for this great software!

Describe the bug
The "Counter" example has unit tests.
One of them fails because it tries to invoke the tool "long_task" as a task, but the tool doesn't have task support.

The unit test fails here: examples/servers/src/common/counter.rs#L364

The error message:

Error: Mcp error: -32602: Tool does not support task-based execution

To Reproduce
Steps to reproduce the behavior:

  1. cargo t

Expected behavior
No unit test should fail.

Additional context
I extracted only the required sources to run the counter_streamhttp.rs example (instead of cloning the whole repository).
It is possible that I misconfigured something and caused the error that way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is not working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions