{"ok":true,"data":{"service":{"name":"Expense Budget Tracker Agent API","version":"v1","description":"Machine API for onboarding, workspace setup, and restricted SQL."},"auth":{"bootstrapUrl":"https://auth.expense-budget-tracker.com/api/agent/send-code","scheme":"Authorization: ApiKey <key>"},"apiBaseUrl":"https://api.expense-budget-tracker.com/v1","authBaseUrl":"https://auth.expense-budget-tracker.com","docs":{"openapiUrl":"https://api.expense-budget-tracker.com/v1/openapi.json","swaggerUrl":"https://api.expense-budget-tracker.com/v1/swagger.json"},"capabilities":["Load account context","Select a workspace","Inspect allowed SQL schema and hints","Run restricted SQL scripts"]},"actions":[{"name":"send_code","method":"POST","description":"Start email OTP. After this succeeds, tell the user to check spam or junk if the email is not visible, then ask for the 8-digit code and call verify_code. Do not suggest immediately requesting another code.","url":"https://auth.expense-budget-tracker.com/api/agent/send-code","input":{"email":"string"},"auth":"none"},{"name":"openapi","method":"GET","url":"https://api.expense-budget-tracker.com/v1/openapi.json","auth":"none"},{"name":"schema","method":"GET","description":"Inspect allowed relations, columns, and hints. Relation operations: ledger_entries, budget_lines, workspace_settings, and account_metadata support SELECT and, under existing write-approval rules, INSERT, UPDATE, and DELETE; the derived accounts view and global worker-owned fx_rates_raw and fx_rates_daily relations are SELECT-only.","url":"https://api.expense-budget-tracker.com/v1/schema","auth":"ApiKey"}],"instructions":"Ask the user for their email address first, then call send_code. The same email OTP flow handles both signup and login. After send_code succeeds, tell the user to check spam or junk if the email is not visible, then ask for the 8-digit code and call verify_code. Do not suggest immediately requesting another code. After login, save the returned key outside chat memory, preferably in a local .env file as EXPENSE_BUDGET_TRACKER_API_KEY='<PASTE_KEY_HERE>', then call https://api.expense-budget-tracker.com/v1/me, https://api.expense-budget-tracker.com/v1/workspaces, and https://api.expense-budget-tracker.com/v1/workspaces/{workspaceId}/select before SQL. Use https://api.expense-budget-tracker.com/v1/schema to inspect allowed relations, columns, and any agent hints about constraints or write semantics. Relation operations: ledger_entries, budget_lines, workspace_settings, and account_metadata support SELECT and, under existing write-approval rules, INSERT, UPDATE, and DELETE; the derived accounts view and global worker-owned fx_rates_raw and fx_rates_daily relations are SELECT-only. Restricted SQL does not support ON CONFLICT. Only allowlisted functions are supported: SUM, COUNT, MIN, MAX, AVG, and COALESCE. All other functions are blocked; use ILIKE instead of LOWER(...) for case-insensitive text search and explicit date ranges instead of NOW() or DATE_TRUNC(). SELECT results are capped per statement; keep reading rowCount and use returnedRowCount, totalRowCount, and truncated to detect capped output. Use regular single-quoted literals. Dollar-quoted strings are not allowed. Before any long mutating INSERT or UPDATE, first try the same SQL shape on a tiny representative probe: 1-3 literal rows for INSERT or 1 targeted row for UPDATE. The user's explicit approval covers the full approved change set, including that probe and all remaining sequential batches. If the probe fails, fix the SQL and retry the small version. If the probe succeeds, immediately continue with the remaining approved data in sequential batches of at most 100 records per tool call. Do not pause only to ask the user to continue, proceed, or reconfirm for later batches. Only ask again if the requested change itself changes, new ambiguity appears, or execution fails. Example: curl -H 'Authorization: ApiKey $EXPENSE_BUDGET_TRACKER_API_KEY' https://api.expense-budget-tracker.com/v1/me."}