AI tool usage
The public API can be exposed to AI assistants as tools. Use the AI tool schema when a framework accepts JSON tool definitions, and use the OpenAPI schema when a framework imports OpenAPI directly.Recommended agent policy
Give the assistant this policy before allowing write access:Tool selection
| User intent | Tool |
|---|---|
| ”Show my subscriptions” | list_subscriptions |
| ”Find my Netflix subscription” | list_subscriptions, then match by name/category |
| ”Show details for this id” | get_subscription |
| ”Add ChatGPT Plus” | Confirm, then create_subscription |
| ”Change Netflix to yearly” | list_subscriptions, confirm target/change, then update_subscription |
| ”Delete the duplicate Netflix record” | list_subscriptions, confirm exact name/id, then delete_subscription |
Risk levels
| Risk | Operations | Agent behavior |
|---|---|---|
| Low | List and get | Can run directly when the user asks |
| Medium | Create and update | Confirm the planned write before calling |
| High | Delete | Confirm the exact record name and id before calling |
Example flow
User:- Calls
list_subscriptions. - Finds the Netflix record.
- Asks:
- Calls
update_subscriptiononly after confirmation:
Error recovery
Errors use a stable shape:field and suggestedFix to correct the next request. For writes, ask for confirmation again if the corrected payload changes the effective action.