mcp tools
The tools that tidepool offers to agents at POST /mcp. Each tool calls one HTTP endpoint with the credentials of the agent. See agents for the token that each tool needs and the policy for changes.
describe_model
Describe the model · read only
Tables with their columns and row counts, datasets and fields (with labels, grains and the model's ai_context: instructions, synonyms and examples), relationships, metrics with their SQL, dashboards and their visuals, the visual types there are, and how answers are computed (semantics). Read this first: names in queries are the ones it lists.
No arguments.
preview_table
Preview a table · read only
The newest rows of a table.
| key | type | default | description |
|---|---|---|---|
limit | integer | 20 | |
table | string | required |
query_metrics
Query metrics · read only
Metrics grouped by fields (dataset.field, time fields with a grain: minute, hour, day, week, month, quarter, year), under filters (in a list, from/to a half-open range, or contains a text, for a string field, ignoring the case of ASCII letters), sorted and limited. The body of POST /v1/query.
| key | type | default | description |
|---|---|---|---|
dimensions | list of object with field, grain | ||
filters | list of object with contains, field, from, in, to | ||
limit | integer | ||
metrics | list of string | required | |
sort | list of object with column, desc |
read_rows
Read the newest rows · read only
The newest rows of a table that pass filters, newest first: the fields to show (dataset.field, of one table and the tables it reaches), and filters as in query_metrics. A contains filter on a log line's text finds the lines that mention something. The body of POST /v1/rows.
| key | type | default | description |
|---|---|---|---|
fields | list of string | required | |
filters | list of object with contains, field, from, in, to | ||
limit | integer | 100 |
show_view
Show a live view · read only
Shows an answer as a view: a dashboard that lives only in memory, drawn and kept live by Tidepool, cross-filtered by clicks, and never written to the config. Visuals as in a dashboard file (id, type, dimensions, metrics, …; see visual_types in describe_model; at is optional), filters as in one. The answer has the view's id, its path in the UI (/#/v/<id>), and each visual's numbers as of now. Hosts that show MCP Apps draw it live in the conversation (ui://tidepool/view). The view is forgotten after a day unused; save_view keeps it.
| key | type | default | description |
|---|---|---|---|
filters | list of object | ||
name | string | Its title. | |
visuals | list of object | required |
save_view
Save a view as a dashboard
Writes a view as dashboards/<id>.yaml, through the same policy as apply_change: added at once when agents may apply safe changes, otherwise waiting for a person. Needs the admin token.
| key | type | default | description |
|---|---|---|---|
id | string | required | The dashboard's id: its file name. |
summary | string | Who or what made it, for the history. | |
view | string | required | The view's id, from show_view. |
get_selection
What the person selected · read only
A live session's selection: what a person looking at a view or dashboard has selected, by the session id the view's app tells you with every selection. The body of GET /v1/sessions/{id}/selection.
| key | type | default | description |
|---|---|---|---|
session | string | required |
set_selection
Point the person at something
Replaces a live session's selection with these conditions (filters as in query_metrics), and the person's view follows at once. One step of their history: Back undoes it.
| key | type | default | description |
|---|---|---|---|
fields | list of object with contains, field, from, in, to | required | |
session | string | required |
get_config
Get the config · read only
Every config file of the current version, and the version: the base for plan_change and apply_change. Needs the admin token.
No arguments.
plan_change
Plan a change · read only
What setting or removing these files would do: problems (with file and line), and every change with its class (safe, rebuild, destructive). Changes nothing. Needs the admin token.
| key | type | default | description |
|---|---|---|---|
base_version | integer | Defaults to the current version. | |
files | map of string | required | Config files to set (path → YAML text) or remove (path → null). Paths: tidepool.yaml, model.ossie.yaml, tables/<name>.yaml, dashboards/<name>.yaml. |
apply_change
Apply a change
Applies the change if its class is one agents may apply on their own (tidepool.yaml agents.auto_apply, safe by default); otherwise it waits for a person's approval and the result says which change to point them to. Needs the admin token.
| key | type | default | description |
|---|---|---|---|
base_version | integer | required | |
files | map of string | required | Config files to set (path → YAML text) or remove (path → null). Paths: tidepool.yaml, model.ossie.yaml, tables/<name>.yaml, dashboards/<name>.yaml. |
summary | string | Who or what made it, for the history. |
ingest_rows
Write rows
Writes rows (JSON objects, column → value) to a table; visible when the call returns. Needs the ingest token.
| key | type | default | description |
|---|---|---|---|
rows | list of object | required | |
table | string | required |