Let a caller filter order lines instead of paging the table
The backend gained productcode, ordernumber and ordernumber__status on the order-lines list; the spec and the MCP tools now carry them. The pair that matters is productcode with ordernumber__status: the first says what is committed on a reference, the second restricts it to orders still open. Without the second the answer counts every line ever shipped. Regenerated with k8s-platform/tools/generate-mcp-tools.py, not by hand. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -359,9 +359,30 @@ config:
|
|||||||
destructive_hint: false
|
destructive_hint: false
|
||||||
open_world_hint: false
|
open_world_hint: false
|
||||||
description: Retrieve a paginated list of all order line items with product and quantity information.
|
description: Retrieve a paginated list of all order line items with product and quantity information.
|
||||||
|
Filter by product code to find what is committed on a reference, and by order status to count only
|
||||||
|
orders still open.
|
||||||
method: GET
|
method: GET
|
||||||
name: list-order-details
|
name: list-order-details
|
||||||
parameters:
|
parameters:
|
||||||
|
- description: Only lines for this product reference.
|
||||||
|
in: query
|
||||||
|
name: productcode
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
- description: Only lines belonging to this order.
|
||||||
|
in: query
|
||||||
|
name: ordernumber
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
- description: Only lines whose order has this status, e.g. In Process, On Hold, Shipped, Cancelled.
|
||||||
|
An order that is Shipped or Cancelled commits no stock.
|
||||||
|
in: query
|
||||||
|
name: ordernumber__status
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
- description: A page number within the paginated result set.
|
- description: A page number within the paginated result set.
|
||||||
in: query
|
in: query
|
||||||
name: page
|
name: page
|
||||||
|
|||||||
+19
-1
@@ -35,9 +35,27 @@ paths:
|
|||||||
description: ""
|
description: ""
|
||||||
get:
|
get:
|
||||||
operationId: list_order_details
|
operationId: list_order_details
|
||||||
description: Retrieve a paginated list of all order line items with product and quantity information.
|
description: Retrieve a paginated list of all order line items with product and quantity information. Filter by product code to find what is committed on a reference, and by order status to count only orders still open.
|
||||||
summary: List all order details
|
summary: List all order details
|
||||||
parameters:
|
parameters:
|
||||||
|
- name: productcode
|
||||||
|
required: false
|
||||||
|
in: query
|
||||||
|
description: Only lines for this product reference.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
- name: ordernumber
|
||||||
|
required: false
|
||||||
|
in: query
|
||||||
|
description: Only lines belonging to this order.
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
- name: ordernumber__status
|
||||||
|
required: false
|
||||||
|
in: query
|
||||||
|
description: 'Only lines whose order has this status, e.g. In Process, On Hold, Shipped, Cancelled. An order that is Shipped or Cancelled commits no stock.'
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
- name: page
|
- name: page
|
||||||
required: false
|
required: false
|
||||||
in: query
|
in: query
|
||||||
|
|||||||
Reference in New Issue
Block a user