mcp

v0.7.0
@surfaces-ui/mcp Checked 16 hours ago Published 2 days ago

MCP 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.

ParameterTypeDescription
sql *stringA single read-only SELECT statement. Do not add LIMIT for paging; the table pages by itself.
sourceIdstringData source ID. Omit to use the default source.
titlestring

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…

ParameterTypeDescription
sql *stringA single read-only SELECT statement. Do not add LIMIT for paging; the table pages by itself.
type *string
x *stringColumn 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
legendstring
sourceIdstringData source ID. Omit to use the default source.
splitBystringColumn whose values become separate series; the rows of a heatmap, the groups of a treemap, or where a sankey's flows go.
stackedboolean
titlestring
xBinsintegerGroup a numeric x column into about this many bins.
xGrainstringGroup 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.

ParameterTypeDescription
measures *array
rows *arrayColumns whose values become the rows.
sql *stringA single read-only SELECT statement. Do not add LIMIT for paging; the table pages by itself.
columnsarrayColumns whose values become the columns.
sourceIdstringData source ID. Omit to use the default source.
titlestring

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.

ParameterTypeDescription
sql *stringA single read-only SELECT statement. Do not add LIMIT for paging; the table pages by itself.
sourceIdstringData source ID. Omit to use the default source.
titlestring

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.

ParameterTypeDescription
sourceIdstringData source ID. Omit to use the default source.
sqlstringSQL to start with.

show_schema_explorer Browse tables

Shows a searchable tree of the source's tables and their columns.

ParameterTypeDescription
sourceIdstringData 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.

ParameterTypeDescription
messages *arrayA2UI 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.

ParameterTypeDescription
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.

ParameterTypeDescription
componentstring

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.

ParameterTypeDescription
databasestringA database or schema to list. Omit for the ones the source covers by default.
searchstringPart of a table name.
sourceIdstringData 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.

ParameterTypeDescription
table *stringThe table's name, as list_tables gave it (database.table where it has a database).
sourceIdstringData 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.

ParameterTypeDescription
query *stringWhat to look for, e.g. customer revenue.
sourceIdstringSearch 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.

ParameterTypeDescription
pipelineId *stringThe 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.

ParameterTypeDescription
pipelineId *stringThe pipeline's id, from list_pipelines.
selectarrayDatasets 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.

ParameterTypeDescription
pipelineId *stringThe 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.

ParameterTypeDescription
pipelineId *stringThe 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,…

ParameterTypeDescription
grain *string
name *string
pipelineId *stringThe pipeline's id, from list_pipelines, or a new id to propose a new pipeline.
sql *string
checksarray
columnsarray
dependsarray
descriptionstring
layerstring
pipelineNamestringFor a new pipeline only: its name.
primaryKeyarray
sourceIdstringFor a new pipeline only: the source it reads and builds in.
viewboolean

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.

ParameterTypeDescription
pipelineId *stringThe pipeline's id, from list_pipelines.
selectarrayDatasets 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.

ParameterTypeDescription
method *string
request *object

surfaces_rpc Surfaces data channel

Used by the Surfaces app page to fetch data. Not for direct use.

ParameterTypeDescription
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.