From 3921dd576d8f965bc0e22e1364caa3e7b26be092 Mon Sep 17 00:00:00 2001 From: David Gageot Date: Mon, 24 Nov 2025 11:38:36 +0100 Subject: [PATCH] Fix issue with openai Fixes #264 This schema is rejected by OpenAI because the value could be an array without items type. This seems to fix it. A better solution would maybe be to use anyOf with a union of all five possible types. Signed-off-by: David Gageot --- pkg/gateway/dynamic_mcps.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/gateway/dynamic_mcps.go b/pkg/gateway/dynamic_mcps.go index f26d9cc3..7dbebe61 100644 --- a/pkg/gateway/dynamic_mcps.go +++ b/pkg/gateway/dynamic_mcps.go @@ -745,6 +745,7 @@ func (g *Gateway) createMcpConfigSetTool(_ *clientConfig) *ToolRegistration { "value": { Types: []string{"string", "number", "boolean", "object", "array"}, Description: "Configuration value to set (can be string, number, boolean, object, or array)", + Items: &jsonschema.Schema{Type: "object"}, }, }, Required: []string{"server", "key", "value"},