How would you explain function schemas to a backend engineer new to AI?
Instruction: 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
Your preparation path
Work through these questions in order. Read the answer aloud, then explain it in your own words.
1. Start with the foundations
Build the vocabulary and explain the core decisions.
2. Apply it to a real workflow
Practice diagnosis, validation, and everyday tradeoffs.
3. Prepare for senior discussions
Explain failure boundaries, recovery, and production choices.
- Design a fallback strategy when tools are unavailable, degraded, or unauthorized. Member answer
- How do you implement MCP step-up authorization without losing scopes or retrying forever? Member answer
- An MCP request resumes after user confirmation. How would you validate its requestState? Member answer
Related Questions
-
easy
-
easy
-
easy
-
easy
-
easy
-
easy