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

Function getEnumLabel

src/utils/mcp/elicitationValidation.ts:130–133  ·  view source on GitHub ↗
(schema: EnumSchema, value: string)

Source from the content-addressed store, hash-verified

128 * Get label for a specific enum value
129 */
130export function getEnumLabel(schema: EnumSchema, value: string): string {
131 const index = getEnumValues(schema).indexOf(value)
132 return index >= 0 ? (getEnumLabels(schema)[index] ?? value) : value
133}
134
135function getZodSchema(schema: PrimitiveSchemaDefinition): z.ZodTypeAny {
136 if (isEnumSchema(schema)) {

Callers 2

ElicitationFormDialogFunction · 0.85
renderFormFieldsFunction · 0.85

Calls 2

getEnumValuesFunction · 0.85
getEnumLabelsFunction · 0.85

Tested by

no test coverage detected