Skip to content

MCP serializes array parameters as JSON-encoded strings, causing Pydantic validation failures #130

@Ryzhtus

Description

@Ryzhtus

Summary

When calling tools that accept array-typed parameters (e.g. assignees, labels, members) through the MCP wrapper, the array is forwarded to the REST API as a JSON-encoded string rather than as a native JSON array. The REST API's Pydantic schema rejects the string at the schema layer before any business logic runs.

Steps to reproduce

  1. Call the MCP tool to create a work item, passing assignees=["", ""].
  2. Observe the request reaching the REST API.

Expected request body

json{ "assignees": ["", ""] }

Actual request body

json{ "assignees": "["", ""]" }

Result

The REST API responds with a Pydantic validation error (expected list, got str). Calling the underlying REST API directly with the correct payload shape succeeds, which confirms the bug is in the MCP wrapper's serialization layer, not in the API itself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions