From dd9a85ebfa9c78531252ebd57ba4c66a09afba5d Mon Sep 17 00:00:00 2001 From: Eduard Lupacescu Date: Sat, 30 Aug 2025 08:24:39 +0300 Subject: [PATCH] fix: fix array to string mcp index tools --- src/MCP/Concerns/McpActionTool.php | 2 +- src/MCP/Concerns/McpGetterTool.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/MCP/Concerns/McpActionTool.php b/src/MCP/Concerns/McpActionTool.php index b0ebe504e..e7a3111b0 100644 --- a/src/MCP/Concerns/McpActionTool.php +++ b/src/MCP/Concerns/McpActionTool.php @@ -77,7 +77,7 @@ public static function actionToolSchema(Action $action, ToolInputSchema $schema, } elseif (in_array('integer', $rulesArray) || in_array('numeric', $rulesArray)) { $fieldSchema = $schema->number($field); } elseif (in_array('array', $rulesArray)) { - $fieldSchema = $schema->array($field); + $fieldSchema = $schema->string($field); } else { $fieldSchema = $schema->string($field); } diff --git a/src/MCP/Concerns/McpGetterTool.php b/src/MCP/Concerns/McpGetterTool.php index bffe45a20..b838c05f0 100644 --- a/src/MCP/Concerns/McpGetterTool.php +++ b/src/MCP/Concerns/McpGetterTool.php @@ -65,7 +65,7 @@ public static function getterToolSchema(Getter $getter, ToolInputSchema $schema, } elseif (in_array('integer', $rulesArray) || in_array('numeric', $rulesArray)) { $fieldSchema = $schema->number($field); } elseif (in_array('array', $rulesArray)) { - $fieldSchema = $schema->array($field); + $fieldSchema = $schema->string($field); } else { $fieldSchema = $schema->string($field); }