Skip to content

[BUG] Inconsistent response format — validate_pipeline and catch-all missing success field #190

Closed

Description

@SarthakB11

Description

All sktime-mcp tools follow the convention of returning {"success": true/false, ...} in their responses. Two paths break this contract:

1. validate_pipeline returns {"valid": bool} instead of {"success": bool}

server.py:664-666:

elif name == "validate_pipeline":
    validator = get_composition_validator()
    validation = validator.validate_pipeline(arguments["components"])
    result = validation.to_dict()  # returns {"valid": ...} not {"success": ...}

An LLM parsing all tool responses uniformly with result["success"] will get a KeyError on validate_pipeline results.

2. Server catch-all returns {"error": str(e)} without "success": false

server.py:801-803:

except Exception as e:
    ...
    return [TextContent(type="text", text=json.dumps({"error": str(e)}, default=str))]

Any unhandled exception produces a response missing the success field entirely.

Impact

MCP clients (including LLM agents) that check result.get("success") will get None for both cases, making it impossible to distinguish between "tool ran but failed" vs "tool ran successfully with this result."

Suggested fix

  1. Map valid → success in the validate_pipeline handler
  2. Add "success": false to the server catch-all error response

Both are one-line fixes.

Found while auditing API consistency across all 34 tool functions.

Activity

  1. SarthakB11 commented on Apr 13, 2026

    @SarthakB11
    ContributorAuthor

    Happy to open a PR for this — have a fix ready locally.

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

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions