Skip to main content

Validate Worksheet Draft

Available September 2026 and later.

Checks that a worksheet's content is well-formed XML before you apply it. Run this preflight against the worksheet XML you have edited so that unclosed tags, mismatched elements, or invalid entities are caught locally — and reported with fix guidance — instead of being sent on to Tableau Studio by apply-worksheet. This tool is read-only: it inspects the XML you pass and never touches an open workbook or the local filesystem.

APIs called​

This tool calls no API. It validates the worksheet content you supply entirely in-process on the MCP server: it does not contact the local Tableau Studio External Client API (no loopback route and no per-session bearer token) and does not call the Tableau Cloud or Server REST API. Because nothing is sent anywhere, there are no OAuth scopes and no Tableau Studio session is required.

  • Checks that the supplied worksheet content is well-formed XML — unclosed tags, mismatched elements, and invalid entities are reported so they can be fixed before applying the worksheet. Validated in-process (not an External Client API call).

Required arguments​

xml​

The worksheet content to validate, passed directly as an XML string. The tool parses it and returns either a "well-formed" confirmation or a numbered list of the well-formedness errors it found, each with guidance to fix the XML before calling apply-worksheet. There is no session argument — validation runs locally and is not tied to any open Tableau Studio instance.

Empty input

An empty or whitespace-only string is treated as well-formed: it is checked as an empty element, so it does not by itself produce an error.

Example​

{ "xml": "<worksheet name=\"Sheet1\"><table/></worksheet>" }

Example results​

Well-formed content​

{
"message": "Worksheet structure is well-formed."
}

Malformed content​

{
"isError": true,
"message": "Worksheet structure has 1 error(s):\n\n1. XML is not well-formed: unclosed tag: table\n\nFix these errors before calling apply-worksheet."
}
  • apply-worksheet — applies a worksheet back to the open Tableau Studio workbook; run this check first so malformed XML never reaches it.
  • get-xml — reads a worksheet's structure to produce the XML you edit and then validate here.