create_card
ChatGPTPersist a new insight card to the user's account. Use this ONLY when the user EXPLICITLY asks to create / save / build / pin / add a card. For one-off data questions ("get sales yesterday", "show me X"), use query_metrics instead — do NOT persist a card just to answer a question. Returns the created card plus an inline visual preview by default. The system automatically selects the best underlying data view. Pass the business_id from your most recent get_analytics_context call. If you pass calculated_columns, FIRST call get_calculated_column_functions() for the exact function names, argument signatures and examples — only use what it returns.
create_dashboard
ChatGPTPersist a new dashboard containing cards grouped by tabs. Use this ONLY when the user EXPLICITLY asks to create / save / build a dashboard. Do NOT auto-create a dashboard just because the user asked for several metrics — return data via query_metrics and ask whether they want a dashboard. Returns the created dashboard plus an inline visual preview of all cards by default. Pass the business_id from your most recent get_analytics_context call.
get_analytics_context
ChatGPTGet currency, timezone, week start day, and date periods for translating relative dates. Call this at the start of every conversation.
get_available_dimensions
ChatGPTGet all available dimensions for grouping metric queries. Pass the business_id from your most recent get_analytics_context call.
get_available_filters
ChatGPTGet all available filters for metric queries. Pass the business_id from your most recent get_analytics_context call.
get_available_metrics
ChatGPTGet all available metrics that can be queried. Pass the business_id from your most recent get_analytics_context call.
get_calculated_column_functions
ChatGPTList the functions and operators usable in a calculated-column formula. Returns functions (each with its name, argument signature, an example, and needs_dimension/variadic flags) and operators. Only the listed functions are supported, with the argument counts shown; a function flagged needs_dimension needs a dimension column (e.g. location, date) as an argument. Call this before writing a calculated_columns formula for create_card.
get_card
ChatGPTFetch an existing insight card by its meta_card_id, with an inline visual preview.
get_dashboard
ChatGPTFetch an existing dashboard by its dashboard_id, with an inline visual preview of every card in every tab.
get_locations
ChatGPTGet the list of locations for the current business, including custom field labels and per-location values. custom_field_1/2/3 are per-location numeric attributes. Their human-readable labels (e.g. 'Income', 'Rent', 'COGS %') live on the business as custom_field_N_name. Call this when the user names a non-standard per-location attribute that is not one of the standard dimensions — map the human name to custom_field_N via its label, then use the per-location value for any calculation. Pass the business_id from your most recent get_analytics_context call.
list_businesses
ChatGPTList every business the authenticated user can access. Each entry has a numeric value (business_id) and a human-readable label. The response also carries the currently-active business_id and business_name at the top level — use these in subsequent tool calls.
list_logbooks
ChatGPTList logbook templates with their associated locations. Pass the business_id from your most recent get_analytics_context call.
list_logs
ChatGPTList manager logs, optionally filtered by location, logbook, and date range. Pass the business_id from your most recent get_analytics_context call.
list_reviews
ChatGPTList customer reviews, optionally filtered by location and date range. Pass the business_id from your most recent get_analytics_context call.
query_metrics
ChatGPTQuery a single business metric for a date range, optionally grouped by dimensions and filtered. Pass the business_id from your most recent get_analytics_context call. If the response contains 0 rows, check query_info.filters_applied to verify your filter values are correct. Common causes of empty results: - A filter value that doesn't match any data (e.g. wrong location name). Try querying with fewer filters or without filters to discover valid values. - A date range with no activity. Do NOT assume a 0-row result means a dimension/filter combination is unsupported.
switch_business
ChatGPTChange the active business for all subsequent tool calls. Returns the new business_id and business_name — use these for subsequent calls. After switching, re-call get_analytics_context: currency, timezone, week start and date_periods are business-specific.