Skip to main content
Glama

twilize

재현 가능한 대시보드 및 통합 문서 엔지니어링을 위한 Tableau 통합 문서(.twb/.twbx) 생성 툴킷 안정적인 분석 기본 요소, 대시보드 구성 및 내장된 구조적 유효성 검사를 사용하여 프로그래밍 방식으로 Tableau 통합 문서를 생성합니다.

개요

twilize는 코드나 AI 기반 도구 호출을 통해 Tableau Desktop 통합 문서 파일(.twb / .twbx)을 생성하기 위한 Model Context Protocol(MCP) 서버이자 Python 툴킷입니다.

이 도구는 대화형 데이터 탐색 에이전트가 아닌 통합 문서 엔지니어링 계층으로 설계되었습니다. 목표는 로컬 워크플로우, 스크립트 및 CI에서 통합 문서 생성을 재현 가능하고, 검사 가능하며, 자동화하기에 안전하게 만드는 것입니다.

기본 워크플로우는 다음과 같습니다:

  1. 알려진 템플릿(.twb 또는 .twbx) 또는 내장된 제로 구성 템플릿에서 시작

  2. 계산된 필드 및 매개변수 추가

  3. 안정적인 차트 기본 요소로부터 워크시트 구축

  4. 대시보드 및 상호 작용 조립

  5. Tableau Desktop에서 열리는 .twb 또는 .twbx 저장 및 유효성 검사

                            Interfaces
  ┌───────────────────────────────────────────────────────────────┐
  │  ┌──────────────────────────┐  ┌───────────────────────────┐  │
  │  │        MCP Server        │  │      Python Library       │  │
  │  │  tools_workbook          │  │  from twilize.twb_editor    │  │
  │  │  tools_layout            │  │  import TWBEditor         │  │
  │  │  tools_migration         │  │                           │  │
  │  │  tools_support           │  │  editor.add_...()         │  │
  │  │                          │  │  editor.configure_...()   │  │
  │  │  (Claude / Cursor /      │  │  editor.save(...)         │  │
  │  │   VSCode / Claude Code)  │  │                           │  │
  │  └─────────────┬────────────┘  └──────────────┬────────────┘  │
  │                └──────────────┬────────────────┘               │
  └─────────────────────────────  ┼  ─────────────────────────────┘
                                  ▼
  ┌───────────────────────────────────────────────────────────────┐
  │                          TWBEditor                            │
  │       ParametersMixin  ·  ConnectionsMixin                    │
  │       ChartsMixin      ·  DashboardsMixin                     │
  └──────────┬──────────────────┬──────────────────┬─────────────┘
             ▼                  ▼                  ▼
  ┌──────────────────┐  ┌──────────────┐  ┌──────────────────────┐
  │  Chart Builders  │  │  Dashboard   │  │  Analysis &          │
  │                  │  │  System      │  │  Migration           │
  │  Basic  DualAxis │  │              │  │                      │
  │  Pie    Text     │  │  layouts     │  │  migration.py        │
  │  Map    Recipes  │  │  actions     │  │  twb_analyzer.py     │
  │                  │  │  dependencies│  │  capability_registry │
  └────────┬─────────┘  └──────┬───────┘  └──────────┬───────────┘
           └───────────────────┼──────────────────────┘
                               ▼
  ┌───────────────────────────────────────────────────────────────┐
  │                     XML Engine  (lxml)                        │
  │    template.twb/.twbx  →  patch  →  validate  →  save        │
  └───────────────────────────────┬───────────────────────────────┘
                                  ▼
                      output.twb  /  output.twbx

설치

pip install twilize

.hyper 파일을 검사하고 물리적 Orders_* 테이블을 자동으로 확인하는 번들된 Hyper 기반 예제를 실행하려면, 선택적 예제 종속성도 설치하십시오:

pip install "twilize[examples]"

요구 사항

빠른 시작

MCP 서버로 사용

MCP 클라이언트가 Tableau 통합 문서를 자동으로 빌드하도록 하려면 해당 클라이언트의 MCP 구성에 twilize를 추가하십시오.

시작 명령은 클라이언트 전반에서 동일합니다:

uvx twilize

각 클라이언트는 이 명령을 서로 다른 구성 형식으로 저장합니다. 아래의 일치하는 예제를 사용하십시오.

Claude Desktop

macOS의 경우 ~/Library/Application Support/Claude/claude_desktop_config.json을, Windows의 경우 %APPDATA%\Claude\claude_desktop_config.json을 열고 다음을 추가하십시오:

{
  "mcpServers": {
    "twilize": {
      "command": "uvx",
      "args": ["twilize"]
    }
  }
}

Cursor IDE

  1. Cursor 설정 -> 기능 -> MCP를 엽니다.

  2. 새 MCP 서버 추가를 클릭합니다.

  3. 유형을 command로 설정합니다.

  4. 이름을 twilize로 설정합니다.

  5. 명령을 uvx twilize로 설정합니다.

Claude Code

claude mcp add twilize -- uvx twilize

VSCode

작업 영역의 .vscode/mcp.json 파일 또는 사용자 프로필 mcp.json 파일을 열고 다음을 추가하십시오:

{
  "servers": {
    "twilize": {
      "command": "uvx",
      "args": ["twilize"]
    }
  }
}

VSCode에서는 명령 팔레트에서 MCP: Open Workspace Folder Configuration 또는 MCP: Open User Configuration을 통해 이 파일들을 열 수 있습니다. 또한 MCP: Add Server를 사용하고 안내 흐름을 통해 동일한 uvx twilize 명령을 입력할 수도 있습니다.

Python 라이브러리로 사용

템플릿에서 시작하여 통합 문서 콘텐츠를 다시 빌드하려면 TWBEditor(...)를 사용하십시오. 기존 워크시트와 대시보드를 유지하면서 시트를 제자리에서 재구성하려면 TWBEditor.open_existing(...)을 사용하십시오.

from twilize.twb_editor import TWBEditor

editor = TWBEditor("")  # "" uses the built-in Superstore template
editor.clear_worksheets()
editor.add_calculated_field("Profit Ratio", "SUM([Profit])/SUM([Sales])")

editor.add_worksheet("Sales by Category")
editor.configure_chart(
    worksheet_name="Sales by Category",
    mark_type="Bar",
    rows=["Category"],
    columns=["SUM(Sales)"],
)

editor.add_worksheet("Segment Pie")
editor.configure_chart(
    worksheet_name="Segment Pie",
    mark_type="Pie",
    color="Segment",
    wedge_size="SUM(Sales)",
)

editor.add_dashboard(
    dashboard_name="Overview",
    worksheet_names=["Sales by Category", "Segment Pie"],
    layout="horizontal",
)

editor.save("output/my_workbook.twb")

패키지 통합 문서(.twbx) 작업

.twbx 파일은 통합 문서 XML을 데이터 추출(.hyper) 및 이미지 자산과 함께 번들로 묶은 ZIP 아카이브입니다. twilize는 이를 투명하게 읽고 씁니다:

from twilize.twb_editor import TWBEditor

# Open a packaged workbook — extracts and images are preserved automatically
editor = TWBEditor.open_existing("templates/dashboard/MyDashboard.twbx")

# Make changes as usual
editor.add_calculated_field("Profit Ratio", "SUM([Profit])/SUM([Sales])")

# Save as .twbx — re-bundles the updated .twb with the original extracts/images
editor.save("output/MyDashboard_v2.twbx")

# Or extract just the XML when the packaged format isn't needed
editor.save("output/MyDashboard_v2.twb")

일반 .twb도 패키지화할 수 있습니다:

editor = TWBEditor("templates/twb/superstore.twb")
# ...
editor.save("output/superstore.twbx")  # produces a single-entry ZIP with the .twb inside

MCP 도구

도구

설명

create_workbook

.twb 또는 .twbx 템플릿을 로드하고 템플릿 기반 재빌드 작업 영역을 초기화합니다

open_workbook

기존 .twb 또는 .twbx를 열고 편집을 위해 워크시트와 대시보드를 유지합니다

list_fields

사용 가능한 모든 차원과 측정값을 나열합니다

list_worksheets

활성 통합 문서의 워크시트 이름을 나열합니다

list_dashboards

대시보드와 참조하는 워크시트 영역을 나열합니다

add_parameter

What-if 분석을 위한 대화형 매개변수를 추가합니다

add_calculated_field

Tableau 수식으로 계산된 필드를 추가합니다

remove_calculated_field

이전에 추가된 계산된 필드를 제거합니다

add_worksheet

새 빈 워크시트를 추가합니다

configure_chart

차트 유형 및 필드 매핑을 구성합니다

configure_worksheet_style

워크시트 수준 스타일 지정(배경색, 축/격자/테두리 표시 여부)을 적용합니다

configure_dual_axis

이중 축 차트 구성을 설정합니다

configure_chart_recipe

lollipop, donut, butterfly 또는 calendar와 같은 쇼케이스 레시피 차트를 구성합니다

add_dashboard

워크시트를 결합한 대시보드를 생성합니다

add_dashboard_action

대시보드에 필터 또는 강조 동작을 추가합니다

generate_layout_json

대화형 구조화된 대시보드 flexbox 레이아웃을 빌드합니다

list_capabilities

twilize의 선언된 지원 범위를 표시합니다

describe_capability

차트나 기능이 핵심, 고급, 레시피 또는 지원되지 않는지 설명합니다

analyze_twb

기능 카탈로그에 대해 .twb 파일을 분석합니다. 출력에는 전체 기능 분석과 기능 격차 분류 요약이 포함됩니다

diff_template_gap

템플릿의 비핵심 격차를 요약합니다

validate_workbook

공식 Tableau TWB XSD 스키마(2026.1)에 대해 통합 문서의 유효성을 검사합니다

migrate_twb_guided

내장된 TWB 마이그레이션 워크플로우를 실행하고 필요할 때 경고 확인을 위해 일시 중지합니다

set_mysql_connection

로컬 MySQL 연결을 사용하도록 데이터 소스를 구성합니다

set_tableauserver_connection

온라인 Tableau Server에 대한 연결을 구성합니다

set_hyper_connection

로컬 Hyper 추출 연결을 사용하도록 데이터 소스를 구성합니다

save_workbook

통합 문서를 .twb(일반 XML) 또는 .twbx(번들된 추출 및 이미지가 포함된 ZIP)로 저장합니다

기능 모델

핵심 기본 요소

이 프로젝트가 계속해서 보장해야 할 안정적인 빌딩 블록입니다:

  • 막대

  • 선

  • 영역

  • 파이

  • 지도

  • 텍스트 / KPI 카드

  • 매개변수 및 계산된 필드

  • 기본 대시보드 구성

고급 패턴

이 기능들은 지원되지만, 기본 표면 영역이라기보다는 더 높은 수준의 구성이나 상호 작용 기능입니다:

  • 산점도

  • 히트맵

  • 트리 맵

  • 버블 차트

  • 이중 축 — mark_color_1/2, color_map_1, reverse_axis_1, hide_zeroline, synchronized

  • 테이블 계산 — add_calculated_field(table_calc="Rows")를 통한 RANK_DENSE, RUNNING_SUM, WINDOW_SUM

  • KPI 차이 배지 — MIN(1) 더미 축 + axis_fixed_range + color_map + customized_label

  • 도넛(extra_axes를 통해) — configure_dual_axis(extra_axes=[...])를 사용하는 다중 창 파이 + 흰색 원; :Measure Names 팔레트에 대한 color_map 지원

  • 서식 있는 텍스트 레이블 — 인라인 필드 값이 있는 다중 스타일 KPI 카드 및 동적 제목을 위한 configure_chart(label_runs=[...])

  • 고급 워크시트 스타일 지정 — configure_worksheet_style은 창 수준 셀/데이터 레이블/마크 스타일, 필드별 레이블/셀/헤더 형식, 축 눈금 제어, 도구 설명 비활성화 및 모든 Tableau 시각적 노이즈 억제를 지원합니다

  • 행 차원 헤더 억제 — configure_worksheet_style(hide_row_label="FieldName")

  • 필터 영역, 매개변수 컨트롤, 색상 범례

  • 대시보드 필터 및 강조 동작

  • 선언적 JSON 레이아웃 워크플로우

  • 레이아웃 딕셔너리에서 show_title: false를 통한 대시보드 영역 제목 제어

레시피 및 쇼케이스 패턴

이들은 오늘날 생성될 수 있지만, 일급 약속이라기보다는 레시피나 예제로 취급되어야 합니다:

  • 도넛

  • 롤리팝

  • 불릿

  • 범프

  • 버터플라이

  • 달력

레시피 차트는 모든 쇼케이스 패턴에 대해 도구를 하나씩 늘리지 않도록 단일 configure_chart_recipe 도구를 통해 의도적으로 노출됩니다.

twilize는 차트 동물원이 되거나 Tableau 자체의 대화형 분석 도구와 경쟁하려는 것이 아니기 때문에 이러한 구분이 중요합니다. 이 프로젝트는 신뢰할 수 있고 자동화 가능한 통합 문서 생성 계층을 제공할 때 가장 강력합니다.

기능 우선 워크플로우

어떤 기능이 안정적인 SDK 표면에 속하는지 확실하지 않은 경우:

  1. list_capabilities를 사용하여 선언된 경계를 검사하십시오.

  2. describe_capability를 사용하여 특정 차트, 인코딩 또는 기능을 확인하십시오.

  3. 쇼케이스 템플릿을 찾기 전에 analyze_twb 또는 diff_template_gap을 사용하십시오.

이렇게 하면 새로운 기능 작업이 샘플 통합 문서에 나타나는 것이 아니라 프로젝트의 실제 제품 경계에 맞춰 유지됩니다.

내장된 유효성 검사

구조적 유효성 검사

save()는 쓰기 전에 TWB XML 구조를 자동으로 검사합니다:

  • <workbook> 또는 <datasources> 누락과 같은 치명적인 오류는 TWBValidationError를 발생시킵니다.

  • <view> 또는 <panes> 누락과 같은 경고는 기록되지만 저장을 차단하지는 않습니다.

  • 유효성 검사는 editor.save("output.twb", validate=False) 또는 editor.save("output.twbx", validate=False)로 비활성화할 수 있습니다.

XSD 스키마 유효성 검사

TWBEditor.validate_schema()는 vendor/tableau-document-schemas/에 공급된 공식 Tableau TWB XSD 스키마(2026.1)에 대해 통합 문서를 확인합니다:

result = editor.validate_schema()
print(result.to_text())
# PASS  Workbook is valid against Tableau TWB XSD schema (2026.1)
# — or —
# FAIL  Schema validation failed (2 error(s)):
#   * Element 'workbook': Missing child element(s)...

result.valid          # bool
result.errors         # list[str] — lxml error messages
result.schema_available  # False if the vendor submodule is not checked out

동일한 검사를 MCP 도구로 사용할 수 있습니다:

validate_workbook()                       # validate current open workbook in memory
validate_workbook(file_path="out.twb")    # validate a file on disk (.twb or .twbx)

XSD 오류는 정보 제공용입니다(Tableau 자체도 가끔 스키마에서 벗어난 통합 문서를 생성함). 하지만 반복되는 오류는 수정할 가치가 있는 구조적 문제를 나타냅니다.

대시보드 레이아웃

레이아웃

설명

vertical

워크시트를 위에서 아래로 쌓습니다

horizontal

워크시트를 나란히 배치합니다

grid-2x2

최대 4개의 워크시트에 대한 2x2 격자 레이아웃

dict 또는 .json 경로

더 복잡한 대시보드를 위한 선언적 사용자 지정 레이아웃

사용자 지정 레이아웃은 중첩된 layout 딕셔너리를 사용하거나 MCP 워크플로우의 경우 generate_layout_json을 통해 프로그래밍 방식으로 빌드할 수 있습니다.

Hyper 기반 예제

examples/hyper_and_new_charts.py 예제는 패키지(src/twilize/references/)에 직접 번들된 Sample - EU Superstore.hyper 추출을 사용하며, 통합 문서 연결을 전환하기 전에 Tableau Hyper API를 통해 물리적 Orders_* 테이블을 확인합니다. 저장소 복제가 필요하지 않습니다. pip install "twilize[examples]"로 설치하고 직접 실행하십시오.

통합 문서 마이그레이션

twilize에는 기존 .twb를 새 데이터 소스로 전환하기 위한 마이그레이션 하위 시스템이 포함되어 있습니다. 예를 들어, 하나의 Excel 파일을 기반으로 빌드된 통합 문서를 다른 스키마를 가진 다른 Excel로 다시 지정하거나 동일한 데이터 세트의 언어 변형 간에 마이그레이션하는 경우입니다.

작동 방식

마이그레이션은 다단계 워크플로우입니다. 각 단계는 MCP 도구와 Python 함수로 모두 사용할 수 있습니다:

1. inspect_target_schema   →  Scan the target Excel and list its columns
2. profile_twb_for_migration  →  Inventory which fields the workbook uses
3. propose_field_mapping   →  Match source fields to target columns (fuzzy)
4. preview_twb_migration   →  Dry-run: show what would change, blockers/warnings
5. apply_twb_migration     →  Write the migrated .twb + JSON reports

migrate_twb_guided는 2~5단계를 순차적으로 실행하고 신뢰도가 낮은 필드 일치만 남았을 때 자동으로 일시 중지하여 진행하기 전에 사람이 검토할 수 있도록 warning_review_bundle을 반환하는 편의 래퍼입니다.

Python 예제

from twilize.migration import migrate_twb_guided_json
import json

# One-call guided migration
result = migrate_twb_guided_json(
    file_path="templates/SalesDashboard.twb",
    target_source="data/new_data_source.xlsx",
    output_path="output/SalesDashboard_migrated.twb",
)
bundle = json.loads(result)

if bundle["status"] == "warning_review_required":
    # Inspect low-confidence matches and confirm or override them
    print(bundle["warning_review_bundle"])
    # Re-run with confirmed mappings
    result = migrate_twb_guided_json(
        file_path="templates/SalesDashboard.twb",
        target_source="data/new_data_source.xlsx",
        output_path="output/SalesDashboard_migrated.twb",
        mapping_overrides={"Old Field Name": "New Column Name"},
    )

MCP 도구 예제

twilize를 MCP 서버로 사용할 때 AI 에이전트가 전체 워크플로우를 실행할 수 있습니다:

inspect_target_schema(target_source="data/new_data_source.xlsx")
→ returns column list and data types

migrate_twb_guided(
    file_path="templates/SalesDashboard.twb",
    target_source="data/new_data_source.xlsx",
    output_path="output/SalesDashboard_migrated.twb"
)
→ returns status: "applied" or "warning_review_required"

출력 파일

완료된 마이그레이션은 세 개의 파일을 작성합니다:

파일

내용

<output>.twb

다시 작성된 필드 참조가 포함된 마이그레이션된 통합 문서

migration_report.json

필드별 상태: 매핑됨 / 경고 / 차단됨

field_mapping.json

감사를 위한 최종 소스→대상 필드 매핑

범위 매개변수

scope="workbook"은 모든 워크시트를 마이그레이션합니다. 단일 시트로 마이그레이션을 제한하려면 워크시트 이름을 전달하십시오.

독립형 예제

examples/migrate_workflow/에는 템플릿 .twb, 원본 Superstore Excel, 대상 중국어 로캘 Superstore Excel 및 실행 가능한 스크립트가 포함되어 있습니다:

python examples/migrate_workflow/test_migration_workflow.py

프로젝트 구조

twilize/
|-- src/twilize/
|   |-- __init__.py
|   |-- capability_registry.py
|   |-- config.py
|   |-- charts/
|   |-- connections.py
|   |-- dashboard_actions.py
|   |-- dashboard_dependencies.py
|   |-- dashboard_layouts.py
|   |-- dashboards.py
|   |-- field_registry.py
|   |-- layout.py
|   |-- layout_model.py
|   |-- layout_rendering.py
|   |-- mcp/
|   |-- parameters.py
|   |-- twb_analyzer.py
|   |-- twb_editor.py
|   |-- validator.py
|   `-- server.py
|-- tests/
|-- examples/
|-- docs/
|-- pyproject.toml
`-- README.md

개발

# Install in editable mode
pip install -e .

# Run test suite
pytest --basetemp=output/pytest_tmp

# Run the mixed showcase example
python examples/scripts/demo_all_supported_charts.py

# Run the advanced Hyper-backed example
python examples/scripts/demo_hyper_and_new_charts.py

# Run the guided migration example
python examples/migrate_workflow/test_migration_workflow.py

# Start MCP server
twilize

MCP 서버 매니페스트

twilize는 Tableau Extension .trex 파일의 MCP 버전인 전체 MCP 서버 매니페스트(mcp-server.json)와 함께 제공됩니다. 여기에는 다음이 선언되어 있습니다:

.trex 대응 항목

MCP 필드

설명

확장 ID

id

com.twilize.mcp-server

버전

version

현재 패키지 버전

이름 / 설명

name, description

서버 ID

작성자

author

이름, 이메일, 조직, URL

권한

permissions

Available Tools

55 tools
add_calculated_fieldC

Add a calculated field to the datasource.

Inputs: field_name (required), formula (required), datatype, role, +2 more. Returns: result

add_dashboardB

Create a dashboard combining multiple worksheets.

Inputs: dashboard_name (required), worksheet_names (required), width, height, +1 more. Returns: result

add_dashboard_actionC

Add an interaction action to a dashboard.

Inputs: dashboard_name (required), action_type (required), source_sheet (required), target_sheet (required), +3 more. Returns: result

add_parameterC

Add a parameter to the workbook.

Inputs: name (required), datatype, default_value, domain_type, +5 more. Returns: result

add_reference_bandC

Add a reference band (shaded region) to a worksheet.

Inputs: worksheet_name (required), axis_field (required), from_value, to_value, +4 more. Returns: result

add_reference_lineC

Add a reference line to a worksheet (constant, average, median, etc.).

Inputs: worksheet_name (required), axis_field (required), value, formula, +4 more. Returns: result

add_trend_lineB

Add a trend line to a worksheet (linear, polynomial, log, exp, power).

Inputs: worksheet_name (required), fit, degree, show_confidence_bands, +1 more. Returns: result

add_worksheetC

Add a new blank worksheet to the workbook.

Inputs: worksheet_name (required). Returns: result

analyze_twbC

Analyze a TWB file against twilize's declared capabilities.

Inputs: file_path (required). Returns: result

apply_color_paletteC

Set a custom color palette. Built-in: tableau10, tableau20, blue-red, green-gold.

Inputs: palette_name, colors, custom_name. Returns: result

apply_dashboard_themeC

Apply uniform styling (background, font) to all zones in a dashboard.

Inputs: dashboard_name (required), background_color, font_family, title_font_size. Returns: result

apply_twb_migrationC

Apply a workbook migration and write a migrated TWB plus reports.

Inputs: file_path (required), target_source (required), output_path (required), scope, +1 more. Returns: result

configure_chartC

Configure chart type and field mappings for a worksheet.

Inputs: worksheet_name (required), mark_type, columns, rows, +19 more. Returns: result

configure_chart_recipeB

Configure a showcase recipe chart through the shared recipe registry.

Inputs: worksheet_name (required), recipe_name (required), recipe_args, auto_ensure_prerequisites. Returns: result

configure_dual_axisD

Configure a dual-axis chart composition.

Inputs: worksheet_name (required), mark_type_1, mark_type_2, columns, +25 more. Returns: result

configure_worksheet_styleB

Apply worksheet-level styling: background color, axis/grid/border visibility.

Inputs: worksheet_name (required), background_color, hide_axes, hide_gridlines, +17 more. Returns: result

create_workbookC

Create a new workbook from a TWB or TWBX template file.

Inputs: template_path, workbook_name. Returns: result

csv_to_dashboardA

Build a complete Tableau dashboard from a CSV file (end-to-end).

Pipeline: CSV → schema inference → chart suggestion → Hyper extract → workbook creation → chart configuration → dashboard layout → .twbx output.

Args: csv_path: Path to the source CSV file. output_path: Output .twbx path (defaults to <csv_stem>_dashboard.twbx). dashboard_title: Dashboard title (derived from filename if empty). max_charts: Maximum number of charts (0 = use dashboard_rules.yaml default). template_path: TWB template path (empty for default template). theme: Theme preset name (empty = use dashboard_rules.yaml default). Options: modern-light, modern-dark, classic, minimal, vibrant. rules_yaml: Optional YAML string with dashboard rules overrides. Example: "kpi:\n font_size: 32\n max_kpis: 3"

Returns: Summary of the created dashboard with file path.

Inputs: csv_path (required), output_path, dashboard_title, max_charts, +3 more. Returns: result

csv_to_hyperA

Convert a CSV file to a Tableau Hyper extract.

Infers column types and creates a .hyper file that can be used as a data source in Tableau workbooks.

Requires tableauhyperapi (pip install tableauhyperapi).

Args: csv_path: Path to the source CSV file. hyper_path: Output path for the .hyper file. table_name: Table name inside the Hyper file. sample_rows: Rows to sample for type inference.

Returns: Confirmation with row and column counts.

Inputs: csv_path (required), hyper_path (required), table_name, sample_rows. Returns: result

describe_capabilityB

Describe one declared capability and its support tier.

Inputs: kind (required), name (required). Returns: result

diff_template_gapC

Summarize the non-core capability gap of a TWB template.

Inputs: file_path (required). Returns: result

export_rulesA

Export the current active rules to a YAML file.

Saves the complete rules (including any runtime changes from set_rule()) to a YAML file that can be placed next to data files or in the working directory for future sessions.

Args: output_path: Path to save the YAML file. Defaults to ./dashboard_rules.yaml in the current working directory.

Returns: Path to the saved file and summary.

Inputs: output_path. Returns: result

generate_layout_jsonC

Generate and save a dashboard layout JSON file.

Inputs: output_path (required), layout_tree (required), ascii_preview (required). Returns: result

get_active_rulesA

Return the active dashboard creation rules.

Call this at the start of a session to understand what constraints are enforced. The rules engine validates every configure_chart and add_dashboard call — violations are returned as errors or warnings.

Returns: Human-readable summary of all active rules.

Inputs: no named parameters. Returns: result

hyper_to_dashboardA

Build a complete Tableau dashboard from a Hyper extract file (end-to-end).

Pipeline: Hyper → schema inference → chart suggestion → workbook creation → chart configuration → dashboard layout → .twbx output.

Args: hyper_path: Path to the .hyper file. output_path: Output .twbx path (defaults to <hyper_stem>_dashboard.twbx). dashboard_title: Dashboard title (derived from filename if empty). max_charts: Maximum number of charts (0 = use rules default). template_path: TWB template path (empty for default template). table_name: Table name inside the Hyper file (empty = first table). theme: Theme preset name (empty = use rules default). rules_yaml: Optional YAML string with dashboard rules overrides.

Returns: Summary of the created dashboard with file path.

Inputs: hyper_path (required), output_path, dashboard_title, max_charts, +4 more. Returns: result

inspect_csvA

Inspect a CSV file and return its inferred schema with column classification.

Reads the CSV, infers column types (integer, float, date, boolean, string), classifies columns as dimensions or measures with semantic types (categorical, temporal, geographic, numeric), and returns a summary.

Args: csv_path: Path to the CSV file. sample_rows: Number of rows to sample for type inference. encoding: File encoding (default utf-8).

Returns: Human-readable schema summary with dimensions, measures, and types.

Inputs: csv_path (required), sample_rows, encoding. Returns: result

inspect_hyperA

Inspect a Hyper extract file and return its schema with column classification.

Reads the Hyper file, maps column types, classifies columns as dimensions or measures, and returns a summary.

Requires tableauhyperapi (pip install tableauhyperapi).

Args: hyper_path: Path to the .hyper file. table_name: Specific table to inspect (empty = first table).

Returns: Human-readable schema summary with dimensions, measures, and types.

Inputs: hyper_path (required), table_name. Returns: result

inspect_target_schemaB

Inspect the first-sheet schema of a target Excel datasource.

Inputs: target_source (required). Returns: result

list_capabilitiesB

List twilize's declared capability boundary.

Inputs: no named parameters. Returns: result

list_dashboardsA

List dashboards and their worksheet zones in the current workbook.

Inputs: no named parameters. Returns: result

list_fieldsA

List all available fields in the current workbook datasource.

Inputs: no named parameters. Returns: result

list_worksheetsA

List worksheet names in the current workbook.

Inputs: no named parameters. Returns: result

migrate_twb_guidedC

Run the built-in migration workflow and pause for warning confirmation when needed.

Inputs: file_path (required), target_source (required), output_path, scope, +2 more. Returns: result

mssql_to_dashboardA

Build a Tableau dashboard from a Microsoft SQL Server table (end-to-end).

Pipeline: MSSQL → schema inference → chart suggestion → workbook creation → live MSSQL connection → .twb output.

Requires pyodbc for schema inference and ODBC Driver 17 for SQL Server.

Args: server_host: MSSQL server hostname. dbname: Database name. table_name: Table to visualize. username: Database username (ignored if trusted_connection=True). password: Database password (used for schema inference only). port: Server port (default 1433). trusted_connection: Use Windows Authentication instead of SQL auth. output_path: Output .twb path (defaults to _dashboard.twb). dashboard_title: Dashboard title. max_charts: Maximum charts (0 = use rules default). template_path: TWB template path. theme: Theme preset name. rules_yaml: Optional YAML string with dashboard rules overrides.

Returns: Summary of the created dashboard with file path.

Inputs: server_host (required), dbname (required), table_name (required), username, +9 more. Returns: result

mysql_to_dashboardA

Build a Tableau dashboard from a MySQL table (end-to-end).

Pipeline: MySQL → schema inference → chart suggestion → workbook creation → live MySQL connection → .twb output.

Requires mysql-connector-python for schema inference.

Args: server_host: MySQL server hostname. dbname: Database name. table_name: Table to visualize. username: Database username. password: Database password (used for schema inference only; not stored in the workbook). port: Server port (default 3306). output_path: Output .twb path (defaults to _dashboard.twb). dashboard_title: Dashboard title. max_charts: Maximum charts (0 = use rules default). template_path: TWB template path. theme: Theme preset name. rules_yaml: Optional YAML string with dashboard rules overrides.

Returns: Summary of the created dashboard with file path.

Inputs: server_host (required), dbname (required), table_name (required), username (required), +8 more. Returns: result

open_workbookA

Open an existing workbook (.twb or .twbx) for in-place worksheet editing.

Inputs: file_path (required). Returns: result

preview_twb_migrationC

Preview a workbook migration onto a target datasource.

Inputs: file_path (required), target_source (required), scope, mapping_overrides. Returns: result

profile_csvA

Profile a CSV file before connecting it.

Unlike profile_data_source (which needs an active workbook), this tool profiles a raw CSV file directly.

Args: csv_path: Path to the CSV file. sample_rows: Number of rows to sample for type inference.

Returns: Human-readable DataProfile.

Inputs: csv_path (required), sample_rows. Returns: result

profile_data_sourceA

Profile the currently connected data source.

Works for ANY connection type: CSV extract, Hyper, MySQL, Tableau Server, Excel — anything that has fields in the workbook. The profile includes dimension/measure classification, semantic types, domain hints, and boolean signals that guide chart and template selection.

Args: source_type: Override source detection. Usually "auto" which inspects the workbook fields. Other options: "csv", "hyper" (requires separate file path tools).

Returns: Human-readable DataProfile with signals for template/chart decisions.

Inputs: source_type. Returns: result

profile_twb_for_migrationB

Profile workbook datasources and worksheet scope before migration.

Inputs: file_path (required), scope, target_source. Returns: result

propose_field_mappingC

Scan source and target schema and propose a field mapping.

Inputs: file_path (required), target_source (required), scope, mapping_overrides. Returns: result

recommend_templateA

Score all gallery templates and recommend the best fit.

Call this AFTER profiling the data source and deciding on chart types, but BEFORE creating the dashboard layout. The decider evaluates every template in the gallery against the data profile and chart mix, returning a ranked list with reasoning.

Args: chart_types: Comma-separated list of chart mark_types being built. Example: "Bar,Line,Text,Text,Map" If omitted, uses only the data profile signals. kpi_count: Override KPI count (else derived from chart_types).

Returns: Ranked template recommendations with scores and reasoning.

Inputs: chart_types, kpi_count. Returns: result

recommend_template_for_csvB

Recommend templates for a CSV file (no active workbook needed).

Args: csv_path: Path to the CSV file. chart_types: Comma-separated chart types (optional). sample_rows: Rows to sample for inference.

Returns: Ranked template recommendations.

Inputs: csv_path (required), chart_types, sample_rows. Returns: result

remove_calculated_fieldA

Remove a previously added calculated field.

Inputs: field_name (required). Returns: result

reset_rulesA

Reset all rules to the built-in defaults.

Discards any runtime changes made via set_rule() and reloads the default rules from the package YAML file.

Returns: Confirmation message.

Inputs: no named parameters. Returns: result

save_workbookA

Save the workbook as a TWB file. Use a .twbx extension to produce a packaged workbook (ZIP) that bundles the XML with any data extracts and images carried over from the source .twbx.

Inputs: output_path (required). Returns: result

set_hyper_connectionC

Configure the workbook datasource to use a local Hyper extract connection.

Inputs: filepath (required), table_name, tables. Returns: result

set_mssql_connectionC

Configure the workbook datasource to use a Microsoft SQL Server connection.

Inputs: server_host (required), dbname (required), username (required), table_name (required), +1 more. Returns: result

set_mysql_connectionC

Configure the workbook datasource to use a local MySQL connection.

Inputs: server (required), dbname (required), username (required), table_name (required), +1 more. Returns: result

set_ruleA

Set a specific rule value in the active dashboard rules.

This allows admins to modify rules at runtime without editing YAML files. Changes persist for the current session and can be exported with export_rules().

Args: section: Rule section name. Options: "kpi" — KPI formatting (font_size, font_color, bold, row_height, max_kpis, default_format) "charts" — Chart defaults (max_charts, theme, bar_top_n, pie_max_slices) "layout" — Layout settings (width, height, background_color, card_background) "bar_chart_rules" — Bar chart enforcement "theme_rules" — Theme enforcement "map_rules" — Map chart enforcement key: The specific setting to change. Examples: "font_size", "max_charts", "theme", "background_color", "default_format" value: New value (string — will be auto-parsed to int/float/bool as needed). Examples: "28", "modern-dark", "#2D2D2D", "true", "$#,##0.00"

Returns: Confirmation of the change or error message.

Inputs: section (required), key (required), value (required). Returns: result

set_tableauserver_connectionB

Configure the workbook datasource to use a Tableau Server connection.

Inputs: server (required), dbname (required), username (required), table_name (required), +2 more. Returns: result

suggest_charts_for_csvA

Suggest chart types and configurations for a CSV file.

Analyzes the data shape (dimensions, measures, temporal fields, etc.) and returns prioritized chart suggestions with shelf assignments.

Args: csv_path: Path to the CSV file. max_charts: Maximum number of charts to suggest (0 = use dashboard_rules.yaml default). sample_rows: Rows to sample for inference. rules_yaml: Optional YAML string with dashboard rules overrides (e.g. KPI formatting, chart limits).

Returns: Formatted suggestion list with chart types, shelf assignments, and reasoning.

Inputs: csv_path (required), max_charts, sample_rows, rules_yaml. Returns: result

undo_last_changeA

Undo the last mutating operation, restoring the previous workbook state.

Inputs: no named parameters. Returns: result

validate_workbookA

Run an informational XSD schema check on a workbook (2026.1 schema).

This is a non-blocking, advisory check only. Tableau Desktop is the true validator — it routinely produces workbooks that deviate from the published XSD schema, so deviations reported here do NOT indicate the workbook is broken. The workbook will almost certainly open correctly in Tableau regardless of any deviations found.

Args: file_path: Path to a .twb or .twbx file to check. If omitted, checks the currently open workbook (in memory).

Returns: Informational summary of schema deviations (if any).

Inputs: file_path. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.7/5.0

    Scored across 55 tools

    Disambiguation2/5

    Many tools overlap in purpose: configure_chart vs configure_chart_recipe, profile_data_source vs profile_csv vs inspect_csv vs inspect_hyper, recommend_template vs recommend_template_for_csv, and multiple *_to_dashboard tools that differ only by data source. The descriptions help somewhat, but the boundaries between profiling/inspection and chart configuration tools are unclear.

    Naming Consistency3/5

    Most tools follow a verb_noun pattern (e.g., add_worksheet, save_workbook, list_fields), but there are inconsistencies: some use 'inspect_' vs 'profile_' for similar operations, 'generate_layout_json' vs 'create_workbook', and 'migrate_twb_guided' vs 'apply_twb_migration' use different verb styles. The pattern is readable but not uniform.

    Tool Count2/5

    55 tools is excessive for a single MCP server, even one covering Tableau workbook creation, migration, and dashboard generation. Many tools are variants of the same operation (e.g., five *_to_dashboard tools, three profile tools, two recommend_template tools), suggesting the surface could be consolidated to 20-30 tools.

    Completeness4/5

    The tool set covers the full pipeline from data source inspection (CSV, Hyper, MySQL, MSSQL) through workbook creation, chart configuration, dashboard layout, and export. Minor gaps exist (e.g., no explicit tool for editing existing dashboards beyond adding actions, no delete/remove worksheet tool), but the core lifecycle is well covered.

    Related MCP Connectors