Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/docs/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ Slack channel in the Tableau #DataDev workspace.
| [list-flow-runs](tools/flows/list-flow-runs.md) | Retrieves the run history (executions) of Tableau Prep flows on a site ([REST API][list-flow-runs]) | All SKUs |
| [list-flow-tasks](tools/flows/list-flow-tasks.md) | Retrieves the scheduled flow run tasks (schedules) for Tableau Prep flows on a site ([REST API][list-flow-tasks]) | All SKUs |
| [delete-content](tools/content/delete-content.md) | Admin-only. Two-phase (preview/confirm) delete of a workbook, data source, or extract refresh task ([REST API][delete-workbook], [REST API][delete-datasource], [REST API][delete-extract-refresh-task]) | All SKUs |
| [get-view-data](tools/views/get-view-data.md) | Retrieves data in CSV format for the specified view in a Tableau workbook. *Note: the get-view-data api currently has a limitation that when used on a dashboard sheet type, it will only return data for the first worksheet in the dashboard. This will be fixed in the 26.3 fall release.* ([REST API][get-view-data]) | All SKUs |
| [get-view-data](tools/views/get-view-data.md) | Retrieves data for the specified view in a Tableau workbook. Tableau REST API 3.30 and later returns all server-exported sheet parts; earlier versions return CSV for the requested worksheet, or the first worksheet of a dashboard. ([REST API][get-view-data]) | All SKUs |
| [get-view-image](tools/views/get-view-image.md) | Retrieves an image for the specified view in a Tableau workbook ([REST API][get-view-image]) | All SKUs |
| [get-custom-view-data](tools/views/get-custom-view-data.md) | Retrieves data in CSV format for the specified custom view in a Tableau workbook. *Note: the same limitation of get-view-data exists for this tool.* ([REST API][get-custom-view-data]) | All SKUs |
| [get-custom-view-data](tools/views/get-custom-view-data.md) | Retrieves CSV data for the specified custom view in a Tableau workbook. A dashboard-based custom view returns its first worksheet. ([REST API][get-custom-view-data]) | All SKUs |
| [get-custom-view-image](tools/views/get-custom-view-image.md) | Retrieves an image for a saved custom view ([REST API][get-custom-view-image]) | All SKUs |
| [query-datasource](tools/data-qna/query-datasource.md) | Retrieves json formatted data from a published data source by executing VizQL Data Service requests ([VDS API][vds]) | All SKUs |
| [list-all-pulse-metric-definitions](tools/pulse/list-all-pulse-metric-definitions.md) | Lists all Pulse metric definitions on a specific Tableau Cloud site. ([Pulse API][pulse]) | All SKUs |
Expand Down
59 changes: 53 additions & 6 deletions docs/docs/tools/views/get-view-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ sidebar_position: 3

# Get View Data

Retrieves data in comma separated value (CSV) format for the specified view in a Tableau workbook.
Retrieves data for the specified view in a Tableau workbook.

## APIs called

- [Query View Data](https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_ref_workbooks_and_views.htm#query_view_data)
for Tableau REST API versions below 3.30
- `GET /sites/{siteId}/views/{viewId}/allData` for Tableau REST API version 3.30 and later
- [Get View](https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_ref_workbooks_and_views.htm#get_view)
(if applicable [tool scoping](../../configuration/mcp-config/tool-scoping.md) is enabled)

Expand All @@ -32,20 +34,57 @@ Example: `{ "year": "2017" }`

## Response behavior

The tool returns one of two result shapes:
The result shape depends on the Tableau REST API version.

### Tableau REST API 3.30 and later

The tool requests allData and returns a JSON array containing every sheet part exported by Tableau,
in the response order. Each successful sheet contains its name, columns, rows, and an `OK` status.
An unavailable sheet is returned with an `ERROR` status, its error detail when available, and empty
columns and rows; it does not prevent healthy sheets from being returned.

For valid multipart response parts, the tool does not select, synthesize a manifest for, locally
filter, or reject sheets. Duplicate sheet names are returned as distinct parts. The allData request
is blocking and returns each sheet in full, so very large responses can exceed practical MCP
context limits. Request-level failures and malformed multipart responses fail the whole tool call;
they do not return partial results or fall back to the legacy CSV endpoint.

```json
[
{
"sheetName": "Sales",
"columns": ["Region", "Sales"],
"rows": [["West", "100"]],
"sheetStatus": "OK"
},
{
"sheetName": "Profit",
"columns": [],
"rows": [],
"sheetStatus": "ERROR",
"errorDetail": "The worksheet is unavailable."
}
]
```

### Tableau REST API versions below 3.30

The tool uses Query View Data and returns CSV for the requested worksheet, or the first worksheet
when the requested view is a dashboard. It returns one of two result shapes:

- **`MCP_S3_BUCKET` unset (default):** returns the CSV as a single JSON-encoded text string
(`JSON.stringify(csv)`), with newlines escaped as `\n`.
- **`MCP_S3_BUCKET` set:** returns a `resource_link` with a short-lived presigned URL to the CSV
file in S3, instead of inlining the data.
- **`MCP_S3_BUCKET` set with `view-data-file-mode` enabled:** returns a `resource_link` with a
short-lived presigned URL to the CSV file in S3, instead of inlining the data. If the feature is
disabled or the upload fails, the tool returns the CSV inline.

## Example result (default)
## Example legacy result (default)

```
"Country/Region,State/Province,Profit Ratio,Latitude (generated),Longitude (generated)\nCanada,Alberta,19.5%,53.41,-114.42\nCanada,British Columbia,4.2%,54.9464,-125.1024\nCanada,Manitoba,8.2%,55.0085,-97.1771\n"
```

## Example result (S3 mode)
## Example legacy result (S3 mode)

```json
{
Expand All @@ -56,3 +95,11 @@ The tool returns one of two result shapes:
"description": "View data (CSV) stored in S3. This is a short-lived presigned URL."
}
```

## Data and limits

Returned data reflects the view after Tableau applies the view filters supplied through
`viewFilters`. It does not return direct datasource rows.

The tool has no local cache and does not expose an API cache-age control. Streaming, pagination,
and direct VizQL Data Service fallback are not supported by this tool.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@tableau/mcp-server",
"description": "Helping agents see and understand data.",
"version": "4.10.0",
"version": "4.10.1",
"repository": {
"type": "git",
"url": "git+https://github.com/tableau/tableau-mcp.git"
Expand Down
Loading