Skip to content

feat(client): list_orders overdue + sort filters #36

@dougborg

Description

@dougborg

Problem

"Show me orders needing attention" is a recurring operational ask. Today it requires:

  1. list_orders(due_date_to=today_isoformat) to filter to overdue
  2. Client-side sort by due_date to surface the most-overdue first
  3. Repeated for each status if filtering by status

Both overdue (server-side computed boolean) and sort (server-supported ordering) would collapse this to a single call.

Proposed shape

```
GET /orders?overdue=true&sort=due_date_asc
GET /orders?sort=updated_at_desc
```

sort should support at least: due_date_asc, due_date_desc, updated_at_desc, created_at_desc. Specific names match server semantics.

Acceptance

  • Spec adds overdue (boolean) and sort (enum) parameters to GET /orders
  • Generated client supports them
  • Orders.list(overdue=True, sort="due_date_asc") helper kwargs
  • MCP tool surfaces them
  • Tests cover each sort option and overdue=true filter
  • Help resource updated

Conversion path if server doesn't support these

If #30 (F3) shows the server doesn't filter on overdue or honor sort:

  • Close this issue
  • File an upstream feature request to the StatusPro team
  • Optionally: implement client-side sort in Orders.list as a stopgap (auto-paginate then sort), with a clear docstring warning about cost on large result sets

Depends on

Tracking

Part of epic #31, Tier 2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/clientTouches statuspro_public_api_client/area/mcpTouches statuspro_mcp_server/ onlyarea/specTouches docs/statuspro-openapi.yamlpriority/p1Workflow polish, ships after P0theme/tool-surface-redesignMCP tool surface redesign initiative

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions