Skip to content

tool_box! fails if tools cant be in separate files #57

Closed
@milesj

Description

@milesj

Describe the bug

I have a handful of tools and keeping them all in the same file is growing unwieldy. I tried moving them to separate files, but when I call tool_box!, it fails with:

cannot define inherent `impl` for foreign type

What are you using rust-mcp-sdk for?
Select all that apply:

  • Developing a MCP Server
  • Developing a MCP Client

Technical details:

  • rust-mcp-sdk Version : 0.4.5
  • Cargo features enabled for rust-mcp-sdk : macros, server, 2025_03_26
  • Environment/OS (Mac, Linux, Windows, etc) : macos

To Reproduce
Steps to reproduce the behavior:

  1. ....
  2. ....
  3. ....

Expected behavior

Screenshots

Additional context

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