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, 12:00 UTC
feat(docs): Display enum values in toolkit parameter types
Add formatType function to show enum values alongside parameter types in the toolkit detail page (e.g., `string ("value1" | "value2")`). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sushmithamallesh committed
Jan 28, 2026 at 12:26 UTC
4a58f0a7da1442b544118a77e4fd7919f1dd3a18
1 file changed
+14
-1
docs/components/toolkits/toolkit-detail.tsx
+14
-1
@@ -36,6 +36,19 @@ function formatDefault(value: unknown): string | undefined {
36
return String(value);
37
}
38
39
+// Format type with enum values if available
40
+function formatType(param: ParameterSchema): string {
41
+ let typeStr = param.type || 'string';
42
+
43
+ // Include enum values in type display
44
+ if (param.enum && param.enum.length > 0) {
45
+ const enumValues = param.enum.map(v => `"${v}"`).join(' | ');
46
+ typeStr = `${typeStr} (${enumValues})`;
47
+ }
48
+
49
+ return typeStr;
50
+}
51
+
52
// Convert parameter schema to TypeTable format
53
function paramsToTypeTable(params: Record<string, ParameterSchema>): Record<string, {
54
type: string;
@@ -52,7 +65,7 @@ function paramsToTypeTable(params: Record<string, ParameterSchema>): Record<stri
65
66
for (const [name, param] of Object.entries(params)) {
67
result[name] = {
55
- type: param.type || 'string',
68
+ type: formatType(param),
69
description: param.description || undefined,
70
default: formatDefault(param.default),
71
required: param.required,