Skip to content

Commit b3b3028

Browse files
committed
mcp docs: add example responses
1 parent 1ea6e82 commit b3b3028

File tree

1 file changed

+85
-0
lines changed
  • doc/user/content/integrations

1 file changed

+85
-0
lines changed

doc/user/content/integrations/mcp.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,23 @@ Discover all available data products. Returns a list of names and descriptions.
194194

195195
**Parameters:** None.
196196

197+
**Example response:**
198+
199+
```json
200+
{
201+
"jsonrpc": "2.0",
202+
"id": 1,
203+
"result": {
204+
"content": [
205+
{
206+
"type": "text",
207+
"text": "[\n [\n \"\\\"materialize\\\".\\\"mcp_schema\\\".\\\"payment_status\\\"\",\n \"Given an order ID, return the current payment status.\",\n \"mcp_cluster\"\n ]\n]"
208+
}
209+
]
210+
}
211+
}
212+
```
213+
197214
### `get_data_product_details`
198215

199216
Get the full schema (columns, types, index keys) for a specific data product.
@@ -202,6 +219,23 @@ Get the full schema (columns, types, index keys) for a specific data product.
202219
|-----------|------|----------|-------------|
203220
| `name` | string | Yes | Exact name from the `get_data_products` list. |
204221

222+
**Example response:**
223+
224+
```json
225+
{
226+
"jsonrpc": "2.0",
227+
"id": 1,
228+
"result": {
229+
"content": [
230+
{
231+
"type": "text",
232+
"text": "[\n [\n \"order_id\",\n \"integer\",\n true\n ],\n [\n \"status\",\n \"text\",\n false\n ]\n]"
233+
}
234+
]
235+
}
236+
}
237+
```
238+
205239
### `read_data_product`
206240

207241
Read rows from a data product.
@@ -212,6 +246,23 @@ Read rows from a data product.
212246
| `limit` | integer | No | Maximum rows to return. Default: 500, max: 1000. |
213247
| `cluster` | string | No | Cluster override. If omitted, uses the cluster from the catalog. |
214248

249+
**Example response:**
250+
251+
```json
252+
{
253+
"jsonrpc": "2.0",
254+
"id": 1,
255+
"result": {
256+
"content": [
257+
{
258+
"type": "text",
259+
"text": "[\n [\n 1001,\n 42,\n \"shipped\",\n \"2026-03-26T10:30:00Z\"\n ]\n]"
260+
}
261+
]
262+
}
263+
}
264+
```
265+
215266
### `query`
216267

217268
{{< note >}}
@@ -226,6 +277,23 @@ Execute a SQL `SELECT` statement against your data products.
226277
| `cluster` | string | Yes | Exact cluster name from the data product details. |
227278
| `sql_query` | string | Yes | PostgreSQL-compatible `SELECT` statement. |
228279

280+
**Example response:**
281+
282+
```json
283+
{
284+
"jsonrpc": "2.0",
285+
"id": 1,
286+
"result": {
287+
"content": [
288+
{
289+
"type": "text",
290+
"text": "[\n [\n 42,\n \"shipped\"\n ]\n]"
291+
}
292+
]
293+
}
294+
}
295+
```
296+
229297
## Observatory endpoint
230298

231299
**`POST /api/mcp/observatory`**
@@ -241,6 +309,23 @@ Execute a SQL query restricted to `mz_*` system tables.
241309
|-----------|------|----------|-------------|
242310
| `sql_query` | string | Yes | `SELECT` query using only `mz_*` system tables. |
243311

312+
**Example response:**
313+
314+
```json
315+
{
316+
"jsonrpc": "2.0",
317+
"id": 1,
318+
"result": {
319+
"content": [
320+
{
321+
"type": "text",
322+
"text": "[\n [\n \"quickstart\",\n \"ready\"\n ],\n [\n \"mcp_cluster\",\n \"ready\"\n ]\n]"
323+
}
324+
]
325+
}
326+
}
327+
```
328+
244329
## Client configuration
245330

246331
Replace `<host>` with your Materialize hostname (or region host for Cloud) and

0 commit comments

Comments
 (0)