Skip to content

Improved Mechanism for Propagating Tool Failure #44

Open
@eiriktsarpalis

Description

@eiriktsarpalis

Originally posted by @PederHP in PederHP/mcpdotnet#43.

Tool failure (using IsError = true) is currently not possible to return from the Tool mapping layer. This could be done via:

  1. Enforcing all Tools return a ToolResult type which has an IsError field. This is not desirable as it removes the ability to expose any method as tool.

  2. A new Exception (ie McpToolException) which is caught in the handler and then returns IsError true and an error message provided in the exception. This would allow developers a way to hook into the MCP protocol without enforcing specific return types on their 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