AI EngineeringInterview preparation
Advanced·Concept·2 min read

Tools and their safe contracts

Practice this question
ToolArguments from modelTrusted server context/checksMinimal resultFailure behavior
Customer lookupCustomer reference if neededTenant, caller, permitted customer relationshipPermitted display/profile fieldsDeny access without leaking existence
Policy lookupPolicy ID or safe selectorOwnership, validity, allowed product/regionPolicy/version IDs and permitted summary fieldsClarify selector or return unavailable
Claim statusClaim IDTenant, policy/customer ownership, read scopeStatus code, safe reason, required-doc typesDenied, not found under safe policy, or transient unavailable
Create claimApproved draft referenceExact approval, current rules, idempotency keyClaim ID and durable receiptReject invalid draft; reconcile unknown commit
Email draft/sendDraft ID / permitted recipient selectionRole, consent, recipient/attachment/content checks, send approvalDraft or message receiptNo send on invalid approval; reconcile uncertain send
Document searchBounded queryTenant, document ACLs, policy/version/date filtersBounded excerpts and source IDsNo evidence versus retrieval failure kept distinct
  • Never accept a model's customerId as proof of the current customer.
  • Never let the model supply an unrestricted email URL, SQL query, database filter, or role field.
Adapted from 13_AI.MD · “Tools and their safe contracts”. Code examples are study fragments. Difficulty and core labels are editorial estimates; version-specific behavior should be checked against your project.