Skip to content

Tools cannot be updated (suggested fix included) #176

Closed
@samdoeswork

Description

@samdoeswork

Describe the bug
The mcp.tool() method checks _registeredTools and errors if the tool has already been created. Unfortunately there is no method exposed to delete a tool. This means that a use case we have (a tool can change) cannot be supported.

To Reproduce
You could register a tool and then try to update it by re-registering, but also just look at the code above.

Expected behavior
This is half-way between bug and feature request - but I would like it to simply overwrite the tool.
Or to simply have a deleteToolIfExists() method.

Logs
If applicable, add logs to help explain your problem.

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions