Check an AI employee’s tool arguments before they reach a system
Validate every tool argument against a typed schema, the caller’s permissions and the current target state before execution. Reject malformed or out-of-scope values outside the model and record the reason.
What you need
For an engineering or workflow owner whose AI employee prepares API, database or business-system actions.
- A tool schema and accepted value ranges.
- A safe test environment with harmless records.
- Expected allow and deny cases, with the policy owner identified.
Verify that malformed tool arguments cannot trigger a business action
- Write the valid argument shape, allowed identifiers and value bounds.
- Test one valid request and negative cases for missing fields, wrong types, unknown IDs and out-of-scope values.
- Inspect the execution boundary to confirm validation occurs before the system changes state.
- Record the rejection reason and verify that no partial change occurred.
A valid amount cannot rescue an unknown record ID
Synthetic test values. No real payment or customer record is used.
Scroll the table to see all columns.
| Request | Schema check | Authorization check | State changed? | Result |
|---|---|---|---|---|
| order_id=A-17; amount=500 | Pass | Pass | No; lookup only | Pass |
| order_id missing; amount=500 | Fail | Not run | No | Reject |
| order_id=A-999; amount=500 | Pass | Fail: unknown ID | No | Reject |
| order_id=A-17; amount=-500 | Fail: below zero | Not run | No | Reject |
A-999 is well-formed but not authorized, so schema validation alone is insufficient. The execution boundary must reject it before any write.
What to hand over
A tool-input acceptance table with the request, validation result, state change and reviewer decision.
Limitation. Schema validation catches malformed input but does not establish that a valid request is appropriate; authorization and business rules still need checks.
Next step
Bring one redacted tool definition and the rules that decide which records and values are in scope. Turn them into allow and deny cases.
Related guides
Sources
- Microsoft Learn: typed validation and tool-call controls (accessed 24 November 2026)
- OWASP: validate tool calls outside the agent context (accessed 24 November 2026)
- Microsoft Azure Architecture Center: validate before retrieval and action (accessed 24 November 2026)