mcp
v0.7.0MCP Apps delivery for Surfaces UI: tools, ui:// resources and a stdio server
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
show_data_grid Show a table
Shows the rows of a SQL query in an interactive table the person can scroll and sort. Use for looking at records.
| Parameter | Type | Description |
|---|---|---|
sql * | string | A single read-only SELECT statement. Do not add LIMIT for paging; the table pages by itself. |
sourceId | string | Data source ID. Omit to use the default source. |
title | string |
show_chart Show a chart
A chart over a SQL query. Give each measure an aggregate so the database summarises the data; without one the chart plots a random sample of rows. Each entry in y is a series; give series their own type and axis for a compound chart. Choose the form from the comparison: bars for amounts across categories (they are sorted largest first and start at zero), a line with xGrain for change over time, xBins for a distribution, scatter for two measures. Avoid a pie beyond five slices, more than five lines, and a second y scale (use two charts on the same x instead); the chart shows advice when its sha…
| Parameter | Type | Description |
|---|---|---|
sql * | string | A single read-only SELECT statement. Do not add LIMIT for paging; the table pages by itself. |
type * | string | |
x * | string | Column for the x axis, the slices of a pie, the columns of a heatmap, the stages of a funnel, the parts of a treemap, or where a sankey's flows start. |
y * | array | |
legend | string | |
sourceId | string | Data source ID. Omit to use the default source. |
splitBy | string | Column whose values become separate series; the rows of a heatmap, the groups of a treemap, or where a sankey's flows go. |
stacked | boolean | |
title | string | |
xBins | integer | Group a numeric x column into about this many bins. |
xGrain | string | Group a date or time x column into buckets of this size. |
show_pivot_table Show a pivot table
Shows a pivot table over a SQL query: row values down the side, column values across the top, summarised measures in the cells, with totals. The database does the grouping. Choose columns with few distinct values.
| Parameter | Type | Description |
|---|---|---|
measures * | array | |
rows * | array | Columns whose values become the rows. |
sql * | string | A single read-only SELECT statement. Do not add LIMIT for paging; the table pages by itself. |
columns | array | Columns whose values become the columns. |
sourceId | string | Data source ID. Omit to use the default source. |
title | string |
show_query_result Explore a query
Shows a query the person can explore themselves: filters, a table and a chart of the same result, and the SQL that ran.
| Parameter | Type | Description |
|---|---|---|
sql * | string | A single read-only SELECT statement. Do not add LIMIT for paging; the table pages by itself. |
sourceId | string | Data source ID. Omit to use the default source. |
title | string |
open_sql_editor Open the SQL editor
Opens a SQL editor with autocomplete for the source's tables, where the person can write and run queries.
| Parameter | Type | Description |
|---|---|---|
sourceId | string | Data source ID. Omit to use the default source. |
sql | string | SQL to start with. |
show_schema_explorer Browse tables
Shows a searchable tree of the source's tables and their columns.
| Parameter | Type | Description |
|---|---|---|
sourceId | string | Data source ID. Omit to use the default source. |
render_surface Show a custom view
Shows a custom layout (a dashboard, a summary) described as A2UI messages using catalog urn:surfaces:catalog:analytics:v1. Call get_component_docs first to learn the components.
| Parameter | Type | Description |
|---|---|---|
messages * | array | A2UI messages: createSurface, then updateComponents, then optionally updateDataModel. |
show_dashboard Show a dashboard
Shows a dashboard described as a json-render spec ({ root, elements, state }). Prefer render_surface for new work.
| Parameter | Type | Description |
|---|---|---|
spec * | object |
get_component_docs Component documentation
Explains how to build a custom view: the message format and every component with its props and an example. Pass a component name for just that one.
| Parameter | Type | Description |
|---|---|---|
component | string |
list_tables List tables
Lists the data sources and the tables in one of them. A short list comes with each table's columns and types; a long one gives names only, so narrow it with `search` or `database`, or call describe_table. Call this before writing SQL.
| Parameter | Type | Description |
|---|---|---|
database | string | A database or schema to list. Omit for the ones the source covers by default. |
search | string | Part of a table name. |
sourceId | string | Data source ID. Omit to use the default source. |
describe_table Describe a table
One table's columns: names, types, keys and descriptions, and the tables it declares joins to. Never data values.
| Parameter | Type | Description |
|---|---|---|
table * | string | The table's name, as list_tables gave it (database.table where it has a database). |
sourceId | string | Data source ID. Omit to use the default source. |
search_data Search the catalog
Finds tables and columns by words or meaning, across the databases the catalog covers. Returns names, types and descriptions, never data values.
| Parameter | Type | Description |
|---|---|---|
query * | string | What to look for, e.g. customer revenue. |
sourceId | string | Search one source. Omit to search all. |
list_pipelines List pipelines
The project's pipelines: datasets built from a source's tables by SQL, with checks. Each with its source, dataset count and last run.
describe_pipeline Describe a pipeline
One pipeline: each dataset's query, what it reads, what one row is (grain), its key, columns and checks, and how its last build went. Built datasets are tables of the source and can be queried like any other.
| Parameter | Type | Description |
|---|---|---|
pipelineId * | string | The pipeline's id, from list_pipelines. |
check_pipeline Check a pipeline
Checks a pipeline without building anything: every query is read-only, everything it reads exists, nothing depends on itself, and the checks can be written. Returns the problems found.
| Parameter | Type | Description |
|---|---|---|
pipelineId * | string | The pipeline's id, from list_pipelines. |
select | array | Datasets to build: name alone, name+ with what reads it, +name with what it reads. Omit for all. |
get_run A pipeline run
How a pipeline run went: each dataset's state and rows, and every check's result. Counts only.
| Parameter | Type | Description |
|---|---|---|
pipelineId * | string | The pipeline's id, from list_pipelines. |
runId * | string |
show_pipeline Show a pipeline
Shows a pipeline live to the person: its datasets and how they feed one another, its runs, and each dataset's query, grain, key, columns and check results. The person can run it, check it, rebuild one dataset or cancel from there.
| Parameter | Type | Description |
|---|---|---|
pipelineId * | string | The pipeline's id, from list_pipelines. |
propose_dataset Propose a dataset
Proposes a new or changed dataset in a pipeline, or a new pipeline holding it (give `sourceId` and a new `pipelineId`). Saves nothing: returns the pipeline as it would be, with its approval digest and the version it is based on. Then draw a DatasetReview with `pipeline`, `dataset`, `expectedVersion` and `digest` from this answer; the person reviews, may change it, and only their approval saves it. Give the grain and the key: the key is checked unique and never empty after every build. The proposal is shown to the person for review, filled in here: do not draw it yourself. The person edits it,…
| Parameter | Type | Description |
|---|---|---|
grain * | string | |
name * | string | |
pipelineId * | string | The pipeline's id, from list_pipelines, or a new id to propose a new pipeline. |
sql * | string | |
checks | array | |
columns | array | |
depends | array | |
description | string | |
layer | string | |
pipelineName | string | For a new pipeline only: its name. |
primaryKey | array | |
sourceId | string | For a new pipeline only: the source it reads and builds in. |
view | boolean |
run_pipeline Run a pipeline
Builds a pipeline's datasets, replacing their tables, then runs their checks. Ask the person first. Waits up to a minute, then returns the run id for get_run.
| Parameter | Type | Description |
|---|---|---|
pipelineId * | string | The pipeline's id, from list_pipelines. |
select | array | Datasets to build: name alone, name+ with what reads it, +name with what it reads. Omit for all. |
surfaces_pipeline_rpc Surfaces pipeline channel
Used by the Surfaces app page to show pipelines and act on a person's choices there. Not for direct use.
| Parameter | Type | Description |
|---|---|---|
method * | string | |
request * | object |
surfaces_rpc Surfaces data channel
Used by the Surfaces app page to fetch data. Not for direct use.
| Parameter | Type | Description |
|---|---|---|
method * | string | |
request * | object |
check_setup Check the data setup
Says where this server's data comes from (the person's own database, a config file, or the built-in sample data), whether it can be reached right now, and what to do if not. Call it first when a data tool fails, when someone asks to connect their database, or when only sample data shows and they expected their own. It reads settings and runs one harmless listing; it never shows a password.
timing_report How long views took to load
Says how long the views this server drew took to get their data, and how much of that was the database and how much this server added. Numbers only: no query, table name or value. Call it when someone asks whether Surfaces is slow, or to compare it with querying the database directly.