Masthead MCP Tools Reference
The Masthead Model Context Protocol server exposes a set of read-only and mutation tools that allow AI agents to interact with your data observability ecosystem in near-realtime.
Below is the reference guide for each tool, including its purpose.
Discovery and context tools
Section titled “Discovery and context tools”list_projects
Section titled “list_projects”List all GCP project IDs monitored for your tenant. Use these project IDs as filters, such as projectId, in subsequent incident and table metadata queries.
list_users
Section titled “list_users”List all users in your Masthead tenant. This is useful for identifying email addresses before assigning ownership of an incident.
get_tenant_settings
Section titled “get_tenant_settings”Return the tenant settings an agent needs before running FinOps skills: whether the tenant enabled the BigQuery insights export, the export project and dataset (masthead-prod.<dataset>) with its tables (insights, lineage), and the look-back window in days used to flag dead-end and unused tables (30 unless configured otherwise). Skills call this first and stop with a request-access link when the tenant disables the export.
The settings also include credentials: how Masthead connects to your Google Cloud, and the service account of each Masthead identity in serviceAccounts. These are Masthead’s own accounts by default, or your own with workload identity federation. The data scans skill reads serviceAccounts.qualitySa from it to know which account to grant read access, so it never asks you for it.
Incident management tools
Section titled “Incident management tools”list_open_incidents
Section titled “list_open_incidents”List all active unresolved incidents, such as Open, In Progress, or Acknowledged, over the last 14 days, optionally bounded by a limit. Set hasRelated to true to return only incidents linked to other incidents, or to false to return only incidents without links, for example to find incidents still to relate. Each item includes relatedCount, the number of linked incidents. To keep pages small, list items leave out empty fields, the rendered title and subtitle, and the table’s internal ID; get_incident_context returns them.
list_incidents
Section titled “list_incidents”Full incident search history with options to filter by project, status, severity, pipeline type, incident type, scan, or whether the incident has related incidents. Set hasRelated to true to return only incidents linked to other incidents, or to false to return only incidents without links. Each item includes relatedCount, the number of linked incidents. To keep pages small, list items leave out empty fields, the rendered title and subtitle, and the table’s internal ID; get_incident_context returns them.
incidentTypes: return only incidents of these types, for exampleDATA_QUALITY_QUALITY_CHECKfor Masthead data scans orDATAPLEX_QUALITY_CHECKfor Dataplex scans. An unknown type returns an error that lists the allowed values.scanName: return only the incidents of one scan. Pass a Masthead data scan’snamefromlist_data_scans, or the ID of a Dataplex scan, which Dataplex incidents carry inmeasurementData.scanName.createdFrom: return only incidents created at or after this time.fromandtoselect incidents by their last occurrence, so withoutcreatedFromthe list also includes older incidents that occurred again.principalEmail: return only incidents of pipelines that this account runs. The match is exact and ignores case.dataProductUuids: return only incidents on tables of these data products. Pass theuuidvalues fromextra.filterCounts.dataProductsof a previous call. The all-zero UUID in that list selects incidents on no data product.
summarize_incidents
Section titled “summarize_incidents”Count incidents per group instead of listing them. Call it first in a triage or a daily check to see where the incidents are, then list only the groups you want to read. It takes the list_incidents filters except table. By default, it covers the last 14 days and the Open, In Progress, and Acknowledged statuses.
groupBy: what a group, or bucket, is.DATASET_AND_TYPE, the default, returns one bucket per dataset and incident type. The other values areDATASET,PROJECT,INCIDENT_TYPE,PIPELINE_TYPE, andPRINCIPAL, the account that runs the pipeline. An unknown value returns an error that lists the allowed values.createdFrom: incidents created at or after this time count as new. It defaults tofrom. For a daily check, pass the time of the previous check.pageandlimit: page through the buckets. A page holds 30 buckets by default and at most 100.
The result has two parts:
value.totals:incidents,new,stale, andbucketsfor everything the filters match, not only the returned page.value.buckets: buckets with aCRITICALtable first, thenPRIORITY,REGULAR, andMUTED, then by new incidents, then by size.
Each bucket includes:
key: the fields of the chosen grouping, fromproject,dataset,incidentType,pipelineType, andprincipalEmail.incidents,new, andstale. A stale incident last occurred more than 7 days beforeto.tiers: the number of incidents per monitoring tier.unassignedandwithoutSeverity.lastSeenandoldestCreatedAt.sample: up to three full incident UUIDs, highest tier and most recent first, forget_incident_context.
To read a whole bucket, call list_incidents with the bucket’s key as filters and the same from, to, and statuses, because the defaults of the two tools differ. To list only the bucket’s new incidents, add createdFrom.
Two cases limit this:
- You can’t list on its own a bucket whose key lacks a field, such as a pipeline error with no destination table. Start from its
sample. - The
projectfilter oflist_incidentsalso matches the pipeline’s project, so a list can return a few more incidents than a bucket withprojectin its key counts.
get_incident_context
Section titled “get_incident_context”Return everything an agent needs to investigate one incident in one call: its details, and for this incident what get_related_incidents and get_table_pipelines would add. get_table_pipelines still adds the writers’ sources, cost, and compute, for any table and period.
incidentGroupUuid: the full incident UUID.sections: the sections to return, any ofoccurrences,pipeline,schemaChanges,analysisEvents,history, andrelated. By default, the tool returns all of them. An unknown value returns an error that lists the allowed values.occurrenceLimit: the number of newest occurrences. The default is 5, and a pipeline error returns at most 20.historyLimit: the number ofhistoryentries, up to 100. The default is 5.writersLimit: the number of most recently active writers of the incident’s table inpipeline, besides the incident’s own pipeline, up to 100. The default is 5.runsLimit: the number of newest runs per writer, up to 100. The default is 5.schemaChangesLimit: the number ofschemaChangesentries. The default is 10.analysisEventsLimit: the number of newestanalysisEvents. The default is 10.relatedLimit: the number ofrelatedincidents, most recently active first. The default is 10.
Larger limits make a bigger response. The services cap a value above the maximum.
The result is value with incident and these sections. incident has the destination, pipeline, measurement data, assignee, notes, data products, title, and subtitle, plus window, occurrenceCount (the number of stored occurrences), relatedCount (the number of linked incidents), and mute (when the incident’s and the table’s mutes end). For the incident alone, pass sections = ["history"]: the history comes with the incident. An unknown UUID returns an error.
occurrences:total, anditemswith the newest occurrences first. A pipeline error haserror,querywith the failing SQL,sourceUris, andprincipalEmail. A freshness or volume anomaly hasfrequency, and a volume anomaly also hascurrent,min,max,median, andmean.pipeline:writersTotal, the number of pipelines that write to the incident’s table, andwriters. The pipeline of the newest occurrence comes first, then the most recently active writers of the table. Each writer haslastActivity,frequencySec,runswithcreateTime,durationMs, andisError, andlastError.schemaChanges: the table’s schema changes, one entry per changed column, from one day before the incident’s creation time, the newestschemaChangesLimitentries.analysisEvents: when anomaly detection started, stopped, resumed, or changed its aggregation step, for the same period.history: the newest changes of status, severity, assignee, notes, mutes, and links, each withbefore,after, andby. It holds the newesthistoryLimitchanges.related: therelatedLimitmost recently active linked incidents, in the format ofget_related_incidents.
The error text of an incident records what failed when Masthead detected it. To tell whether it still fails, compare incident.lastDatetime with the writers’ runs and lastActivity: a run without an error after the last occurrence means the cause is likely fixed, and no run since means the pipeline stopped.
To keep the response small, the tool leaves out nulls and empty sections, and cuts the SQL:
errorsnames each section that the tool couldn’t read. A missing section thaterrorsdoesn’t name has no data.- The SQL of the newest occurrence is cut at 1,500 characters and that of the older ones at 300, ending with
…. No other text is cut. - Each occurrence keeps its first 10
sourceUris. truncatednamesoccurrenceswhen a SQL text or asourceUrislist was cut, andschemaChanges,analysisEvents, orrelatedwhen more entries exist than the limit.
The call has a deadline of about 50 seconds. A section that misses it returns in errors, and the tool returns the rest. Act on each error by its text:
timed outor unavailable: to read the section again, pass only it insections.rejected: the source refused the request. Don’t retry it.errors.mute: the tool reads the mute state on every call, so it isn’t a section. Call the tool again.
The tool doesn’t return lineage. For the downstream impact, call get_lineage with the incident’s destination.uuid and type set to TABLE.
get_related_incidents
Section titled “get_related_incidents”Return the incidents linked to an incident group, as { values: [{ positionType, incident }] }. Each incident is a compact summary: groupHash, title, incidentStatus, severity, incidentType, anomalyType, destination (project, dataset, table, alertType), pipeline (pipelineType, principalEmail), errorMessage (when set), createdAt, lastDatetime, and window. Fields without a value are omitted. Use get_incident_context for the full incident. For an unknown incident, the call returns an error (Incident ... not found) instead of an empty list. positionType is the position of the linked incident relative to the one you ask about:
UPSTREAM: a likely cause of this incident.DOWNSTREAM: an impact of this incident.RELATED: the same cause, with no direction.
The Masthead UI shows the same links on both incidents.
Incident UUID parameters of get_incident_context and the link tools take the full 36-character UUID from list_open_incidents, list_incidents, or a summarize_incidents sample. A partial UUID, such as the first 8 characters, returns an error that names the parameter.
Incident action and mitigation tools
Section titled “Incident action and mitigation tools”bulk_update_incidents
Section titled “bulk_update_incidents”Update the status, severity, assignee, and notes of one or more incidents in one call. Set only the fields you want to change:
status: the new life-cycle status.severity:P1–P5, orNONEto clear it.assigneeEmail: the email of a registered Masthead user, orNONEto unassign. The call fails if no user has that email.noteswithnotesMode:ADD, the default, puts the note before the existing notes with a---line between them.REPLACEoverwrites the notes;REPLACEwith empty notes clears them.
All changes in a call apply together, and the incident history records each one. The result lists each incident with success, and a message such as Incident not found when an incident wasn’t updated.
link_incidents
Section titled “link_incidents”Link an incident group to other incidents, based on evidence in your environment. The incidents don’t need to be connected in Masthead lineage. Pass the UUIDs of the linked incidents in upstreamUuids, downstreamUuids, or relatedUuids, using the positions described in get_related_incidents. The call adds new links, changes the position of a listed incident that’s already linked, and changes no other link. Repeating a call with the same lists changes nothing. It returns the incident’s links after the save, in the same format as get_related_incidents.
Because the call can change the direction of an existing link, MCP clients such as Claude may ask you to confirm each link_incidents call.
If an incident doesn’t exist or you link an incident to itself, the call returns an error and changes nothing.
unlink_incidents
Section titled “unlink_incidents”Remove the links between an incident group and the incidents in unlinkUuids. The call removes each listed link on both incidents, changes no other link, and is safe to repeat. It returns the remaining links, in the same format as get_related_incidents.
Table, BI asset and lineage tools
Section titled “Table, BI asset and lineage tools”get_table_metadata
Section titled “get_table_metadata”Return basic facts about a BigQuery table: its uuid, project, dataset, table, type, the number of columns in columnsNumber, the monitoring tier in alertType, and isAnomaly, which is true when an anomaly is open on the table. It doesn’t return the schema.
get_table_pipelines
Section titled “get_table_pipelines”Fetch the metadata and status of pipelines writing to a specific table.
get_lineage
Section titled “get_lineage”Traces the direct upstream and downstream neighbours of any node in the lineage graph, given its uuid and type: a BigQuery table, a BI asset (Looker dashboard or look, Looker Studio report, Power BI report, Google Sheet), or a pipeline. It’s the same lookup the Masthead app runs when you open an asset’s lineage. Use it to find the BigQuery tables a dashboard reads: pass the BI asset’s uuid and assetType from list_asset_scores, with direction set to UPSTREAM and nodeTypes set to TABLE. Looker dashboards and looks are a single LOOKER node type in lineage; the tool also accepts LOOKER_DASHBOARD and LOOKER_LOOK.
Each node in the response has a uuid and a nodeType; pass them back as uuid and type to walk the graph one hop further. For a table, take its uuid from get_table_metadata or from an incident’s destination.uuid, and set type to TABLE. Each direction returns up to 100 neighbours by default (limit, up to 1000), most recently active first. value.pages.upstream and value.pages.downstream give the total and the nextOffset of the next page; to read more, call again with direction set to that side and offset set to nextOffset. Pass nodeTypes, for example LOOKER or LOOKER_STUDIO_REPORT, to return only neighbours of those types.
get_table_lineage
Section titled “get_table_lineage”Traces the direct upstream and downstream tables, BI assets, and pipelines of the target table to verify blast radius. Each direction returns up to 100 neighbours by default (limit, up to 1000), most recently active first. value.pages.upstream and value.pages.downstream give the total and the nextOffset of the next page; to read more, call again with direction set to that side and offset set to nextOffset. Pass nodeTypes, for example LOOKER or LOOKER_STUDIO_REPORT, to return only neighbours of those types.
list_asset_scores
Section titled “list_asset_scores”List the tenant’s scored assets—BigQuery tables and BI assets (Looker dashboards, Looker looks, Looker Studio reports, Google Sheets)—highest score first, with the raw score metrics, the current alert tier, and each asset’s percentile rank within its own asset type in the requested scope, plus p50/p90/p95 per asset type in extra (covering only the asset types present on the page). The score (0-1) ranks an asset’s importance from downstream and upstream compute cost, write, and read frequency, BI assets and service-account readers, normalized within the tenant and asset type. Filter by assetTypes, project, dataset, alertTiers and minPercentile to fetch tier-change candidates; apply with bulk_update_table_priority for tables or update_bi_asset_priority for BI assets.
bulk_update_table_priority
Section titled “bulk_update_table_priority”Adjust the monitoring alert level for one or more BigQuery tables in one call. Pass tables as a list of {project, dataset, table} (up to 100) and one priorityTier for all of them. The response has one row per table; a row with error set wasn’t changed, for example because Masthead doesn’t know that table.
update_bi_asset_priority
Section titled “update_bi_asset_priority”Adjust the monitoring alert level for a Looker dashboard, Looker look, Looker Studio report, or Google Sheet, and return that asset’s own score row (matched by uuid) after the change so the caller can confirm the new alertType. The call fails if Masthead didn’t apply the change. Downstream BI asset priority also drives pipeline anomaly alerting.
Data scan tools
Section titled “Data scan tools”Masthead never queries your source tables. Before you create a scan, compute the metrics in your own project, write them to a results table, and grant Masthead read access to that table’s dataset. See what runs where, and Masthead data scans for the table columns and grants.
list_data_scans
Section titled “list_data_scans”List the tenant’s Masthead data scans with their description, table, type, frequency, processing delay, active flag, when the next run is due, and latestScanResult, the newest period Masthead has checked: periodStart and periodEnd in UTC, rulesChecked, the number of metrics checked, and rulesFailed, the number of metrics that failed. Masthead checks a period only after its processing delay, so the latest result trails the current date, and a run can start later than it’s due. Masthead sets up scans whose source is MANUAL; you can’t change them with these tools, and their table can be empty.
To see what a scan covers, call list_data_scan_tables. To find its incidents, call list_incidents with scanName set to the scan’s name.
list_data_scan_tables
Section titled “list_data_scan_tables”List the tables a Masthead data scan monitors, failing tables first. Each item has table, the monitored table as project.dataset.table, and latestScanResult, the table’s newest checked period with the same fields as in list_data_scans. Pass the scan’s id from list_data_scans as scanId, and page through the tables with page and limit. To find one table, set search to part of its project.dataset.table name. A Masthead data scan’s incidents carry the same ID in measurementData.scanId, so an agent can go from an incident to its scan. On Dataplex incidents, that field holds the Dataplex scan instead.
create_data_scan
Section titled “create_data_scan”Validate or create a Masthead data scan on a BigQuery table. With dryRun set to true, the default, Masthead reads the table as its service account and returns a summary—rows, tables, metrics (rules), time range, and bytes processed—or an error that says what to fix. With dryRun set to false, it also creates the scan and starts its first run right away. Every scan needs a description: one or two plain sentences on what the scan checks, which the Masthead app shows on the scan page. Agents suggest one from the metrics and let you edit it before they create the scan. type is ANALYSIS (Analysis, the default: Masthead learns each metric’s normal range) or ANALYSIS_WITH_THRESHOLD (Analysis with threshold: the limits are the lower_threshold and upper_threshold columns of each row). You can’t change it later. For the table format, see Scan type.
update_data_scan
Section titled “update_data_scan”Pause or resume a scan, change its description, frequency, or processing delay, or point it at another table. An empty description clears it. Changing the table or frequency deletes the scan’s history and analyzes it again from scratch.
delete_data_scan
Section titled “delete_data_scan”Delete a scan with its stored results and open incidents. The BigQuery table stays in place.