MCPcopy Index your code
hub / github.com/codeaashu/claude-code / getEnumValues

Function getEnumValues

src/utils/mcp/elicitationValidation.ts:104–112  ·  view source on GitHub ↗
(schema: EnumSchema)

Source from the content-addressed store, hash-verified

102 * Get enum values from EnumSchema (handles both legacy `enum` and new `oneOf` formats)
103 */
104export function getEnumValues(schema: EnumSchema): string[] {
105 if ('oneOf' in schema) {
106 return schema.oneOf.map(item => item.const)
107 }
108 if ('enum' in schema) {
109 return schema.enum
110 }
111 return []
112}
113
114/**
115 * Get enum display labels from EnumSchema

Callers 4

ElicitationFormDialogFunction · 0.85
renderFormFieldsFunction · 0.85
getEnumLabelFunction · 0.85
getZodSchemaFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected