Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions mcpgateway/admin_ui/tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -1646,7 +1646,9 @@ export const testTool = async function (toolId) {
// Input field with validation (with multiline support)
let fieldInput;
const isTextType = prop.type === "text";
const isObjectType = prop.type === "object";
const isObjectType = prop.type === "object" ||
(prop.anyOf && prop.anyOf.some(s => s.type === "object")) ||
(prop.oneOf && prop.oneOf.some(s => s.type === "object"));
if (isTextType || isObjectType) {
fieldInput = document.createElement("textarea");
fieldInput.rows = 4;
Expand Down Expand Up @@ -3319,7 +3321,9 @@ export const runToolTest = async function () {
if (prop.enum.includes(value)) {
params[keyValidation.value] = value;
}
} else if (prop.type === "object") {
} else if (prop.type === "object" ||
(prop.anyOf && prop.anyOf.some(s => s.type === "object")) ||
(prop.oneOf && prop.oneOf.some(s => s.type === "object"))) {
try {
const parsed = JSON.parse(value);
if (typeof parsed !== "object" || Array.isArray(parsed) || parsed === null) {
Expand Down
Loading