fix: support object and array parameters in custom HTTP tools (#373)

* fix: support object and array parameters in custom HTTP tools

* feat(ui): expose object and array types in the custom tool parameter editor

* fix: error handling and schema generation

---------

Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Co-authored-by: Abhishek Kumar <abhishek@a6k.me>
This commit is contained in:
Matt Van Horn 2026-06-01 23:05:38 -07:00 committed by GitHub
parent 98d2b24cba
commit dd85c4a1b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 308 additions and 67 deletions

View file

@ -2,6 +2,7 @@
import { PlusIcon, Trash2Icon } from "lucide-react";
import type { ToolParameter as ApiToolParameter } from "@/client/types.gen";
import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
@ -14,7 +15,7 @@ import {
} from "@/components/ui/select";
import { Switch } from "@/components/ui/switch";
export type ParameterType = "string" | "number" | "boolean";
export type ParameterType = ApiToolParameter["type"];
export interface ToolParameter {
name: string;
@ -124,6 +125,8 @@ export function ParameterEditor({
<SelectItem value="string">String</SelectItem>
<SelectItem value="number">Number</SelectItem>
<SelectItem value="boolean">Boolean</SelectItem>
<SelectItem value="object">Object</SelectItem>
<SelectItem value="array">Array</SelectItem>
</SelectContent>
</Select>
</div>
@ -267,6 +270,8 @@ export function PresetParameterEditor({
<SelectItem value="string">String</SelectItem>
<SelectItem value="number">Number</SelectItem>
<SelectItem value="boolean">Boolean</SelectItem>
<SelectItem value="object">Object</SelectItem>
<SelectItem value="array">Array</SelectItem>
</SelectContent>
</Select>
</div>