How would you explain function schemas to a backend engineer new to AI?

Instruction: Describe what tool schemas do in a model-driven workflow.

Context: Checks whether the candidate can explain the core concept clearly and connect it to real production decisions. Describe what tool schemas do in a model-driven workflow.

Updated

Example Answer

A function schema describes the structured request the model may propose; it is not the implementation or permission to run it. For get_ticket, I might require a string ticket ID and define a structured result containing the current status.

JSON Schema can reject a missing ID or wrong type. The server must still check that the authenticated user can read that ticket. A valid ID belonging to another tenant is not a valid business request. I'd keep the schema, description, examples, and validator aligned, then test both missing fields and semantically wrong calls. The model provider's tool-calling API, an MCP tool definition, and the ticket service API are separate contracts even when an adapter connects them.

Why this works

Separates request shape, authorization, and API layers instead of implying a schema proves safety.

Practice follow-up

What should the application do with a valid-shaped call targeting an unauthorized ticket?

Source

JSON Schema objects.

Your preparation path

Work through these questions in order. Read the answer aloud, then explain it in your own words.

Related Questions