From 4cbbabc29b35b8feb754afb18d7582961470e85f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Tailland?= Date: Mon, 31 Aug 2026 16:21:00 +0200 Subject: [PATCH] Declare X-Stock-Change-Reason as a proper header parameter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The tool argument name Kong actually forwards comes from the operation's declared parameters — a header cannot be sent as an arbitrary argument name, it has to be in the spec like any other parameter. Co-Authored-By: Claude Opus 5 --- kong/mcp/ai-mcp-proxy.yaml | 10 +++++++++- openapi.yaml | 9 ++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/kong/mcp/ai-mcp-proxy.yaml b/kong/mcp/ai-mcp-proxy.yaml index 0356590..eabd038 100644 --- a/kong/mcp/ai-mcp-proxy.yaml +++ b/kong/mcp/ai-mcp-proxy.yaml @@ -288,7 +288,8 @@ config: idempotent_hint: false destructive_hint: false open_world_hint: false - description: Update specific fields of an existing product. + description: Update specific fields of an existing product. Send X-Stock-Change-Reason as delivery: + when a quantityinstock change is a fulfilled reorder rather than a correction. method: PATCH name: patch-product parameters: @@ -298,6 +299,13 @@ config: required: true schema: type: string + - description: 'Only honoured in this one shape: delivery:. Anything else is recorded + as a manual adjustment.' + in: header + name: X-Stock-Change-Reason + required: false + schema: + type: string path: /catalog/v1/products/{productcode}/ request_body: content: diff --git a/openapi.yaml b/openapi.yaml index 41c82cf..5cb2529 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -271,7 +271,7 @@ paths: /catalog/v1/products/{productcode}/: patch: operationId: patch_product - description: Update specific fields of an existing product. + description: Update specific fields of an existing product. Send X-Stock-Change-Reason as delivery: when a quantityinstock change is a fulfilled reorder rather than a correction. summary: Partially update a product parameters: - in: path @@ -280,6 +280,13 @@ paths: type: string description: A unique value identifying this product. required: true + - in: header + name: X-Stock-Change-Reason + schema: + type: string + pattern: '^delivery:[\w-]{1,64}$' + description: 'Only honoured in this one shape: delivery:. Anything else is recorded as a manual adjustment.' + required: false tags: - Products requestBody: