Skip to content

IMcpServerBuilder WithTools cannot pass parameters to tool constructor #697

@asklar

Description

@asklar

Describe the bug
I'd expect to be able to write something like:

serverBuilder.WithTools((sb) => { new MyTool(42); });

To Reproduce
serverBuilder.WithTools(42); // doesn't compile

Expected behavior
I can pass a lambda or vararg style params through to the tool's ctor

Logs
n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions