Skip to content

[BUG] sovd_* aliases skip input validation and report bad arguments as internal errors #26

Description

@bburda

Bug report

Steps to reproduce

  1. Call ros2_medkit_status_set with {"entity_type": "apps", "entity_id": "motor"}, leaving out the required action.
  2. Call sovd_status_set with exactly the same arguments.

Expected behavior

Both names reject the call the same way, as bad input.

Actual behavior

The canonical name and the alias behave differently:

  • ros2_medkit_status_set: isError is true, message Input validation error: 'action' is a required property
  • sovd_status_set: isError is false, text {"success": false, "data": null, "error": "Internal error: 1 validation error for StatusSetArgs ..."}

Aliases are not listed in tools/list, so the SDK has no schema to validate against and passes the arguments straight through. call_tool then normalizes the name and builds the Pydantic model, which raises ValidationError. The broad except Exception turns that into Internal error: ..., so bad user input is reported as a server failure.

There are 176 alias entries, so this affects the whole legacy sovd_* surface, not only lifecycle.

Environment

  • ros2_medkit_mcp version: 0.6.0
  • Python version: 3.11+
  • MCP client: any
  • OS: any

Additional information

Catching ValidationError in call_tool and formatting it as an input error is a small change and covers every alias at once. Registering all aliases in tools/list would also work, but it would roughly triple the advertised tool list.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions