Skip to content

BulkToolCaller.register_tools() ignores prefix and separator #5546

Description

@mikamikasuki

What happened?

BulkToolCaller.register_tools() accepts prefix and separator, but does not pass either argument to MCPMixin.register_tools(). Registering with prefix="one" and separator="-" therefore still exposes call_tool_bulk and call_tools_bulk instead of the prefixed names.

The inherited register_all() path has the same behavior: it passes its tool prefix to BulkToolCaller.register_tools(), where the values are dropped. A direct base-mixin control applies the prefix correctly. Registering two BulkToolCaller instances with different prefixes can consequently attempt to add the same unprefixed tool names and emit duplicate-component warnings.

Could BulkToolCaller.register_tools() forward both naming arguments and keep the self-invocation guard aligned with the effective prefixed tool names? This concerns prefix behavior; the separate proposal in #2262 discusses converting BulkToolCaller to middleware.

Example Code

Version Information

- FastMCP main: `5baeacfe20eca735cb949564b4915f93a622b916`
- Python: 3.12.15
- OS: macOS 15.0.1 arm64

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working. Reports of errors, unexpected behavior, or broken functionality.contribRelated to community contributions in src/contrib/ directory.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions