Skip to content

Adopt structured error data field in ToolCallException #229

Description

@kornys

Summary

Evaluate and adopt the optional data field added to McpException/McpError in 2.0 for structured error details.

Currently @WrapBusinessError wraps exceptions as plain text messages. Structured error data (resource name, namespace, error category) could help LLM clients handle
errors more intelligently.

Scope

  • Check if ToolCallException constructor supports a data field
  • Identify key error paths that would benefit from structured context
  • Update error handling in tool classes if beneficial

Acceptance criteria

  • API evaluated
  • Key error paths updated if beneficial
  • CHANGELOG.md updated

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

    No labels
    No labels

    Type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions