act_on_segment_result
ChatGPTAct on one segment result by segmentRunId (from search_metric_segment_results): ACKNOWLEDGE, MARK_AS_RESOLVED, MARK_HIT, or the UNDO_* variants. This updates the current match state and edits any Slack notification already sent for this result. On a metric the acting user does not own (get_metric_configuration and list_metrics show isOwnedByCaller), the call changes nothing and returns { changed: false, confirmationRequired: "confirmedNotOwner", ownerName, message } instead. Tell the user whose metric it is, ask them to confirm, and only then call again with confirmedNotOwner: true. Never set it without asking. Organization admins are asked too. This is a check-in with the user, not a permission: it does not change what the acting user may do.
add_mixpanel_insights
ChatGPTAdd saved Mixpanel insights (up to 20 per call) to an existing Mixpanel data source and start a sync that fetches only the new ones. Send each insight's numeric insightId; insightName and insightUrl are looked up in Mixpanel when left out, and an id Mixpanel cannot find is rejected by name. An insight the data source already has is listed in skipped, not treated as an error. Returns { dataSourceId, added: [{ insightId, insightName }], skipped, syncStarted }. The sync takes a minute or so, and when it finishes the Mixpanel source creates a data set for each new insight by itself, named after the insight: call list_data_sets to find them rather than create_data_set. This is the only change to a data source's connection settings that MCP makes: the credentials, the project, the workspace and the connection method still change only through begin_data_source_setup. It only edits a Mixpanel data source the acting user may manage in Lighthouse and the key's data source allow-list includes; any other id is reported as not found. Example: {"dataSourceId":"12","insights":[{"insightId":"12345678"},{"insightId":"23456789","insightName":"Weekly signups"}]}
archive_data_set
ChatGPTArchive a data set to hide it without deleting it, or unarchive it (archived: false). Before archiving, tell the user what will be hidden or stopped and wait for their yes; unarchiving needs no confirmation. An archived data set is hidden from list_data_sets unless you pass archived: true, and metrics cannot be made LIVE on it. It is refused while a LIVE metric uses it: pause or archive those metrics first (update_metric, archive_metric). Paused and draft metrics do not block it. This is the reversible alternative to delete_data_set: prefer it when the user may want the data set back. dataSetId is a sequential id (e.g. 7) or UUID. As in the web app, only someone who may edit the data set can do it; a data set that does not exist or is outside the key's allow-lists is reported as not found. Archiving an archived data set changes nothing. Returns { dataSetId, sequentialIdentifier, name, archived, archivedAt }. Example: {"dataSetId":"7","archived":true}
archive_data_source
ChatGPTArchive a data source (a warehouse or tool connection) to hide it and stop it syncing without deleting it, or unarchive it (archived: false). Before archiving, tell the user what will be hidden or stopped and wait for their yes; unarchiving needs no confirmation. An archived data source is hidden from list_data_sources unless you pass archived: true, no longer collects its tables and columns, and its data sets are hidden from list_data_sets (they keep their own archive state). Metrics cannot be made LIVE on it. It is refused while a LIVE metric uses it: pause or archive those metrics first. The credentials are kept, so unarchiving needs no setup. This is the reversible alternative to delete_data_source: prefer it when the user may want the connection back. dataSourceId is a sequential id (e.g. 12) or UUID. As in the web app, only the data source's creator, an admin of it or an organization admin can do it; a data source that does not exist or is outside the key's allow-list is reported as not found. A key with a data set allow-list cannot use it, because it hides every data set of the source. Archiving an archived data source changes nothing. Returns { dataSourceId, sequentialIdentifier, name, archived, archivedAt }. Example: {"dataSourceId":"12","archived":false}
archive_metric
ChatGPTArchive a metric to get it out of the way without deleting it, or unarchive it (archived: false). Before archiving, tell the user what will be hidden or stopped and wait for their yes; unarchiving needs no confirmation. An archived metric is hidden from list_metrics unless you pass archived: true, and a LIVE metric is paused first, so it stops running and sending alerts. Its history is kept. Unarchiving only makes it visible again and leaves it PAUSED (or DRAFT or INVALID, as it was): set status LIVE with update_metric to resume it, which is refused while the metric, its data set or its data source is archived. This is the reversible alternative to delete_metric: prefer it when the user may want the metric back. metricId is a sequential id (e.g. 153) or UUID. It only works on a metric the acting user may edit in Lighthouse and the key's metric allow-list includes; any other id is reported as not found. Archiving an archived metric changes nothing. On a metric the acting user does not own (get_metric_configuration and list_metrics show isOwnedByCaller), the call changes nothing and returns { changed: false, confirmationRequired: "confirmedNotOwner", ownerName, message } instead. Tell the user whose metric it is, ask them to confirm, and only then call again with confirmedNotOwner: true. Never set it without asking. Organization admins are asked too. This is a check-in with the user, not a permission: it does not change what the acting user may do. Returns { metricId, sequentialIdentifier, name, status, archived, archivedAt }. Example: {"metricId":"153","archived":true}
begin_communication_source_setup
ChatGPTStart connecting a communication source (a place Lighthouse sends notifications to) WITHOUT any token, code or password ever passing through this conversation. It returns a link to a Lighthouse page ({ setupId, url, status, expiresAt }). Give the user the url and ask them to open it while signed in to Lighthouse in the same organization and finish the connection there. Never ask the user for a token or secret in the chat. The link works for 20 minutes, only for the user this key or agent connection acts for, and completes once; calling this again for the same type returns the same link while it is still waiting. Nothing is created until the user finishes, so afterwards call get_setup_status with the setupId: status completed carries the new communication source id in entityId, and unknown means it may or may not have been created, so check list_communication_sources before starting another setup. Send type SLACK (the user approves Lighthouse on Slack's own consent page, and more than one workspace can be connected), TEAMS (the user signs in with their Microsoft work account, and only a Microsoft 365 Global Administrator or Teams Administrator can finish it, so give the link to one; Lighthouse then reaches the teams that added the Lighthouse Teams app, and it may not be available to every organization yet) or EMAIL (the user names it on a form; an organization can have only one email communication source). Example: {"type":"SLACK"}
begin_data_source_setup
ChatGPTStart creating a data source, or replacing the credentials or connection settings of an existing one, WITHOUT the credentials ever passing through this conversation. It returns a link to a Lighthouse page ({ setupId, url, status, expiresAt }). Give the user the url and ask them to open it while signed in to Lighthouse in the same organization, fill in the connection details there and save. Never ask the user for a password, key or token in the chat, and never put one in a tool argument. The link works for 20 minutes, only for the user this key or agent connection acts for, and saves once; calling this again for the same target returns the same link while it is still waiting. Nothing is created until the user saves, so afterwards call get_setup_status with the setupId: status completed carries the new data source id in entityId, and unknown means the save may or may not have happened, so check list_data_sources before starting another setup. Send dataSourceType to create (POSTGRES, SNOWFLAKE, BIGQUERY, MSSQL, HTTP_CONNECTOR, MIXPANEL) or dataSourceId to reconnect. A type that is not available for the acting user's account yet is refused before any link is made; an existing data source of that type can still be reconnected. It only works for a data source the acting user may manage in Lighthouse; any other id, including one outside the key's allow-lists, is reported as not found, and a key with an allow-list cannot create data sources. To create: {"dataSourceType":"POSTGRES"}. To reconnect: {"dataSourceId":"12"}
begin_integration_action_source_setup
ChatGPTStart creating an integration action source (a place Lighthouse can send actions to, with its credentials: a built-in provider such as an issue tracker, or any HTTP endpoint), or replacing the credentials or connection settings of an existing one, WITHOUT the credentials ever passing through this conversation. It returns a link to a Lighthouse page ({ setupId, url, status, expiresAt }). Give the user the url and ask them to open it while signed in to Lighthouse in the same organization, fill in the details there and save. Never ask the user for a password, key or token in the chat. The link works for 20 minutes, only for the user this key or agent connection acts for, and saves once; calling this again for the same target returns the same link while it is still waiting. Nothing is created or changed until the user saves, so afterwards call get_setup_status with the setupId: status completed carries the integration action source id in entityId, and unknown means the save may or may not have happened, so check list_integration_action_sources before starting another setup. Send integrationActionSourceId to reconnect one; it only works for an integration action source the acting user may manage in Lighthouse, and any other id is reported as not found. No action is run by this. To create, send integrationActionSourceType (HTTP when left out); the link opens the connection form of that type: {"integrationActionSourceType":"LINEAR"}. A type that is not available to the acting user is refused. To reconnect, send the id; the source keeps its own type: {"integrationActionSourceId":"0b0d3a1e-5c52-4c3e-9c58-6f1a9a0e7a11"}
change_member_role
ChatGPTChange a member's role to owner, admin, member or viewer in Clerk, which changes what that person can do in Lighthouse at once. Lower someone's role (admin to member, or anyone to viewer) only when the admin asked for it, and confirm the person and the new role with the admin before you call this. It never changes the acting user's own role, never demotes the last admin or changes the last owner, never gives a role higher than the acting user's, and never changes someone ranked above the acting user, so only an owner can change an owner or make someone an owner. If two people demote each other at the very same moment and no admin or owner would be left, the change is undone. Transferring ownership is done in the Lighthouse web app, not here. A user who is not a member of this organization is reported as not found. Only an organization admin can use it, checked against the role Clerk has at that moment. Example: {"userId":"user_2abc","role":"admin"}
check_metric_run_status
ChatGPTReturn the current status of a metric execution previously started with run_metric. metricRunId is an execution id, not a per-segment result id. A run stays IN_PROGRESS until its notifications and actions are sent, which can be after its segment results are stored; resultsAvailable is true as soon as every result is stored (and when DONE), so read results then without waiting for DONE. When error is set, errorHint says what to do about a cause you can act on, for example that the source may be rate limiting and to retry later.
create_business_group
ChatGPTCreate a business group with its members, like Business groups in the Lighthouse web app. Members can then be given access to metrics and data sources shared with the group. Each call makes another group; the name must not be taken. Every member must already belong to this organization (find them with search_organization_users); this tool does not invite anyone. Only an organization admin can use it, checked on each call (a role change can take up to a minute to apply). Example: {"name":"Finance","description":"People who work with revenue metrics","memberUserIds":["user_2abc"]}
create_data_set
ChatGPTCreate a data set from one table of a data source, the layer metrics are built on. A data set made this way has the trend and threshold options that metrics on a data set get, which RAW_SQL metrics do not. Find the table id with list_data_source_tables and the exact column names with list_data_source_columns (both need the query_data_source capability). Leave out columns to include every column with default roles (number columns can be metrics, text columns segments, date columns the date; every column can filter), or list the columns you want. The default date column must be a date or timestamp column. The acting user needs the right to create data sets on the data source in Lighthouse; a data source they cannot read, or that the key's allow-lists leave out, is reported as not found, and a key with a data set allow-list cannot create data sets. Data sets defined by custom SQL are not supported. A Mixpanel source creates a data set for each insight when it syncs, named after the insight: check list_data_sets before creating one there; a taken name is refused with the id of the data set that has it. Returns the data set with its columns; use its entityId as dataSetId in create_metric. Example: {"dataSourceId":"12","dataSourceTableId":"0b6f2a51-3a4c-4f0e-9d2b-8f1f6a1c7e10","name":"Orders","description":"One row per order","status":"LIVE","defaultDateColumnName":"created_at","columns":[{"columnName":"id","canBeFilter":true},{"columnName":"amount","canBeMetric":true,"canBeFilter":true},{"columnName":"country","canBeSegment":true,"canBeFilter":true},{"columnName":"created_at","canBeDateTime":true,"canBeFilter":true}]}
create_metric
ChatGPTCreate a new metric definition. CUSTOM needs dataSetId plus column ids from get_data_set. RAW_SQL needs dataSourceId, sql, metricColumnName, and sqlColumns, and must not set dataSetId. sqlColumns roles are lowercase: "metric", "filter", "segment", "date_time". A RAW_SQL threshold that compares CURRENT_METRIC to another column (rightSideField filterFieldType COLUMN, filterFieldName equal to that columnName) needs that column selected by the sql and listed in sqlColumns with the "filter" role, or a segment column (one of segmentRawColumnNames, segments enabled); create_metric and update_metric reject it otherwise for a non-DRAFT metric, and test_metric reports it too (as a warning for a DRAFT, as an error for any other status). status: DRAFT is unfinished work that is saved without the full validation or the RAW_SQL live preview, is never scheduled, and a new DRAFT has no nextExecutionTime. PAUSED is validated like LIVE but the scheduler never runs it (it can still be run by hand with run_metric). LIVE is the only status the scheduler runs, at each slot of its schedule, and it counts toward the plan's live metric limit. INVALID is only ever set by Lighthouse: every failed run, scheduled or started by hand (run_metric included), adds one to the failure count and a successful run resets it, and when the scheduler finds a LIVE metric whose count has reached the limit (3 by default) it sets INVALID, after which the metric is no longer scheduled. create_metric and update_metric refuse to set it (sending INVALID for a metric that is already INVALID is ignored); to resume one, fix the cause and set status LIVE with update_metric, which also resets the count. nextExecutionTime is the next slot of the schedule, worked out each time a non-DRAFT metric is saved. It moves forward only after a successful scheduled run of a LIVE metric: a failed scheduled run leaves it where it is, so the next scheduler tick retries, and a run started with run_metric never moves it. For a PAUSED metric it is only the slot the schedule would hit: nothing runs then, and it does not move until the metric is saved again (set LIVE with update_metric to resume). Every metric needs a scheduleDefinition that can produce a run time (MANUAL with scheduleTypeDefinition, or CRON with cronExpression); there is no default, and a metric without one is rejected. Call search_metric_configuration_examples before building JSON, then test_metric before create. RAW_SQL is previewed on save and refused if the preview fails or takes longer than 50 seconds (nothing is saved then; narrow the SQL and save again). CUSTOM is not previewed on save (as in the web editor): a non-draft CUSTOM metric is saved even if test_metric failed. After test_metric passes on this exact configuration, send lastTestWasSuccessful: true so the metric is saved as tested (never copy it from another metric's configuration); without it the response carries a warnings entry saying the metric was saved untested, so run test_metric first, or save as DRAFT. Use list_data_sources, list_data_sets, and list_communication_sources for real ids. Email alerts from agents and API keys can only go to members of this organization, so emailRecipients may list only member email addresses. Access fields (viewAccessLevel, editAccessLevel, viewerUserIds, editorUserIds, viewerBusinessGroupIds, editorBusinessGroupIds, ownerId) work as described in update_metric; a new metric is visible to and editable by everyone unless set otherwise. Before creating a metric, ask the user who may view it, who may edit it and who should own it (ownerId, the acting user by default); if they have no preference, leave those fields out. Returns the metric summary plus configuration, the stored configuration in the shape get_metric_configuration returns (only for a key that also has GET_METRIC), so no second call is needed to confirm what was saved.
delete_business_group
ChatGPTDelete a business group, as Delete in Business groups in the Lighthouse web app does. Its members stay in the organization; only the group goes, and it cannot be restored through MCP, so be sure it is the right group and that the admin wants it deleted. A group that metrics or data sources are still shared with is refused: remove it from their access first (update_metric's viewerBusinessGroupIds and editorBusinessGroupIds for a metric). A group that does not exist, is already deleted or belongs to another organization is reported as not found. Only an organization admin can use it, checked on each call (a role change can take up to a minute to apply). Example: {"businessGroupId":"0b6f2a51-3a4c-4f0e-9d2b-8f1f6a1c7e10"}
delete_data_set
ChatGPTDelete a data set, as Delete on a data set in the Lighthouse web app does. It cannot be restored through MCP, so be sure it is the right data set and that the user wants it deleted; if they may want it back, use archive_data_set instead. A data set that metrics still use is refused: delete those metrics first with delete_metric. A data set Lighthouse generated from a data source's settings cannot be deleted on its own; it goes with its data source. A data set that does not exist, is already deleted, belongs to another organization or is outside the key's allow-lists is reported as not found. As in the web app, its creator, an admin of its data source, the data source's creator or an organization admin may delete it; anyone else is refused. Example: {"dataSetId":"7"}
delete_data_source
ChatGPTDelete a data source (a warehouse or tool connection), as Delete on a data source in the Lighthouse web app does. The data sets Lighthouse generated for it are deleted with it. It cannot be restored through MCP, and connecting again means entering the credentials again, so be sure it is the right data source and that the user wants it deleted; if they may want it back, use archive_data_source instead. A data source that metrics or other data sets still use is refused: delete those first with delete_metric and delete_data_set. A data source that does not exist, is already deleted, belongs to another organization or is outside the key's allow-list is reported as not found. A key with a data set allow-list cannot use it, because the generated data sets go with the source. As in the web app, its creator, an admin of the data source or an organization admin may delete it; anyone else is refused. Example: {"dataSourceId":"12"}
delete_metric
ChatGPTPermanently delete a metric. The metric and its history (runs, results and alerts) are removed and cannot be restored through MCP, so be sure it is the right metric and that the user wants it deleted before you call this; if they may want it back, use archive_metric instead. metricId is a sequential id (e.g. 153) or UUID. It only deletes a metric the acting user may delete in Lighthouse and the key's metric allow-list includes; any other id, including one already deleted, is reported as not found. Deletes one metric at a time. On a metric the acting user does not own (get_metric_configuration and list_metrics show isOwnedByCaller), the call changes nothing and returns { changed: false, confirmationRequired: "confirmedNotOwner", ownerName, message } instead. Tell the user whose metric it is, ask them to confirm, and only then call again with confirmedNotOwner: true. Never set it without asking. Organization admins are asked too. This is a check-in with the user, not a permission: it does not change what the acting user may do.
duplicate_metric
ChatGPTCopy a metric, like Duplicate in the Lighthouse web app. The copy is a new DRAFT metric owned by the acting user, so it does not run or send notifications until it is made LIVE. It keeps the original's definition, schedule, notification settings, KPIs and access levels, and its name gets a copy suffix. Returns the new metric; change it with update_metric. Each call makes another copy. It only copies a metric the acting user may manage in Lighthouse; any other id, including a metric outside the key's allow-lists, is reported as not found. A key with a metric allow-list cannot duplicate metrics, because the copy would be outside the list. Example: {"metricId":"153"}
get_business_group_change_history
ChatGPTRead what was changed on a business group: its name, description and members (as user ids; search_organization_users has their names). Use it to see who added or removed a member, and when. Lists the saved versions newest first: who changed it (by name), when, from where (web app, API or MCP), and for each update the fields that changed with their values before and after. A value longer than 1000 characters is cut. Paginated (default 20 versions, maximum 50). Takes the business group id from list_business_groups.
get_communication_source
ChatGPTGet one communication source plus matching channels and users (id and display name). Optional searchText, skip, and limit page the directory. Use these ids in notification JSON.
get_communication_source_change_history
ChatGPTRead what was changed on a communication source (Slack, email and similar). When notifications stop arriving, read this first to see whether it was disabled, renamed or reconnected. Lists the saved versions newest first: who changed it (by name), when, from where (web app, API or MCP), and for each update the fields that changed with their values before and after. A value longer than 1000 characters is cut. Paginated (default 20 versions, maximum 50). Shows its name, description, type, status and whether it is disabled. A reconnection is shown as a changed connection without its values, and credentials are never shown. Accepts a sequential id or UUID.
get_current_metric_matches
ChatGPTGet whether each metric segment is currently matching (alerting) right now, not historical run history. Defaults to currently matching segments. Accepts metric sequential ids or UUIDs.
get_data_set
ChatGPTGet one data set by sequential id or UUID, including columns (entityId, name, canBeMetric/filter/segment/dateTime) needed to build CUSTOM metrics.
get_data_set_change_history
ChatGPTRead what was changed on a data set. When a metric built on it fails or its values change, read this first, next to get_metric_change_history, to see whether the data set's SQL, table, default date column or status changed. Lists the saved versions newest first: who changed it (by name), when, from where (web app, API or MCP), and for each update the fields that changed with their values before and after. A value longer than 1000 characters is cut. Paginated (default 20 versions, maximum 50). Shows its name, description, status, type, data source, table and default date column. A change to a custom SQL data set's query is shown as changed without its values, as get_data_set does not return it. Column settings are not part of a version. Accepts a sequential id or UUID.
get_data_source
ChatGPTGet one data source by sequential id or UUID. Use the entityId as dataSourceId when creating CUSTOM or RAW_SQL metrics.
get_data_source_change_history
ChatGPTRead what was changed on a data source. When a metric on it fails, returns no data or behaves differently, or the data source stops syncing, read this first to see whether someone changed it just before. Lists the saved versions newest first: who changed it (by name), when, from where (web app, API or MCP), and for each update the fields that changed with their values before and after. A value longer than 1000 characters is cut. Paginated (default 20 versions, maximum 50). Shows its name, description, status, whether it is disabled, whether the connection was tested and the metric and data set creation access levels. A change to its connection settings is shown as changed without its values, and credentials are never shown. Accepts a sequential id or UUID.
get_integration_action_source
ChatGPTGet one integration action source by UUID (from list_integration_action_sources or get_setup_status). Each source has integrationActionSourceId, name, type and typeDisplayName, status, disabled, isConnectionTested, hasCredentials, connectionSettings (the non-secret connection fields only, such as an HTTP base URL; a credential or secret is never returned), and, for a personal key or a signed-in agent connection, canManage (the user may create and update its actions) and canUseInMetric (the user may reference it in a metric's actionsToExecute). An organization API key reads as the organization, so these two are left out; its on-behalf user is checked when it creates or updates an action. A personal key or signed-in agent connection reads what its user can see in Lighthouse; an organization API key reads every source of the organization. A source that does not exist, or that the user cannot see, is reported as not found. Example: {"integrationActionSourceId":"0b0d3a1e-5c52-4c3e-9c58-6f1a9a0e7a11"}
get_metric_change_history
ChatGPTList the saved versions of a metric, newest first: who changed it (by name), when, from where (web app, API or MCP), and for each update the fields that changed with their values before and after. When a metric breaks, alerts differently or stops alerting, read this first to see what was changed just before, or whether someone already tried a threshold; if the metric itself did not change, get_data_set_change_history and get_data_source_change_history show changes to what it reads. Credentials are never shown, and a value longer than 1000 characters is cut. Changes can contain old SQL, notification text and email recipients: the same data get_metric_configuration returns for the current version, for older ones. Accepts a sequential id or UUID. Paginated (default 20 versions, maximum 50).
get_metric_configuration
ChatGPTReturn the full metric form JSON for an existing definition so you can edit it. This is the configured monitor, not execution history. It includes who can see and edit the metric: viewAccessLevel, editAccessLevel, ownerId, and the viewerUserIds, editorUserIds, viewerBusinessGroupIds and editorBusinessGroupIds lists (used when a level is SELECTED_USERS); change them with update_metric (only the owner, the creator or an organization admin may). ownership says who owns the metric (ownerName) and whether the acting user owns it (isOwnedByCaller); it is read-only and ignored if sent back to update_metric. get_metric_change_history shows who created it. Before changing a metric the user does not own, tell them whose it is. Accepts sequential id or UUID. runTime gives how long the metric's runs take, read-only: lastRunMs (the latest finished run) and averageRunMs (finished runs of the last windowDays days, running ones left out), each the sum of the run's warehouse query times with every query counted at no more than timeLimitMs, so a run that timed out counts at the limit. isRunning says a run is going now; while isCollecting is true the counts are still being gathered and averageRunMs is left out.
get_metric_value_history
ChatGPTRead how a saved metric behaved over time, from the runs it stored. days has one entry per day and segment: the day's average value, its min and max, how many runs it had and how many of them met the threshold. Empty values are stored as 0 and count in the averages. summary.segments gives each returned segment's days, runs, threshold-met runs and days, and the mean, standard deviation, coefficient of variation, min and max of its daily averages, to judge noise and whether the threshold fits. runHealth has one entry per day with a run: runs, failed runs and the metric versions used. heatmap gives the segment runs by weekday and 4-hour block of the day in the metric's timezone (only blocks with a run; for the segments passed, or else for every segment of the metric, not only the 10 in days, so its totals can be higher than summary's): runs, threshold-met runs and runs marked as real hits, to see whether alerts bunch up at certain times, such as Monday mornings or weekends, which a schedule change or a day-of-week comparison may fix better than a new threshold. configVersions lists the versions of the metric saved in the range (when, how and from where; at most 50; only for a key that can also read metric configurations), and get_metric_change_history has what each one changed. If run health, the heatmap or versions cannot be read, runHealthUnavailable, heatmapUnavailable or configVersionsUnavailable is set instead and the rest still comes back. Pass columns (up to 3) to also read the stored values of calculated columns, rule columns (such as a baseline or threshold) or SQL columns as columns, per day and segment, for the same segments as days; a name the metric does not have comes back in unknownColumns. A calculated column that was renamed has no values before the rename. Days are in the metric's timezone, days with no run are left out of days, and the range is at most 90 days (default the last 30). Without segments you get the 10 segments with the most value plus an OTHER bucket for the rest; pass segments (up to 30 names) to read specific ones. Reads stored runs only and runs no warehouse query. Accepts a sequential id or UUID.
get_organization_settings
ChatGPTRead the current organization and its settings: its id and name, your role in it (owner, admin, member or viewer), the time zone, AI model, error notification switch and destination, and automatic metric suggestions. It never returns credentials or billing details. Any member can use it, as in the web app; only an organization admin can change the settings.
get_savings_progress
ChatGPTWhere each finding of a Snowflake data source stands now, any day, without a new report: open, holding (the latest report no longer found it), ignored with its reason, or gone, with its owner and saving a month, and counts of each. trackingAvailable says whether money saved is tracked yet; when it is false the money fields are null and message says why. Runs no warehouse query and has no daily limit. An organization API key can read it. A personal key or a signed-in connection can only when its user is an organization admin or the person who installed the Snowflake kit; anyone else gets: "Savings reports are open to organization admins and the person who installed the Snowflake kit.". Example: {"dataSourceId":"3f6c2a8e-1d4b-4c7a-9e5f-2b8d6a0c4e17"}
get_savings_report
ChatGPTRead a Snowflake savings report. While it runs (QUEUED or IN_PROGRESS) it returns the step it is on; call again no sooner than a minute later, or let the user come back later. FAILED comes with the reason. DONE comes with the summary (spend, savings a month and a year), the savings tracker when there is one, the 3 findings that save the most with their fix and trade-off, every finding's findingId, title and saving, and reportUrl, the report's page in Lighthouse: share that link with the user. Set includeFullReport for the whole report. People are named. Use a findingId in update_finding. Runs no warehouse query. An organization API key can read it. A personal key or a signed-in connection can only when its user is an organization admin or the person who installed the Snowflake kit; anyone else gets: "Savings reports are open to organization admins and the person who installed the Snowflake kit.". Example: {"reportId":"8a1e5c3d-7b2f-4e6a-9c0d-5f4b3a2e1d09"}
get_savings_settings
ChatGPTRead the organization's Snowflake savings report settings: the prices (per credit and per TB a month, whether they are the customer's own or assumed, and when they last changed), the monthly report mode, and reportDestination: where the monthly report's message goes now, first match wins: the channel set here (SETTINGS_CHANNEL), the report channel chosen when the Snowflake kit was installed (KIT_REPORT_CHANNEL), the kit's alert channel (KIT_ALERT_CHANNEL), else an email to the person who installed the kit (EMAIL_TO_KIT_OWNER); NONE when the kit is gone and no channel is set. A channel of an app that was removed, paused or disconnected is passed over. Prices are null until the customer gives them or says they do not know them. Change them with update_savings_settings. Runs no warehouse query. An organization API key can read it. A personal key or a signed-in connection can only when its user is an organization admin or the person who installed the Snowflake kit; anyone else gets: "Savings reports are open to organization admins and the person who installed the Snowflake kit."
get_setup_status
ChatGPTCheck how a setup you started ended. Returns { setupId, kind, status, expiresAt, entityId? } and never any credential. status is pending (the user has not saved yet), in_progress (a save is running), completed (entityId is the saved data source or integration action source), unknown (the save may or may not have happened: check the resource in Lighthouse before starting another setup) or expired (ask for a new link with the begin tool). It only shows setups started by this key or agent connection; any other id is reported as not found. Example: {"setupId":"0b0d3a1e-5c52-4c3e-9c58-6f1a9a0e7a11"}
invite_user
ChatGPTInvite a person to this organization by email. This sends a REAL email from Clerk to that address, so someone outside this conversation receives it, and it cannot be recalled by this tool. Each call sends another, so call it once and only when the admin asked for that person and role. The role is owner, admin, member or viewer (a viewer reads metrics and their data and changes nothing); an admin can invite another admin, as in the web app, and only an owner can invite an owner. Only this organization is ever invited to. It is limited to 10 invitations per user per hour, and when the limit cannot be checked nothing is sent. A person who is already a member or already invited is refused. Only an organization admin can use it, checked against the role Clerk has at that moment. Example: {"email":"new.person@example.com","role":"member"}
list_business_groups
ChatGPTList the organization's business groups, newest first, with their members' names. Groups decide who can see the metrics and data sources shared with them. Any member can use it, as in the web app. Use the businessGroupId in update_business_group, delete_business_group, and a metric's viewerBusinessGroupIds or editorBusinessGroupIds.
list_communication_source_apps
ChatGPTList the apps of a Slack communication source that a metric's channel alert can mention, such as Claude: externalUserId and name, every app matching searchText, unpaged; Teams and email sources have none. Apps are read from Slack and cached for 5 minutes, so call this only to set up an app mention. A metric mentions one with mentionTargets { type: "app", externalUserId } (search_metric_configuration_examples has "severity mentions"); the save stores Slack's name for it. For Claude to act on an alert, Claude must be a member of the alert channel and the channel's Claude setting must be "Respond automatically"; Claude does not answer another app's mention in a Slack Connect channel, and may not answer one posted as a thread reply (an escalation). The app reads the whole alert text, including segment values from the warehouse.
list_communication_sources
ChatGPTList Slack/email/similar communication sources for metric notifications. This is a catalog, not execution history.
list_data_sets
ChatGPTList data sets available to this API key for CUSTOM metric authoring. This is a catalog, not execution history. Archived data sets, and data sets of an archived data source, (archivedAt set) are left out unless you pass archived: true, which lists only the archived ones; archive_data_set archives and unarchives.
list_data_source_columns
ChatGPTList the columns of a data source's tables with their types, optionally of one table (dataSourceTableId from list_data_source_tables). Use columnName in SQL, and the table's qualifiedTableName from list_data_source_tables in the FROM (a custom SQL view has none). Search by column name and page with skip and limit (default 50, maximum 100). Needs the Query data sources capability and your access to that data source. Runs no warehouse query.
list_data_source_tables
ChatGPTList the tables and views of a data source, as they are named in the warehouse. On a warehouse, each table has qualifiedTableName, the full quoted path with its database and schema (on BigQuery, project and dataset): use it as is in the FROM of hand-written SQL (query_data_source, RAW_SQL metrics), since a query that names only tableName can fail without the schema or project. A custom SQL view (sourceType CUSTOM_SQL_VIEW) has none, because it exists only in Lighthouse and not in the warehouse: look at it through its data set (find it with list_data_sets) with peek_data_set. Search by name and page with skip and limit (default 50, maximum 100). Shows the schema of the customer's data, so it needs the Query data sources capability and your access to that data source. Runs no warehouse query. Use list_data_sources for data source ids.
list_data_sources
ChatGPTList data sources available to this API key for metric authoring. This is a catalog, not execution history. Archived data sources (archivedAt set) are left out unless you pass archived: true, which lists only the archived ones; archive_data_source archives and unarchives.
list_integration_action_options
ChatGPTList the values a SELECT field with an optionSource may take on one integration action source, such as the teams or projects of its workspace, read from the provider with the source's stored credentials (which never leave Lighthouse). Send the field's optionSource and, in dependencies, the chosen value of every key its dependsOn lists. Returns { options: [{ value, label }], isTruncated }: send a value as that field's input to create_integration_action. An optionSource the catalog does not have for the source's type, a missing dependency, or a dependency value of the wrong shape (such as a Jira project that is not a number) is refused with a message that says what to send; HTTP sources have no options. When the provider cannot list the values with the source's saved connection (unreachable, or the saved key rejected), the call says so and asks to check or reconnect the source in Lighthouse; it never returns the provider's text. A personal key or signed-in agent connection reads what its user can see in Lighthouse; an organization API key reads every source of the organization. Example: {"integrationActionSourceId":"0b0d3a1e-5c52-4c3e-9c58-6f1a9a0e7a11","optionSource":"projects","dependencies":{"teamId":"9cfb482a-81e3-4154-b5b9-2c805e70a02d"}}
list_integration_action_sources
ChatGPTList integration action sources (places Lighthouse sends actions to, such as an issue tracker or an HTTP endpoint). A personal key or signed-in agent connection lists, like the Destinations page in Lighthouse, the sources its user can use in a metric, or every source for an organization admin; an organization API key lists every source of the organization. Returns { total, entities }. Each source has integrationActionSourceId, name, type and typeDisplayName, status, disabled, isConnectionTested, hasCredentials, connectionSettings (the non-secret connection fields only, such as an HTTP base URL; a credential or secret is never returned), and, for a personal key or a signed-in agent connection, canManage (the user may create and update its actions) and canUseInMetric (the user may reference it in a metric's actionsToExecute). An organization API key reads as the organization, so these two are left out; its on-behalf user is checked when it creates or updates an action. Use an integrationActionSourceId with list_integration_actions, create_integration_action, and as actionsToExecute[].integrationActionSourceId in create_metric and update_metric. To add a source, use begin_integration_action_source_setup. Example: {"searchText":"Linear"}
list_invitations
ChatGPTList the organization's pending invitations, the ones nobody has accepted yet, with their invitation id, email, role (owner, admin, member or viewer) and when they were sent, as Clerk has them now. Use the invitationId in resend_invitation or revoke_invitation. The result is personal data: do not copy it anywhere the admin did not ask for. Only an organization admin can use it, checked against the role Clerk has at that moment.
list_kpis
ChatGPTList the KPI names metrics can be tagged with, sorted by name. A KPI is just a name: to tag or untag a metric, send its full kpis list in update_metric (a new name creates the KPI, a metric holds at most 10, and the list replaces the metric's current KPIs, so read them first with get_metric_configuration). Each KPI has the color the web app shows its tag in (set there, org-wide). KPIs cannot be renamed or deleted, as in the web app. A key with a metric allow-list sees only the KPIs of its metrics. Example: {"searchText":"revenue","limit":20}
list_metrics
ChatGPTList metric definitions available to this API key. Search by name or sequential id (e.g. 153). This is the catalog of configured metrics, not execution history. Each metric has isOwnedByCaller (whether the acting user owns it); pass includeOwnerNames: true to add ownerName when the user asks who owns metrics or wants another person's metrics. Archived metrics (archivedAt set) are left out unless you pass archived: true, which lists only the archived ones; archive_metric archives and unarchives. runTime gives how long the metric's runs take, read-only: lastRunMs (the latest finished run) and averageRunMs (finished runs of the last windowDays days, running ones left out), each the sum of the run's warehouse query times with every query counted at no more than timeLimitMs, so a run that timed out counts at the limit. isRunning says a run is going now; while isCollecting is true the counts are still being gathered and averageRunMs is left out.
list_organization_members
ChatGPTList the organization's members with their user id, name, email, role (owner, admin, member or viewer) and join date, oldest first, as Clerk has them now. Set includePendingInvitations to also see invitations not yet accepted. The result is personal data: do not copy it anywhere the admin did not ask for. Only an organization admin can use it, checked against the role Clerk has at that moment.
list_savings_reports
ChatGPTList the organization's Snowflake savings reports, newest first, with each report's id, date, period, type (on demand or monthly), status, saving found a month, number of findings and page link. Filter by dataSourceId. Read one with get_savings_report. Runs no warehouse query. An organization API key can read it. A personal key or a signed-in connection can only when its user is an organization admin or the person who installed the Snowflake kit; anyone else gets: "Savings reports are open to organization admins and the person who installed the Snowflake kit.". Example: {"dataSourceId":"3f6c2a8e-1d4b-4c7a-9e5f-2b8d6a0c4e17","limit":5}
peek_data_set
ChatGPTReturn a few rows (default 20, maximum 100) of a data set, newest first when it has a date column, to see what its values look like. Pass the column ids from get_data_set, optional filters (the same shape as a metric's whereConditionsQuery, with data set column ids) and optionally a calculation period to narrow the rows; WITHIN, WITHIN_EXCLUDED and BEFORE need calculationPeriodUnit and calculationPeriodUnitType. Warehouse data sources only. This runs a query on the customer's warehouse, which can cost money and counts against the same per-minute limit as query_data_source, and it returns the customer's data. On BigQuery the peek bills at most 5 GiB by default; over that, use query_data_source with a filter on a partition or date column. If the warehouse rejects the query, its message comes back, cut to 500 characters. Needs the Query data sources capability.
preview_metric_history
ChatGPTBacktest a metric: show how it would have behaved over its last days (default and maximum 30), without saving anything. Optionally pass metricId with a partial configuration to try a changed threshold or filter on an existing metric, merged exactly as in test_metric; or send a full CUSTOM configuration to try a new metric (it does not need notification fields or a schedule: without a schedule, history is sampled once per day; a schedule you do send must be valid). Returns a summary (threshold hits in total, days with hits, average per day, and estimatedNotifications: about how many alerts the runs would have sent after snoozing and segment aggregation, estimated from daily counts, which is the number to judge noise by, since an hourly metric that snoozes can meet its threshold hundreds of times and notify a handful), the per-day series by segment (the 10 segments with the most value unless you pass segments; summaryOnly returns per-segment totals instead) and the days and segments on which the threshold was met. On a Mixpanel or HTTP connector source, days whose runs read back before the fetched data starts (an hourly metric comparing with the past 7 days, on a report that only holds 30) are listed as summary.warmupDates and left out of the counts; when they cover most of the period the counts are near 0, so send includeWarmup or fewer daysBack. testedConfiguration names the rules and calculated columns that ran, the fields taken from your configuration, any field name it does not know (ignoredFields: unknown names only, not a known field whose value had no effect), and a fingerprint: two backtests with the same fingerprint ran the same metric, so a change that did not apply shows as an unchanged fingerprint. Use it to decide whether to change the threshold or the metric. It runs the metric's query on the customer's warehouse twice (the current value, then the history), which can cost money, counts as one call against the per-minute limit on warehouse queries (10 by default, shared with query_data_source and peek_data_set), and stops after about 50 seconds in total, checks before the queries included: then it returns an unavailableReason (try fewer days, fewer segments or add filters to the metric; an hourly metric has 24 runs a day to calculate), not an error. On an HTTP connector or Mixpanel data source the queries run on a worker instead of in the request, and the 50 seconds include waiting for it. Only CUSTOM metrics with a calculation function can be backtested. A metric that would return too many rows over the period gets a message saying so instead of a series; add filters or segment filters and try again.
query_data_source
ChatGPTRun a read-only SQL query on a warehouse data source (Postgres, Snowflake or BigQuery) and return up to 100 rows, to explore the customer's data and find what a metric could monitor. It runs on the customer's own warehouse and can cost money, and it can read anything the data source's own connection can read in the warehouse, not only the tables used by data sets. Use a read-only database user or role for the data source (Postgres, Snowflake and BigQuery alike): a SELECT can call functions that act beyond reading, and no text check can list them all. Queries are limited per minute (10 by default, shared with peek_data_set and preview_metric_history). Keep it narrow: select only the columns you need, filter by date and aggregate. Only one SELECT or WITH query is accepted (comments are fine, and a trailing ; is too): a second statement, SELECT INTO, and CALL, EXEC, GRANT, COPY, MERGE or any statement that inserts, updates, deletes or changes something are refused. The warehouse itself also refuses to write: Postgres runs the query in a read-only transaction, BigQuery must report a SELECT and bills at most 5 GiB by default, Snowflake runs exactly one statement. SQL Server data sources are not available yet. Avoid backslashes in strings, E strings, BigQuery triple-quoted, raw or bytes strings, comments inside comments and dollar quotes with a tag outside Postgres; they are refused, and so are the Postgres functions that change settings, take locks, wait, read server files or run other SQL (set_config, pg_advisory_lock, pg_sleep, dblink and the like). A query that runs 30 seconds is stopped by the warehouse itself, and at most 2 of your warehouse queries run at once. In the FROM, use the qualifiedTableName from list_data_source_tables as is; copy column names from list_data_source_columns. Cells are cut to 2000 characters and the answer to about 1 MB (isTruncated). Returns columnNames, rows, rowCount, isTruncatedByRowLimit, isTruncated and the executedDatabaseQueryId of the query. If the warehouse rejects the query (a syntax error, an unknown column, the BigQuery cap on bytes billed), its message comes back, cut to 500 characters, so you can fix the SQL; any other failure, such as a timeout, returns a general error. Needs the Query data sources capability.
remove_member
ChatGPTRemove a member from the organization in Clerk. They lose access to it at once, and a person can only come back by being invited again, so confirm the person by name and email with the admin before you call this. Lighthouse updates its own copy when Clerk reports the change, as it does for removals in the web app; the person's metrics and other work stay. It never removes the acting user, the last admin, the last owner or someone ranked above the acting user, so only an owner can remove an owner; if two people are removed at the very same moment and no admin or owner would be left, the removal is undone. A user who is not a member of this organization is reported as not found. Only an organization admin can use it, checked against the role Clerk has at that moment. Example: {"userId":"user_2abc"}
resend_invitation
ChatGPTSend a pending invitation again, as Resend on the members page of the web app does. Clerk has no resend, so the old invitation is revoked (its link stops working) and a new one is sent to the same email with the same role; the result has the new invitationId. This sends a REAL email from Clerk, so call it once and only when the admin asked. It counts toward the same limit as invite_user (10 per user per hour), and when the limit cannot be checked nothing is changed. An invitation with a role higher than the acting user's, such as an owner invitation for an admin, is refused. Only a pending invitation of this organization can be resent; any other id is reported as not found or no longer pending. If the new invitation fails after the old one was revoked, the error says so: check list_invitations before inviting again. Only an organization admin can use it, checked against the role Clerk has at that moment. Example: {"invitationId":"orginv_2abc"}
revoke_invitation
ChatGPTRevoke a pending invitation in Clerk, as Revoke on the members page of the web app does. The link in the email stops working at once, and the person can only join if invited again, so confirm the address with the admin before you call this. Only a pending invitation of this organization can be revoked; any other id is reported as not found or no longer pending. Only an organization admin can use it, checked against the role Clerk has at that moment. Example: {"invitationId":"orginv_2abc"}
run_metric
ChatGPTStart a metric execution and return its metricRunId. An execution is one full run of a metric, not a per-segment result: it queries the metric's data source and, like a scheduled run, can send the metric's notifications and actions. Execution is asynchronous; use check_metric_run_status to poll. Once it reports DONE or resultsAvailable, use search_metric_segment_results and get_current_metric_matches. On a metric the acting user does not own (get_metric_configuration and list_metrics show isOwnedByCaller), the call changes nothing and returns { changed: false, confirmationRequired: "confirmedNotOwner", ownerName, message } instead. Tell the user whose metric it is, ask them to confirm, and only then call again with confirmedNotOwner: true. Never set it without asking. Organization admins are asked too. This is a check-in with the user, not a permission: it does not change what the acting user may do.
search_metric_activity
ChatGPTList what people did with a metric's results, newest first: who acknowledged, resolved or marked a result as a hit (and the undos), when, from where, on which segment and result. Use it to see how the team handled the alerts, for example how many were marked as real hits, before deciding to change the threshold. Filter by interactionTypes or segments. Accepts a sequential id or UUID. Paginated (default 50, maximum 100). Changes to the metric itself are in get_metric_change_history.
search_metric_configuration_examples
ChatGPTSearch curated CUSTOM and RAW_SQL metric form examples (custom skeleton, count, severity, cron, filters, percentile, formula, segments, slack, threshold, trend comparison, sql/metricColumnName/sqlColumns). Newer areas to search for: "trend max" (trend comparison with MAX, MIN or another function), "calculation window" (YESTERDAY, TODAY, WITHIN, WITHIN_EXCLUDED, BEFORE) "raw sql threshold column" (RAW_SQL threshold that compares CURRENT_METRIC to another SQL column) and "severity scale" (severity that grows with how bad the value is, spread between a least and a most severe value). Search first for metadata, then peek at most 5 example ids for full JSON. Do not set dataSetId on RAW_SQL. Then test_metric, then create_metric or update_metric.
search_metric_executions
ChatGPTSearch the history of metric executions. An execution (also called a metric run) is one full run of a metric and has a metricRunId, the same id returned by run_metric. It is not a per-segment result. A failed execution has error, and errorHint when the cause is one you can act on (for example the source may be rate limiting, so retry later). Each execution has metricVersionNumber, the version of the metric it ran (see get_metric_change_history), and notifications, the counts of notifications sent for it that were sent, failed or not sent (never their text, channels or recipients; notificationsUnavailable is set instead when they cannot be read). Filter by status, triggerType and a run-time range with startTime and endTime (ISO 8601 with an offset, at most 90 days apart). Accepts metric sequential ids (e.g. 153) or metric UUIDs.
search_metric_segment_results
ChatGPTSearch per-segment results inside metric executions. Each result is one segment/row (value, threshold, trigger, hit/ack/resolved) and has a segmentRunId. value is a number, or null when the run produced none. segment is the segment's column values joined with "_", which is ambiguous; segmentValues lists the same segment as { column, value } pairs (at most 30, text cut at 200 characters, segmentValuesTruncated says if any were left out). resultColumns lists the other columns the run stored (for example a baseline or alarm line the value was compared against, or a rule threshold) as { column, value } pairs, at most 30 with long text cut, and resultColumnsTruncated says if any were left out. These are columns of the stored result row (for a SQL metric, the whole row the query returned), so a key that can read results can read them. Each result also has metricVersionNumber and dataSetVersionNumber (the versions it ran with; get_metric_change_history has what changed between versions) and rules: for each threshold or having rule (at most 20, names cut at 200 characters), the numbers the run saved for it as { type, side, value, column? }, where a 0 is a real 0. Use this for what happened in a run; use get_current_metric_matches for whether it is still alerting. Accepts metric sequential ids or UUIDs. Optional metricRunId narrows to one execution; startTime and endTime (ISO 8601 with an offset, at most 90 days apart), segments (up to 30), triggerResults, isThresholdMet, isHit and the other flags narrow it further. includeRuleResults (pages of at most 20, the default when it is set) checks each threshold rule again for every result and adds ruleResults: { rule, isMet }. includeNotifications adds notifications for each result: { sentTime, channelType, messageType, sendStatus, delivered }, never the message text, channel or recipient. When rule results or notifications cannot be read, ruleResultsUnavailable or notificationsUnavailable is set instead and the results still come back.
search_organization_users
ChatGPTFind members of this organization by name or email, to get the user ids that create_business_group and update_business_group take. Returns each user's id, name and email, so the result is personal data: do not copy it anywhere the user did not ask for. It never returns anyone outside this organization. Any member can use it, as in the web app.
search_users_and_groups
ChatGPTFind the users and business groups a metric can be shared with, for the access fields of create_metric and update_metric (viewerUserIds, editorUserIds, viewerBusinessGroupIds, editorBusinessGroupIds, ownerId). Returns what the Access section of the web editor shows: each user's id and name (the email only when the user has no name) and each group's id and name, from this organization only. skip and limit page users and groups alike; totalUsers and totalBusinessGroups count every match, so page until both are read. Business groups are left out when the acting user may not see them in the web app, and businessGroupsUnavailable is true when that could not be checked (try again later). Not admin-only.
send_test_notification
ChatGPTSend a metric's test notification, like Test Notification in the Lighthouse web app. A REAL message is sent to the Slack channel, Slack user or email recipients the metric notifies, so people outside this conversation will see it. It runs the metric's query once, ignores the alert threshold, and sends up to a few results. It cannot be undone, and each call sends another message, so call it once and only when the user asked for it. The call only queues the message ({ queued: true }): a background worker sends it later, and the result is not available through MCP, so delivery is not confirmed. Ask the user to check the channel. To stop a loop, it allows one send per metric and five per user a minute; when refused, wait and do not retry in a tight loop. The metric needs notifications on, a destination (a Slack channel or user with an enabled app, or email recipients), a data source, and a data set (custom) or SQL with columns (SQL). It only works on a metric the acting user may edit in Lighthouse and the key's allow-lists include; any other id is reported as not found. Example: {"metricId":"153"}
start_savings_report
ChatGPTStart a Snowflake savings report for one Snowflake data source: where the money goes over the last 30 complete days, the waste found, the fix and its trade-off, and the saving per month and year. Call it in two steps. First without confirmed: it answers NEEDS_INPUT when it needs the customer's prices (ask the user for both; if they do not know them, call again with pricesUnknown: true), or NEEDS_CONFIRMATION with the plan: the period, how many small, read-only queries run on the data source's own warehouse, about how long it takes, and the prices. Nothing runs in that step. The queries cost the customer warehouse time, so show the user the plan and wait for their explicit yes in this conversation; the request that started the task is not that yes. Before that call, offer the user to paste the output of SHOW WAREHOUSES as warehouseSettings (optional: without it, the report reads the settings of the warehouses the data source's role can see). Then call again with the same arguments and confirmed: true; warehouseSettings is not saved, so send it again too. STARTED gives the reportId, ALREADY_RUNNING the id of the report already running. One new report per data source a day: TODAY_REPORT_EXISTS gives that day's report and when the next one is possible. Either call can answer ALREADY_RUNNING or TODAY_REPORT_EXISTS, and then nothing else is asked. Prices given are saved for the next reports. Then follow the report with get_savings_report. Only an organization admin or the person who installed the Snowflake kit can use it; anyone else gets: "Savings reports are open to organization admins and the person who installed the Snowflake kit.". Example: {"dataSourceId":"3f6c2a8e-1d4b-4c7a-9e5f-2b8d6a0c4e17","pricePerCredit":2.4,"pricePerTbMonth":20}, then {"dataSourceId":"3f6c2a8e-1d4b-4c7a-9e5f-2b8d6a0c4e17","confirmed":true}
sync_data_source
ChatGPTRe-read a data source's schema, like "Resync schema" in the Lighthouse web app. It runs in the background and returns right away with { dataSourceId, started, message }: started true means the sync was queued. false means nothing was queued: either the connection is invalid, or the data source's provider is temporarily unavailable, in which case message says so, the data source's status is left as it was, and you can try again in a few minutes. A sync re-fetches every table the data source has. For a Mixpanel data source that is every insight, and each one counts against the customer's Mixpanel rate limit (about 60 queries per hour, shared with their own tools), so do not call it repeatedly. A second sync of the same data source within a minute of the last one that started is refused with errorCode RATE_LIMITED: wait for the first to finish instead of retrying right away. To bring in new Mixpanel insights use add_mixpanel_insights, which fetches only the new ones. An archived data source cannot be synced. It only syncs a data source the acting user may manage in Lighthouse and the key's data source allow-list includes; any other id is reported as not found. Example: {"dataSourceId":"12"}
test_metric
ChatGPTValidate metric form JSON and run a live preview query against its data source without saving the metric. For a new metric, send the full create shape. For an existing metric, pass metricId and only the fields to change. Returns { valid, errors?, warnings?, preview? }. Warnings appear only when status is DRAFT: the draft tests fine but create_metric or update_metric would refuse it as PAUSED or LIVE (for example a RAW_SQL threshold whose left side is a column missing from sqlColumns); any other status gets errors instead. A RAW_SQL threshold may compare CURRENT_METRIC or any other column listed in sqlColumns (filterFieldType COLUMN, filterFieldName = columnName, never metricColumnName) on the left, in every status; search_metric_configuration_examples has raw-sql-column-threshold. The preview gets 50 seconds from the start of the request (an HTTP connector or Mixpanel data source runs it on a worker); if it is not done by then, valid is false with errorCode QUERY_EXECUTION_TIMEOUT and a message to narrow the date window, add filters or try again later, and nothing is saved. Call this after assembling JSON and before create_metric or update_metric. When a CUSTOM test passes, save the same configuration with lastTestWasSuccessful: true so the metric is recorded as tested. sqlColumns roles are lowercase: "metric", "filter", "segment", "date_time". A RAW_SQL threshold that compares CURRENT_METRIC to another column (rightSideField filterFieldType COLUMN, filterFieldName equal to that columnName) needs that column selected by the sql and listed in sqlColumns with the "filter" role, or a segment column (one of segmentRawColumnNames, segments enabled); create_metric and update_metric reject it otherwise for a non-DRAFT metric, and test_metric reports it too (as a warning for a DRAFT, as an error for any other status).
update_business_group
ChatGPTRename a business group, change its description, and add or remove members. Send only what changes. Removing a member can take away that person's access to metrics and data sources shared with the group; the group must keep at least one member. Added users must already belong to this organization. A group that does not exist or belongs to another organization is reported as not found. Only an organization admin can use it, checked on each call (a role change can take up to a minute to apply). Example: {"businessGroupId":"0b6f2a51-3a4c-4f0e-9d2b-8f1f6a1c7e10","name":"Finance team","addMemberUserIds":["user_2def"],"removeMemberUserIds":["user_2abc"]}
update_data_set
ChatGPTChange a data set's name, description, status, default date column or column roles. Send only what changes. Call get_data_set first to see the current columns, roles and default date column (columnName is dataSourceTableColumnName there). Metrics built on the data set change with it: a column left out of the data set by isSelectableForMetrics false, or a role taken away, can make those metrics fail. Columns are never deleted. A description cannot be cleared. It only edits a data set the acting user may edit in Lighthouse and the key's data set allow-list includes; any other id is reported as not found. Data sets defined by custom SQL cannot be changed here. Example: {"dataSetId":"7","name":"Paid orders","status":"LIVE","defaultDateColumnName":"paid_at","columns":[{"columnName":"amount","canBeMetric":true},{"columnName":"internal_note","isSelectableForMetrics":false}]}
update_data_source
ChatGPTRename a data source or change its description. Send only what changes. Nothing that decides where the stored credentials are sent can be changed here: the credentials, project and connection settings only change through begin_data_source_setup, where the user enters them in Lighthouse (Mixpanel insights are the exception: add them with add_mixpanel_insights). A description cannot be cleared. It only edits a data source the acting user may manage in Lighthouse and the key's data source allow-list includes; any other id is reported as not found. Example: {"dataSourceId":"12","name":"Production warehouse","description":"Read-only replica used by the revenue metrics"}
update_finding
ChatGPTSave what the user decided about a finding of a Snowflake savings report: ignore it (status IGNORED with their reason; the next reports list it under ignored instead of raising it as new, unless its cost grows a lot), raise it again (status OPEN), set or clear its owner (a Slack or Teams user, an email, or both; the owner is who gets told when the waste comes back), or say what a warehouse is for (warehousePurpose; the next report uses it). Name the finding by findingId, or by a few words of its title or object name with dataSourceId: when the words fit no single finding the answer is NEEDS_CHOICE with candidates, so ask the user which one. Ignoring changes no metric; to stop alerts too, snooze or change the metric. Setting an owner changes who gets alerts, so confirm the person with the user first. Runs no warehouse query. Only an organization admin or the person who installed the Snowflake kit can use it; anyone else gets: "Savings reports are open to organization admins and the person who installed the Snowflake kit.". Examples: {"findingId":"c5d7e9f1-2a4b-4c6d-8e0f-1a3b5c7d9e2f","status":"IGNORED","reason":"The sales team needs these dashboards to load fast"} and {"description":"BI_WH","dataSourceId":"3f6c2a8e-1d4b-4c7a-9e5f-2b8d6a0c4e17","owner":{"email":"dana@example.com"},"warehousePurpose":"DASHBOARDS"}
update_integration_action_source
ChatGPTRename an integration action source or change its description. Send only what changes. An empty name or description is rejected as invalid, so a description cannot be cleared, only replaced. Nothing that decides where the stored credentials are sent can be changed here: the connection settings and the credentials only change through begin_integration_action_source_setup, where the user enters them in Lighthouse. It only edits an integration action source the acting user may manage in Lighthouse; any other id is reported as not found. Example: {"integrationActionSourceId":"0b0d3a1e-5c52-4c3e-9c58-6f1a9a0e7a11","name":"Billing webhook","description":"Posts refund requests to the billing service"}
update_metric
ChatGPTPartially update an existing metric definition. Call get_metric_configuration first and send only fields to change. metricId is a sequential id (e.g. 153) or UUID. CUSTOM and RAW_SQL are both supported. sqlColumns roles are lowercase: "metric", "filter", "segment", "date_time". A RAW_SQL threshold that compares CURRENT_METRIC to another column (rightSideField filterFieldType COLUMN, filterFieldName equal to that columnName) needs that column selected by the sql and listed in sqlColumns with the "filter" role, or a segment column (one of segmentRawColumnNames, segments enabled); create_metric and update_metric reject it otherwise for a non-DRAFT metric, and test_metric reports it too (as a warning for a DRAFT, as an error for any other status). status: DRAFT is unfinished work that is saved without the full validation or the RAW_SQL live preview, is never scheduled, and a new DRAFT has no nextExecutionTime. PAUSED is validated like LIVE but the scheduler never runs it (it can still be run by hand with run_metric). LIVE is the only status the scheduler runs, at each slot of its schedule, and it counts toward the plan's live metric limit. INVALID is only ever set by Lighthouse: every failed run, scheduled or started by hand (run_metric included), adds one to the failure count and a successful run resets it, and when the scheduler finds a LIVE metric whose count has reached the limit (3 by default) it sets INVALID, after which the metric is no longer scheduled. create_metric and update_metric refuse to set it (sending INVALID for a metric that is already INVALID is ignored); to resume one, fix the cause and set status LIVE with update_metric, which also resets the count. nextExecutionTime is the next slot of the schedule, worked out each time a non-DRAFT metric is saved. It moves forward only after a successful scheduled run of a LIVE metric: a failed scheduled run leaves it where it is, so the next scheduler tick retries, and a run started with run_metric never moves it. For a PAUSED metric it is only the slot the schedule would hit: nothing runs then, and it does not move until the metric is saved again (set LIVE with update_metric to resume). The schedule after the update must still produce a run time, or the update is rejected. A non-draft RAW_SQL change is previewed first and refused, with nothing saved, if the preview takes longer than 50 seconds. A non-draft CUSTOM metric is not previewed on save: after test_metric passes on the exact configuration being saved, send lastTestWasSuccessful: true, otherwise the response carries a warnings entry saying it was saved untested. An update that changes any field that changes the query (data set, data source, type, filters, aggregation, calculation period, formula, threshold, segments, calculated columns, null as zero, data lag, time zone, round to the nearest hour) stores a CUSTOM metric as untested unless it sends lastTestWasSuccessful: true. When you send back a configuration read with get_metric_configuration, drop lastTestWasSuccessful (or send false) unless test_metric just passed on the exact new configuration. Email alerts from agents and API keys can only go to members of this organization, so a new emailRecipients address must be a member email address (recipients the metric already has are kept). Who can see and edit the metric, as in the Access section of the web editor: viewAccessLevel and editAccessLevel are EVERYONE, ADMINS (shown as "Owner" in the web app: only the owner and the creator) or SELECTED_USERS; organization admins can always see and edit every metric. With SELECTED_USERS, viewerUserIds and viewerBusinessGroupIds (or editorUserIds and editorBusinessGroupIds) list who is given access; a list you send replaces the current one, and a list you leave out stays as it is. The creator always keeps access. Lists sent with their level set to EVERYONE or ADMINS in the same call are ignored, because that level clears them. A list sent without its level is refused unless the stored level is SELECTED_USERS (a new metric's default level is EVERYONE, so send SELECTED…
update_organization_settings
ChatGPTRename the organization, or change its default time zone, whether it is notified of errors, and whether Lighthouse suggests metrics for new data sets. Send only what changes. The name is saved first; if a later part fails, read get_organization_settings to see what was saved. It cannot change the logo, the AI model, the error notification destination, credentials or billing; use the Lighthouse web app for those. Only an organization admin can use it, checked on each call (a role change can take up to a minute to apply). Example: {"name":"Acme Analytics","timezone":"Europe/London","shouldSendErrorNotifications":true}
update_savings_settings
ChatGPTChange the organization's Snowflake savings report settings; only the fields sent change, and at least one is needed. Prices: what the customer pays per credit and per TB a month, in USD. Send both the first time and while the saved prices are assumed (priceSource ASSUMED from get_savings_settings); once they are the customer's own (ENTERED), one may change alone. New prices apply from today (UTC): new reports and the savings tracker use them from today, and earlier reports keep the prices they were made with. reportChannel: the channel the monthly report's message goes to, a channel of a connected Slack or Teams app of this organization (ids from list_communication_sources and get_communication_source); null goes back to the Snowflake kit's channel. Changing it changes where a message goes, so confirm the channel with the user first. monthlyReport: ON builds the report on the 1st and sends its message, NO_MESSAGE builds it without a message, OFF builds none, so none of its queries run on the warehouse. The alert channel of the kit's metrics and guards is not set here: change those metrics with update_metric. Returns the prices (per credit and per TB a month, whether they are the customer's own or assumed, and when they last changed), the monthly report mode, and reportDestination: where the monthly report's message goes now, first match wins: the channel set here (SETTINGS_CHANNEL), the report channel chosen when the Snowflake kit was installed (KIT_REPORT_CHANNEL), the kit's alert channel (KIT_ALERT_CHANNEL), else an email to the person who installed the kit (EMAIL_TO_KIT_OWNER); NONE when the kit is gone and no channel is set. A channel of an app that was removed, paused or disconnected is passed over. Runs no warehouse query. Only an organization admin or the person who installed the Snowflake kit can use it; anyone else gets: "Savings reports are open to organization admins and the person who installed the Snowflake kit.". Examples: {"pricePerCredit":2.4,"pricePerTbMonth":20} and {"reportChannel":{"communicationSourceId":"5b2e8c1a-3d7f-4a9e-b6c0-2f1d4e8a7c35","communicationSourceChannelId":"9d4f6a2b-8e1c-4b7d-a3f5-6c0e2b9d1a48"},"monthlyReport":"ON"}
act_on_segment_result
Claudebegin_communication_source_setup
Claudebegin_data_source_setup
Claudebegin_integration_action_source_setup
Claudechange_member_role
Claudecheck_metric_run_status
Claudecreate_business_group
Claudecreate_data_set
Claudecreate_metric
Claudedelete_business_group
Claudedelete_metric
Claudeduplicate_metric
Claudeget_business_group_change_history
Claudeget_communication_source
Claudeget_communication_source_change_history
Claudeget_current_metric_matches
Claudeget_data_set
Claudeget_data_set_change_history
Claudeget_data_source
Claudeget_data_source_change_history
Claudeget_metric_change_history
Claudeget_metric_configuration
Claudeget_metric_value_history
Claudeget_organization_settings
Claudeget_setup_status
Claudeinvite_user
Claudelist_business_groups
Claudelist_communication_sources
Claudelist_data_sets
Claudelist_data_source_columns
Claudelist_data_source_tables
Claudelist_data_sources
Claudelist_invitations
Claudelist_kpis
Claudelist_metrics
Claudelist_organization_members
Claudepeek_data_set
Claudepreview_metric_history
Claudequery_data_source
Clauderemove_member
Clauderesend_invitation
Clauderevoke_invitation
Clauderun_metric
Claudesearch_metric_activity
Claudesearch_metric_configuration_examples
Claudesearch_metric_executions
Claudesearch_metric_segment_results
Claudesearch_organization_users
Claudesearch_users_and_groups
Claudesend_test_notification
Claudetest_metric
Claudeupdate_business_group
Claudeupdate_data_set
Claudeupdate_data_source
Claudeupdate_integration_action_source
Claudeupdate_metric
Claudeupdate_organization_settings
Claude