Skip to content

Ability to override RequestHandlers to change Tools definitions #437

@mikegron

Description

@mikegron

Expected Behavior

We want to be able to configure Tools definition based on clients. When returning the list of tools, we need to be able to change the description and input schema returned depending on the connected client (same tool, different description) and possibly the output schema also.

Current Behavior

The McpServer currently has a list of Tools and RequestHandlers. The tools/list method calls the toolsListRequestHandler private method which lists the current Tools. Handlers cannot be modified and are private, so they cannot be reused when overriding the session Factory in the Transport Provider setSessionFactory method.

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