Skip to content

Command params using z.date() for validation won't accept ISO date strings or epoch #133

Description

Description

zod's z.date() validation will only be successful for instances of Date , and will fail for strings or numbers -- their docs show this as an example failing a date string, but we/an agent can't really pass an instance of Date in a request.

Example

Trying to run wit_get_work_item with an input like:

{
    // ...
    "asOf": "2025-01-01"
}

will always fail with an output like

wit_get_work_item: [
  {
    "code": "invalid_type",
    "expected": "date",
    "received": "string",
    "path": [
      "asOf"
    ],
    "message": "Expected date, received string"
  }
]

because asOf is using z.date() for input validation, and that's expecting a date, not a string.

asOf: z.date().optional().describe("Optional date to retrieve the work item as of a specific time. If not provided, the current state will be returned."),

This also occurs for the build and release commands that try to validate their date params with z.date().

Metadata

Metadata

Assignees

Labels

Bug 🪲something isn't working

Type

Fields

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions