Claude Certified Architect – Foundations Practice Question 58: Schema Enum Required

Claude Certified Architect, Foundations · Test 6 · question 8 of 10

Tool Design & MCP Integrationmedium

A create_ticket tool is called by Claude, and the backend keeps rejecting calls: priority arrives as free-form strings such as "urgent!!" or "P1-ish", and customer_id is sometimes missing. The tool's input_schema currently declares both fields as optional strings. Which change to the tool definition most directly fixes this?

Select one answer
Show answer and explanation

Answer:

  • C. Declare priority with an enum of the allowed values, and add customer_id to the schema's required array

C is correct. input_schema is a JSON Schema object: an enum restricts a field to specific values and required lists the properties that must be present (the docs' own example has a unit enum and a required location). Putting these constraints in the schema tells Claude exactly what a valid call looks like, and strict tool use can be added to guarantee schema-valid inputs. The backend should still validate.

A is wrong because it scatters the contract into prose and leaves the schema, which Claude reads for every call, permissive. B is wrong because it hides the problem: Claude still has no list of valid values and may omit fields, and normalization cannot invent a missing customer_id. D is wrong because tool_choice controls whether a tool is called, not whether its arguments are valid.

Reference: Define tools

Practice Test 6 ›

Study guides for Claude Certified Architect, Foundations