Guide
MCP
The query_metrics, get_schema, list_connections, explain_metric, get_data_freshness and dataset tools (list_datasets, describe_dataset, query_dataset), all read-only, the create_export and get_export result-handle tools (create_export is the one that is not read-only), the workspace-context resource, and why the queries return the same objects as REST.
SignalBraid exposes its queries as Model Context Protocol tools: query_metrics,
get_schema, the three dataset tools list_datasets, describe_dataset and query_dataset (for a Google Sheet a user connected), list_connections (the connections and accounts your key can read), explain_metric (what a metric means and how it may be combined), get_data_freshness (how fresh the published data is), and create_export and get_export (a result handle to a CSV export of a result too large for one response). The earlier query_ga4_sessions was removed with the legacy GA4 body, and query_marketing_performance with the move of Google Ads onto query_metrics. An AI client can answer a question from your data
and cite the same provenance the API returns.
The point is not that an assistant can reach the data. It is that it reaches the
same published snapshot the API and your spreadsheet read, so three surfaces agree
on more than a total. query_metrics calls the same profile query service as a POST /v1/query body with a
profile key and returns the identical result envelope (the per-request requestId aside). It is not a summary, and
not a re-computation.
Availability
Section titled “Availability”There is no production MCP endpoint yet: https://mcp.signalbraid.com/mcp is not attached, so no customer can connect today. The route is POST /mcp, served on the staging public host through the edge Worker, which forwards only that route to the private gateway over a Cloudflare service binding. A scripted client with a query:read API key was live-verified against staging on 6 November 2026 (initialize, tools/list, list_connections, explain_metric, get_data_freshness and query_metrics); that is not a named-client test and says nothing about production.
Every POST must send Accept: application/json, text/event-stream; both media
types must be explicitly acceptable, for both legacy and current protocol requests.
Both are parameterless server representations: a parameterized range does not stand
in for either one, and an explicit quality of zero is not acceptable.
Two gates, in this order. Private-origin gate first: the request URL must be
the gateway’s private origin with the path /mcp; the
Host header must be absent or name that private origin (a pinned local development bridge form is
also accepted); and an Origin header, if present,
must equal that origin. This gate runs before the authorization store is touched,
as required by the MCP transport’s DNS-rebinding defense. Authentication second:
requests that reach that boundary need a current query:read key.
The order matters when you are reading a status. A disallowed URL, Host or
Origin returns 403 without checking whether the key exists. With the private
origin accepted, a missing or invalid key returns 401; a current key without
query:read returns 403.
An operator-run acceptance passed on 7 September 2026 using MCP Inspector 2.5.0
against the private staging deployment, with all nine of its verification checks
green. The acceptance record names the client and version only; the transport
(Streamable HTTP) and protocol version (2026-07-28) are recorded in an earlier
run’s client block rather than in that record. Claude, ChatGPT and Cursor are the
intended clients and are not yet tested; setup guides will be written when they are,
not before.
query_metrics
Section titled “query_metrics”Reads published metrics for one connection and one account, or several GA4 properties or Search Console sites, from a query profile: today
ga4.sessions_daily, google-ads.campaign_daily, search-console.site_daily and search-console.page_daily, the profiles the tool lists. The input is one flat closed object, generated from the
listed profiles: profile is an enum, and each other field is the union of the profiles’ fields, with a
description that says which profile it applies to. The top level has no oneOf, anyOf or allOf, because
the model APIs refuse those. validateQuery is the authority for the per-profile rules (a GA4 window is at most
31 days). tools/list is the authority for the exact fields, metrics, dimension sets and windows.
GA4 users and events (ga4.users_daily, ga4.events_daily) are listed only where their MCP switch is on; they are not listed in
production, and they have no tool of their own.
Search Console (search-console.site_daily for a site by day, search-console.page_daily per page URL by day) is listed by query_metrics
now that its ClickHouse views are installed and granted on staging. There is no separate
Search Console MCP tool: the earlier query_search_console tool was removed (owner decision, 13 October 2026). An account is a Search Console site
(sc-domain:example.com or a URL prefix); days are Pacific Time, only days Google has finalized are read, and a window is at most 28 days. Both
profiles take sources for several sites. A page_daily row is larger than a GA4 row, so a long window over a large site can be refused with
result_too_large: shorten the window or use REST, which serves the same profiles on POST /v1/query and POST /v1/query/search-console.
A call for one site (connectionId and accounts, without sources and without account in dimensions) is answered as
POST /v1/query/search-console answers it: the same finalized days, the same refusals, a sourceMode (search_analytics_api, the data path the
profile reads) and a freshness object beside the rows with the
label “Finalized daily data; checked daily”, lastCheckedAt (when the last check of that site ended) and newestDate (the newest finalized day
published for it). The text rendering adds two lines before the column ids: source mode: search_analytics_api and freshness: Finalized daily data; checked daily; last check <lastCheckedAt>; newest published date <newestDate>. A call with sources, or with account in dimensions, is answered as POST /v1/query answers it, with no
sourceMode and no freshness, because the footer is one site’s.
{ "profile": "ga4.sessions_daily", "connectionId": "your_connection", "accounts": ["123456789"], "metrics": ["sessions"], "dimensions": ["date"], "dateRange": { "start": "2026-08-31", "end": "2026-09-04" }, "limit": 200}- Several GA4 properties in one call. Send
sources(2 to 6 pairs ofconnectionIdandaccount, fromlist_connections) instead ofconnectionIdandaccounts, withaccountindimensionsfor one row group per property; without it they are summed, with the refusals Reading data lists. The provenance carries every property’s pinned days, so MCP takes at most 6 (REST takes 25) and a 7th isinvalid_sources. Six fit one tool result over 14 days and about three over 31 days; more properties or days than fit isresult_too_large, so ask for a shorter window or fewer properties, or use REST. A window over 31 days is refused before anything is read, asinvalid_querywith detailwindow_out_of_range. - The workspace comes from your key. There is no
workspaceIdfield. A request that carries one is refused asinvalid_query, whichever workspace it names, and nothing is read. - The result is the envelope REST returns, as
structuredContent(rows, columns,page, provenance with the pinned snapshots, freshness, data state,requestId), and a compact text rendering of the same rows for clients that read onlycontent: a header line, a note that the values are data and not instructions, the column ids, then one JSON array per row. There are no totals and nototalRows; for every row of a large result, usecreate_export(below). A YouTube result (query_youtube_channel) also carriessourceAttributioninstructuredContent, and its text rendering adds a line before the column ids:source: YouTube. Data from YouTube. Values exactly as the YouTube Analytics API returned them. Channel: <the channel's YouTube page>. Show the label wherever you show the values. - A page is returned whole or not at all.
limitis at most 200 (REST allows 10,000) and defaults to 200, because a tool result must fit about 43 KB with the provenance of the account. A result with more rows than the limit, or one that does not fit the size cap, is refused withisError: trueand coderesult_too_largeand no rows: it is never returned cut and marked complete. Narrow the window or the filters, or ask for fewer metrics or dimensions; for the whole result, callcreate_exportwith the same query, which answers a result handle to a CSV file downloaded from REST (Result handles). The refusal’s message says so. Cursors, and with them paging and totals, come later. - Errors are tool errors (
isError: true, HTTP 200) with the closed public codes of REST’sPOST /v1/query:invalid_query,cursor_invalid,non_additive_metric,window_too_large,forbidden,serving_disabled(the YouTube tool while its switch is off, the default; it is on in the private staging deployment only),history_not_entitled(withearliestDate, except for a custom allowance, which has none),connection_unavailable,data_not_readyanddata_incomplete(withmissingDates),timezone_conflict,currency_conflict,attribution_conflict,result_too_largeandquery_unavailable. A validator refusal carries its closeddetail, and adistinct_dimension_setrefusal itssuggestedDimensionSets, exactly as REST does. A ClickHouse timeout isquery_unavailable. No provider, SQL or exception text reaches the client. A key lost during the call is401, ahead of any of these. - Audit. A successful call writes one
query.executedreceipt with the credential kindmcp; a refusal writes none.
Result handles: create_export and get_export
Section titled “Result handles: create_export and get_export”A result too large for one tool response is refused, never cut or paged. For the whole result, call
create_export with the same query. It creates the CSV export POST /v1/query/export creates
(Exports) and answers a result handle, never rows. get_export follows it.
- Input.
create_exporttakes the query fields of the query tools:profile,connectionId,accounts(exactly one),metrics,dimensions,dateRange,orderByandfilters. It also takesbom(a boolean, defaultfalse: a UTF-8 byte-order mark at the start of the CSV) andidempotencyKey(optional, 8 to 128 characters ofA-Z,a-z,0-9,.,_,:and-). It has nosources: an export over MCP is one connection and one account, and a request withsourcesis refused asinvalid_query. For several sources, callPOST /v1/query/exportwith an API key. It has nolimit, because every row is written; alimitthat is sent anyway does not shorten the file. It has no cursor. The export is planned asPOST /v1/query/exportplans it, so REST’s serving switches decide which profiles export.get_exporttakes{ "exportId": "..." }only. - The handle is the export’s status object, the one
GET /v1/exports/{exportId}answers (exportId,state,rows,bytes,sha256,expiresAt,errorCode,fields,freshness,flags,csvand the rest), plus three URLs and this call’srequestId.statusUrlisGET /v1/exports/{exportId},fileUrlisGET /v1/exports/{exportId}/fileandlinksUrlisPOST /v1/exports/{exportId}/links. Each is absolute on the deployment’s API host where it has one, and a bare path where it has none. The text rendering is a header line (export <id> | state <state> | rows <n> | bytes <n> | expires <time>), the three URLs with what each needs, the field ids, the flags and freshness, the failure code when the export failed, and “Poll get_export until succeeded” while it ispendingorrunning. The handle stays small whatever the result’s size, and it is held to the same 43 KB tool cap as every other result. - Asynchronous. A new export is
pending. A separate job writes the file, so callget_exportuntilstateissucceeded(orfailed), then download the CSV from REST:GETthefileUrlwith an API key that hasquery:read, orPOSTthelinksUrlwith that key for a link someone without a key can open. The CSV never comes through a tool. - An API key, not OAuth. Creating and downloading an export both need an API key with
query:read. An MCP connection made with OAuth can callget_export, butcreate_exportrefuses it withforbiddenand creates nothing, because the export is written later under the authority of the API key that created it. Create an API key in the app and connect MCP with it, or callPOST /v1/query/exportwith the key. - Idempotency and limits. The same
idempotencyKeywith the same request returns the same export, in whatever state it is in. With a different request it isidempotency_conflict. The key space is the workspace’s, shared with REST’sIdempotency-Keyheader. A workspace has at most one export running and three waiting (export_limit_reached). Eachcreate_exportcall draws on the same per-plan export allowance asPOST /v1/query/export, and past it is refusedrate_limitedwithretryAfterin seconds. - Tenancy. The workspace comes from your key. An export of another workspace and one that does not exist are the
same
export_not_found. - Errors are tool errors with the export codes:
invalid_query,forbidden,history_not_entitled,connection_unavailable,data_not_readyanddata_incomplete(withmissingDates),timezone_conflict,idempotency_conflict,export_limit_reached,export_not_found,rate_limited,result_too_largeandexport_unavailable. A key lost during the call is401, ahead of any of these. - Not read-only.
create_exportis the one tool whosereadOnlyHintisfalse: it creates an export row, a file and anexport.requestedreceipt (credential kindmcp), and it takes a slot. A refusal or a replay writes none. Neither tool writes aquery.executedreceipt. - Not for datasets. A custom dataset has no export:
query_datasetrefuses an over-size result withresult_too_largeand no handle.
Implemented and tested in the gateway; not yet deployed or verified on a live environment.
query_ga4_sessions (removed)
Section titled “query_ga4_sessions (removed)”The deprecated query_ga4_sessions was removed together with the legacy GA4 body of POST /v1/query.
The server no longer knows it: a call is a JSON-RPC -32602 with no result, in both protocol eras. Use
query_metrics with profile ga4.sessions_daily.
Google Ads over query_metrics
Section titled “Google Ads over query_metrics”Google Ads is the query_metrics profile google-ads.campaign_daily: campaign performance by day for one
connection and one account, with the metrics spend, impressions, clicks, conversions, conversion_value,
all_conversions, all_conversion_value, view_through_conversions, ctr and cpc, the dimensions date,
campaign_id and currency_code (and channel_type and campaign_status as filters), and a window of at most 93 days.
tools/list is the authority for the exact fields. The answer is the one POST /v1/query returns for the same body.
- Money is the account’s own currency and is never converted.
spendand the other money metrics are never summed across currencies; a request that would is refused, and each result names the account’s currency. - Finality. Recent days are
preliminaryorrestating; the result says so and namesrestatingFrom, the first day not yet settled, andrestatingUntil(when the store records one), the earliest date a day not yet settled counts as settled. Other profiles that read published report heads state the same two fields only while a day in the answer is not yet settled. A day not yet published is refused withdata_incomplete(with the missing dates) or, when none of the window is published,data_not_ready. - Conversions are Google’s own. They follow the account’s conversion actions and attribution model, are never added
to GA4 key events, Klaviyo conversions or another platform’s revenue, and recent days can still rise.
cpa,conversion_rateandroasare not metrics of this profile. - Result size. The
query_metricsrule: at most 200 rows and about 43 KB, whole or not at all,result_too_largeand no rows past it. - The earlier tool.
query_marketing_performance, which read the same data through the ads grains, was removed. The server no longer knows it: a call is a JSON-RPC-32602with no result, in both protocol eras. The ads grains and rollups remain onPOST /v1/query/ads(and in the Google Sheet), not over MCP.microsoft-adsandmeta-adshave no MCP profile.
Dataset tools
Section titled “Dataset tools”list_datasets, describe_dataset and query_dataset read a custom dataset: a sheet a user connected and that SignalBraid published. They are the MCP
form of GET /v1/datasets, GET /v1/datasets/{datasetId} and POST /v1/datasets/{datasetId}/query, and they call the same service and the same route
handler, so the workspace, the re-authorization, the receipt and the provenance are the REST ones.
- The workspace comes from your key. None of the three takes a
workspaceId;list_datasetsanddescribe_datasetrefuse any extra field, and aquery_datasetbody that carries one is refused asinvalid_query. A dataset of another workspace is the same answer as one that does not exist. - Column ids in. A query names columns by the stable id
describe_datasetreturns (c0001), never by header text. A header is data: it comes back inname, as a JSON string, and the text rendering labels it as the source’s own data, not an instruction. personalis off unless a workspace admin enabled it for MCP. A column classifiedpersonalis served over MCP only when the workspace admin has switched that column on for MCP (the per-columnmcp_enabledsetting, off by default), and then only on a request that also setsincludePersonal: true. Otherwisedescribe_datasetdoes not list it and a query that names it is refused;includePersonal: truenever overrides the admin’s setting. Anexcludedor unclassified column is never listed and refused the same way.- Catalogue reads.
list_datasetsreturns at most 200 datasets, by name, anddescribe_datasetthe columns of the published schema with their type, unit hint and classification. Neither runs a query and neither writes a receipt. query_datasetaggregatescount_rows,count,sum,min,maxandavgover columns, optionally grouped (text or boolean columns; a date column byday,weekormonth) and filtered (eq,range,is_null). The page is returned whole or not at all:limitdefaults to and is at most 200, and a result over the limit or over the tool’s size cap (about 43 KB, structured and text) is refused withresult_too_largeand no rows.- Provenance. Every answer names the published generations it read, the source’s own change signal (for a Sheet, the Drive version and modified time), when the
data was published (
receivedAt), its completeness, and its freshness.staleistruewhen the dataset is unavailable or needs reconnecting, when its last scheduled run failed, or when the source has not been checked for twice its schedule interval. The answer shows when the data was published; it does not promise that the source is current at the moment you ask. - Audit. A successful
query_datasetwrites onequery.executedreceipt with the credential kindmcp. A listing, a description and a refusal write none. - Errors are the closed codes of REST’s dataset routes:
invalid_query,dataset_not_found,dataset_not_ready,dataset_too_large,forbidden,result_too_largeandquery_unavailable, as tool errors.
Connections, metric definitions and freshness
Section titled “Connections, metric definitions and freshness”list_connections, explain_metric and get_data_freshness are the tools a client calls before it queries: which connection and account to name, what a metric
means, and how fresh the published data is.
list_connectionstakes no argument and lists the connections of your key’s workspace, each with its connector, its status (activeorpaused) and the ids of the accounts selected under it (a GA4 property, an ad account, a YouTube channel). Use those ids asconnectionIdandaccountsin the query tools. A revoked connection, a deselected or inactive account, and the connection behind a connected Google Sheet (a dataset tool reads that one) are not listed. It returns ids only: display names and data-through dates are not returned yet, and a query result states the data-through date of what it read. The list is whole or refused withresult_too_large(more than 500 accounts, or about 43 KB); it runs no query and writes noquery.executedreceipt. Another workspace’s connection is never listed, even when it has the same id as one of yours.explain_metrictakes{ "profile": "ga4.sessions_daily", "metric": "sessions" }and returns the metric’s definition and definition version, its label, unit and value type, how it aggregates (sum,ratio,weighted_average,distinctorsnapshot, with the metrics a ratio or weighted average is built from), whether a client may re-aggregate it, the currency rule of a money metric, and the profile’s calendar, coverage and limitations. It answers the profiles the query tools listed for your deployment read; any other profile, or a metric the profile does not have, is anot_foundtool error. It reads the published registry only and touches no connection.get_data_freshnesstakes{}or{ "connectionId": "..." }(an id fromlist_connections) and returns, for each accountlist_connectionslists (or the accounts of that one connection), how fresh its published data is.- GA4 sessions (
ga4.sessions_daily,"read": "daily_heads", infreshness): the last published date, when that day was extracted and published, its time zone,stale(true when that extraction is older thanstaleAfterHours, the same thresholdquery_metricsapplies), the state of the newest sync run that endedcompleted,partialorfailed, and the dates missing from the published days of the 31 days up to the last published date (checkedFromnames the first day checked; a day before the first published day is never called missing). - Report profiles (in
profiles, one entry per profile): GA4 users and events (ga4.users_daily,ga4.events_daily, beside the sessions of the same property), Search Console (search-console.site_daily,search-console.page_daily), YouTube (youtube.channel_daily), Klaviyo (klaviyo.campaign_daily,klaviyo.flow_daily) and Google Ads (google-ads.campaign_daily). An account of Search Console, YouTube, Klaviyo or Google Ads answers"read": "report_heads"withfreshnessnull. Each entry gives the last published date, when it was published and when its run was extracted (nullwhen the run records no time), its time zone and finality, the newest run that endedraw_committedorfailed, the missing dates over the same 31-day window, andstale: true when the last publication is older thanstaleAfterHours. A query result over these profiles carries nostalejudgement of its own (a one-site Search Console result ofquery_metricscarries thefreshnessfooter above, which names the last check and the newest day and judges nothing), so thisstaleis the tool’s judgement, not a query’s; and a profile listed here is not a promise that any output serves it (its serving switch may be off). Each profile is read under the finality its query reads: a Search Console day not yet final, or a Klaviyo day still preliminary, isquery_unavailable, as a query over it would be. - With nothing published, the dates and times are
nullandstaleisnull, never a zero; the report profiles are still listed. Every other connector’s account (the organic-social platforms, HubSpot, Salesforce, Shopify, Stripe, Meta Ads, Microsoft Ads) is listed with"read": "not_read", no figures and no profiles. - A connection id that is unknown, revoked or another workspace’s is
connection_unavailable. One call reads at most 30 account and profile pairs (GA4 sessions and each report profile count one, so a GA4 property is three); more isresult_too_large(name one connection). A published day the store cannot vouch for isquery_unavailable, as a query over it would be. A day extracted ahead of the server’s clock isquery_unavailabletoo: for GA4 sessions that is the refusalquery_metricsmakes, butquery_metricsmakes no such check for the report profiles, so there the refusal is this tool’s own. Either kind of day, or a change of time zone in a window with no missing day, anywhere in a 31-day window fails the whole call, for every account. A paused connection is listed with its figures, aslist_connectionslists it. It calls no provider, runs no query and writes noquery.executedreceipt.
- GA4 sessions (
The input schemas of the query tools and the profile and metric choices of explain_metric are derived from the query profiles the server serves (from
@sb/schema). The descriptions, the dataset tools’ schemas, get_schema’s, list_connections’ and
get_data_freshness’ are written by hand.
The workspace-context resource
Section titled “The workspace-context resource”Besides the tools, the server lists one read-only MCP resource, so a client can load the workspace’s connections and their freshness as context before it calls a
tool. resources/list returns it, and resources/templates/list returns an empty list:
| Field | Value |
|---|---|
uri | signalbraid://workspace/context |
name | workspace-context |
title | Workspace context |
mimeType | application/json |
annotations | { "audience": ["assistant"] } |
The URI is the same for every key and names no workspace: the workspace is your key’s, as it is for every tool. resources/read with exactly that URI returns one
text block holding one JSON object:
{ "resource": "workspace-context", "serverTime": "2026-08-05T00:00:00.000Z", "tools": ["query_metrics", "list_datasets", "...", "get_schema"], "connections": [{ "connectionId": "...", "connector": "ga4", "status": "active", "accounts": [{ "accountId": "..." }] }], "freshness": { "available": true, "accounts": [] }, "requestId": "..."}(Illustrative values.) connections is exactly what list_connections returns, freshness.accounts exactly what get_data_freshness returns with no
connectionId, and serverTime the clock reading of that freshness read. tools names the tools the same server lists. Nothing else is read and no figure is
added. The resource reads the connection list twice per read (once for itself, once inside the freshness read), as the two tools do when called one after the other.
- Freshness over its cap. When the workspace has more than 30 account and profile pairs, the freshness part is
{ "available": false, "reason": "result_too_large", "hint": "call get_data_freshness with connectionId" }andserverTimeisnull; the connections are still returned. Callget_data_freshnesswith oneconnectionIdat a time. If the workspace grows past 500 accounts between the resource’s own listing and the one inside the freshness read, that second listing also answers this way (the connections are still served). - Every other failure fails the whole read with JSON-RPC
-32603and no content: more than 500 accounts, a text over the 43,690-byte cap (never cut), a store failure, or any freshness refusal other than that cap (a published day the store cannot vouch for, for example). A failure is never shown as “no freshness”. - Only the exact URI. Any other URI (another workspace’s path, a query string, a trailing slash, another scheme), a missing or non-string
uri, or any other parameter is JSON-RPC-32602, answered before anything is read; this refusal does not echo the URI.resources/listandresources/templates/listtake no parameter, so acursoris-32602too. - No subscriptions.
resources.listChangedis advertised asfalseandsubscribeis not advertised;resources/subscribeis-32601. - A key revoked during the read yields 401 and no content, as for a tool. The read runs no query and writes no
query.executedreceipt.
What it cannot do
Section titled “What it cannot do”The tool surface is deliberately tiny, because an MCP endpoint is an execution surface handed to a model.
- No SQL, no free-form parameters. Every input schema is a strict object; an extra property is
rejected rather than ignored.
query_metricstakes only the filters its profile declares. - No writes but an export. No sync trigger, pilot setup or schedule mutation.
sync:writeis not reachable over MCP at all: the route authenticatesquery:read. The one tool that writes iscreate_export, which creates a query export asPOST /v1/query/exportdoes under the samequery:readscope; every other tool is read-only. - No cross-workspace access.
query_metricshas noworkspaceIdargument: its workspace is always the key’s, and no tool takes one: aworkspaceIdin the arguments is refused. The query service binds the authorised workspace independently of whatever the input says. - No other tools.
tools/listreturns exactly ten tools, in this order:query_metrics,create_export,get_export,list_datasets,describe_dataset,query_dataset,list_connections,explain_metric,get_data_freshnessandget_schema, while the YouTube MCP switch and the Klaviyo and CRM MCP switches are off (the default; the YouTube switch is on in the private staging deployment only); with them on,query_youtube_channelis added afterquery_metrics(YouTube data is daily data, two to three days behind YouTube), and the Klaviyo and CRM switches add their profiles toquery_metrics, not separate tools. The list is fixed for a given deployment —tools.listChangedis advertised asfalse, so a client is told not to subscribe to changes that cannot happen. - One resource, nothing more.
resources/listreturns onlyworkspace-context, with no resource templates and no subscriptions. Saved-query resources are not built. A result that does not fit one response is refused; its handle comes fromcreate_exportas a tool result with the export’s URLs, not as an MCP resource or aresource_link.
Statuses and codes
Section titled “Statuses and codes”MCP does not reuse REST’s error contract. Most statuses match, some codes do not, and MCP also uses 406 for its transport negotiation — so use these:
| Status | Code | Cause |
|---|---|---|
| 401 | unauthorized | Missing, unknown, expired or revoked key after the private-origin gate. |
| 403 | forbidden | A disallowed URL, Host or Origin (checked first), a key lacking query:read, or a key whose workspace has no plan at all. |
| 405 | method_not_allowed | Not POST, and only for a request that has already authenticated: the method check runs after the key check, so a non-POST request with a missing or invalid key is 401, not 405. Allow: POST. |
| 406 | JSON-RPC -32000 | Accept did not explicitly allow both application/json and text/event-stream. |
| 415 | json_required | Not application/json, or a Content-Encoding other than identity. REST splits these into unsupported_media_type and unsupported_encoding. |
| 413 | request_too_large | Body over 16 KiB. |
| 400 | invalid_query | A URL query delimiter was present, including a bare ?. |
| 400 | invalid_request | The body is not bounded, valid JSON. REST returns invalid_json. |
| 503 | query_unavailable | The exchange failed or exceeded its deadline. |
| 503 | auth_unavailable | The authorization store could not be reached. |
A 200 does not mean success. Protocol failures come back with HTTP 200 and a
JSON-RPC error object, because that is what the protocol requires: -32600 invalid
request, -32601 unsupported method, -32602 unsupported tool, resource or arguments,
-32603 internal. A client that checks only the HTTP status will read every one of
these as success.
Tool failures are different again: a 200, a valid result, and isError: true carrying
the same fixed error envelope REST uses. data_not_ready and data_incomplete
also carry their bounded, non-empty missingDates list; malformed internal error
fields collapse to query_unavailable. The two export tools answer the export codes instead
(Result handles): idempotency_conflict,
export_limit_reached and export_not_found among them, rate_limited with retryAfter (seconds) when the
per-plan export allowance is spent, and export_unavailable where the query tools say query_unavailable.
The named queryForExport service-binding RPC used by the pilot runtime is private
Worker-to-Worker infrastructure, not an MCP tool or an HTTP route. MCP still exposes
query_metrics and get_schema. A mixed-timezone GA4 query returns isError: true with the
fixed actionable timezone_conflict message, with no analytics read.
Session and transport behaviour
Section titled “Session and transport behaviour”The route is stateless. Each request builds its own server instance and no session id is issued, so nothing carries between exchanges and there is no session to hijack or replay.
On protocol version 2026-07-28, the tools/list, server/discover, resources/list and
resources/templates/list results carry ttlMs: 300000 and cacheScope: "private": a client
may reuse them for five minutes and must not share them with other clients. A resources/read
of workspace-context carries ttlMs: 60000 and cacheScope: "private": one minute, because
its freshness figures move with the clock and a revoked key must not be served from a cache for
long. tools/call results and older-protocol responses, initialize among them, carry neither field.
Authorization is rechecked before the buffered response is released, so a key revoked mid-call yields 401 and no tool result — the same rule as REST.
Limits: requests capped at 16 KiB, complete responses at 128 KiB, exchanges at 20 seconds.
There is a third cap worth knowing: a single serialised tool result is capped at 43,690 bytes
(a third of the response cap). query_metrics answers an over-cap result with
result_too_large and no rows, and its message names create_export for the whole result.
get_schema is the one exception. Its serialised result may be up to 61,440 bytes (60 KiB),
and the complete response that carries it must still fit the 128 KiB response cap, measured with
both copies of the result and the escaping of the text block. A schema past either bound is a
schema_unavailable tool error and no schema, never a cut one. Every other tool keeps the
43,690-byte cap.
Protocol-level diagnostics are sanitised before they leave the boundary: the JSON-RPC error code is preserved, and only the message is replaced, so an SDK error never carries exception text or reflected header values out of the gateway.
A syntactically valid JSON-RPC notification has no id and therefore gets no
JSON-RPC response. This includes an unknown notification method and an id-less
tools/call or resources/read: the transport returns an empty HTTP 202 and performs no dispatch.
Unsupported requests that carry an id still return -32601.
Caveat worth passing to whoever reads the answer
Section titled “Caveat worth passing to whoever reads the answer”An assistant citing these numbers is citing a snapshot carrying
provider_may_revise_recent_data and not_independently_reconciled. If your client
surfaces tool output verbatim, the flags travel with it. If it summarises, they may
not — and a confident sentence with the caveats stripped is exactly the failure mode
this API’s provenance exists to prevent.
Discover connector fields
Section titled “Discover connector fields”get_schema accepts exactly { "connector": "ga4" }, with a bounded stable connector ID.
It returns the same body as GET /v1/connectors/ga4/schema, both as structuredContent and
as a single JSON text block: the public connector definition and, under query, the
connector’s query profiles (dimensions, metrics, limits and a catalogVersion), or null
when no profile names the connector or when its profiles are served on neither REST nor MCP
(the organic-social platforms and Stripe today). A listed profile is a definition, not a promise that your
workspace has data for it or that the output serving it is switched on. Unknown connector IDs
return a fixed not_found tool error; extra arguments, account/workspace selectors and
malformed IDs are rejected. See Connector fields for the generated
catalogue.
A schema result is the largest answer this server gives: up to 61,440 bytes, where every other
tool stops at 43,690 (see the limits above). The get_schema entry in tools/list therefore
carries _meta["anthropic/maxResultSizeChars"]: 61440, a hint that Claude Code documents for
keeping a longer text result inline; a client that does not know the key ignores it. Only Claude
Code’s documentation was read for this; no client has been tested with a result above 50,000
characters, and no connector’s schema is that large today (each is held to 49,152 bytes by a test).
All the tools except create_export are read-only, non-destructive and idempotent. Schema discovery calls no provider,
query or sync service. All schema results, tool listings and buffered responses require a
current query:read API key, rechecked before release. This addition is implemented and
locally tested; staging deployment and live verification of get_schema, and of its query
block, remain pending.
list_connections, explain_metric and get_data_freshness are deployed to staging and were live-verified there with an API key on 6 November 2026; they are not in production.