Why it matters
A product manager can define the difference between a suggestion and a committed action. A developer can verify every argument and apply the user’s permissions before a side effect.
Core concepts
A schema defines a shape
A structured-output schema can require fields such as category, evidence and needs_review. Handle refusal, incomplete output and validation failure in the application. A grammatically valid JSON response can still assign the wrong category or cite the wrong source.
A tool call is a proposal
The model can choose from exposed functions and suggest arguments. The application validates those arguments, checks authorization and decides whether to execute. Return a bounded result for the model to use. Keep credentials and record-level access checks in trusted code.
MCP connects applications and services
In the Model Context Protocol, a host coordinates clients that connect to servers. Servers may expose tools, resources or prompts. Discovery describes what is offered; it does not decide which user may run it. Scope each integration to the action it needs and maintain a review boundary for writes.
Prompts can cross a trust boundary
A retrieved document, message or tool result can include text that asks for new actions. Treat that text as data. Restrict tool choice and permissions, validate outcomes, and require confirmation at consequential actions. A system prompt alone cannot enforce access control.
Try it step by step
- Start with a read-only tool and a narrow, versioned argument schema.
- List what code must check before any action and what the human must see before confirming a consequential change.
- Reject unknown fields, validate the business meaning and record who authorized the final action. Handle tool errors explicitly.
For each tool write a contract: accepted inputs, required identity, allowed records, side effects, confirmation method, retry rule and audit evidence.
Worked example
Fictional example: An assistant drafts a workshop transfer from one booking to another. The tool can show available seats. A separate confirmed operation checks the user owns the booking, the seat still exists and the request is safe to retry.
Common mistake
Granting broad write access because the model was instructed to act carefully.
Practice exercise
Design a schema for a read-only availability lookup. Add a second rule for the business layer that JSON Schema alone cannot know, such as whether this requester may view that workshop.
Check your understanding
A schema-valid tool call would transfer another user’s booking. What should happen?
- Trust the schema
- Reject it in the authorization layer
- Let the model decide again
Show answer
Reject it in the authorization layer. A valid shape does not confer authority over a record.
Takeaway
A well-formed tool request still needs permission and a business check.