MCPcopy Index your code
hub / github.com/callstack/agent-device / integerSchemaWithBounds

Function integerSchemaWithBounds

src/commands/command-input.ts:529–538  ·  view source on GitHub ↗
(
  description: string | undefined,
  options: { min?: number; max?: number },
)

Source from the content-addressed store, hash-verified

527}
528
529function integerSchemaWithBounds(
530 description: string | undefined,
531 options: { min?: number; max?: number },
532): JsonSchema {
533 return {
534 ...integerSchema(description),
535 ...(options.min === undefined ? {} : { minimum: options.min }),
536 ...(options.max === undefined ? {} : { maximum: options.max }),
537 };
538}
539
540function fieldProperties(fields: CommandFieldMap): Record<string, JsonSchema> {
541 return Object.fromEntries(Object.entries(fields).map(([key, field]) => [key, field.schema]));

Callers 1

integerFieldFunction · 0.85

Calls 1

integerSchemaFunction · 0.85

Tested by

no test coverage detected