Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Mirrored from https://github.com/Camo67/composio.git
Synced Nov 22, 13:15 UTC
fix(docs): Handle object/array defaults in tool params display
Sushmithamallesh committed
Jan 22, 2026 at 20:00 UTC
9d92419803ffc807939eff18ac806092f21e0b1b
1 file changed
+8
-1
docs/components/toolkits/toolkit-detail.tsx
+8
-1
@@ -29,6 +29,13 @@ function ToolkitIcon({ toolkit }: { toolkit: Toolkit }) {
29
);
30
}
31
32
+// Format default value for display
33
+function formatDefault(value: unknown): string | undefined {
34
+ if (value === undefined || value === null) return undefined;
35
+ if (typeof value === 'object') return JSON.stringify(value);
36
+ return String(value);
37
+}
38
+
39
// Convert parameter schema to TypeTable format
40
function paramsToTypeTable(params: Record<string, ParameterSchema>): Record<string, {
41
type: string;
@@ -47,7 +54,7 @@ function paramsToTypeTable(params: Record<string, ParameterSchema>): Record<stri
54
result[name] = {
55
type: param.type || 'string',
56
description: param.description || undefined,
50
- default: param.default !== undefined ? String(param.default) : undefined,
57
+ default: formatDefault(param.default),
58
required: param.required,
59
};
60
}