KosmoKrator

analytics

Tableau Lua API for KosmoKrator Agents

Agent-facing Lua documentation and function reference for the Tableau KosmoKrator integration.

Lua Namespace

Agents call this integration through app.integrations.tableau.*. Use lua_read_doc("integrations.tableau") inside KosmoKrator to discover the same reference at runtime.

Call Lua from the Headless CLI

Use kosmo integrations:lua when a shell script, CI job, cron job, or another coding CLI should run a deterministic Tableau workflow without starting an interactive agent session.

Inline Lua call
kosmo integrations:lua --eval 'dump(app.integrations.tableau.list_workbooks({page_size = 1, page_number = 1}))' --json
Read Lua docs headlessly
kosmo integrations:lua --eval 'print(docs.read("tableau"))' --json
kosmo integrations:lua --eval 'print(docs.read("tableau.list_workbooks"))' --json

Workflow file

Put repeatable logic in a Lua file, then execute it with JSON output for the calling process.

workflow.lua
local tableau = app.integrations.tableau
local result = tableau.list_workbooks({page_size = 1, page_number = 1})

dump(result)
Run the workflow
kosmo integrations:lua workflow.lua --json
kosmo integrations:lua workflow.lua --force --json
Namespace note. integrations:lua exposes app.integrations.tableau, app.mcp.*, docs.*, json.*, and regex.*. Use app.integrations.tableau.default.* or app.integrations.tableau.work.* when you configured named credential accounts.

MCP-only Lua

If the script only needs configured MCP servers and does not need Tableau, use the narrower mcp:lua command.

MCP Lua command
# Use mcp:lua for MCP-only scripts; use integrations:lua for this integration namespace.
kosmo mcp:lua --eval 'dump(mcp.servers())' --json

Agent-Facing Lua Docs

This is the rendered version of the full Lua documentation exposed to agents when they inspect the integration namespace.

Tableau — Lua API Reference

list_workbooks

List workbooks available on the Tableau site.

Parameters

NameTypeRequiredDescription
page_sizeintegernoNumber of workbooks per page (default: 100, max: 1000)
page_numberintegernoPage number for pagination (1-based, default: 1)

Example

local result = app.integrations.tableau.list_workbooks({
  page_size = 50,
  page_number = 1
})

for _, wb in ipairs(result.workbooks or {}) do
  print(wb.name .. " (id: " .. wb.id .. ")")
end

get_workbook

Get detailed information about a specific workbook.

Parameters

NameTypeRequiredDescription
workbook_idstringyesThe workbook LUID (unique identifier)

Example

local result = app.integrations.tableau.get_workbook({
  workbook_id = "abc-123-def"
})

print("Workbook: " .. result.workbook.name)
print("Project: " .. (result.workbook.project.name or "N/A"))

list_views

List views (dashboards and sheets) on the Tableau site.

Parameters

NameTypeRequiredDescription
page_sizeintegernoNumber of views per page (default: 100, max: 1000)
page_numberintegernoPage number for pagination (1-based, default: 1)

Example

local result = app.integrations.tableau.list_views({
  page_size = 100
})

for _, view in ipairs(result.views or {}) do
  print(view.name .. " in " .. (view.workbook.name or "unknown"))
end

get_view

Get detailed information about a specific view.

Parameters

NameTypeRequiredDescription
view_idstringyesThe view LUID (unique identifier)

Example

local result = app.integrations.tableau.get_view({
  view_id = "xyz-456-ghi"
})

print("View: " .. result.view.name)
print("Workbook: " .. (result.view.workbook.name or "N/A"))

list_projects

List projects on the Tableau site. Projects organize workbooks and data sources.

Parameters

NameTypeRequiredDescription
page_sizeintegernoNumber of projects per page (default: 100, max: 1000)
page_numberintegernoPage number for pagination (1-based, default: 1)

Example

local result = app.integrations.tableau.list_projects({})

for _, project in ipairs(result.projects or {}) do
  print(project.name .. " (id: " .. project.id .. ")")
end

get_current_user

Get information about the currently authenticated Tableau user.

Parameters

None.

Example

local result = app.integrations.tableau.get_current_user({})

print("User: " .. result.user.name)
print("Email: " .. (result.user.email or "N/A"))
print("Site role: " .. result.user.siteRole)

Multi-Account Usage

If you have multiple Tableau accounts configured, use account-specific namespaces:

-- Default account (always works)
app.integrations.tableau.list_workbooks({...})

-- Explicit default (portable across setups)
app.integrations.tableau.default.list_workbooks({...})

-- Named accounts
app.integrations.tableau.production.list_workbooks({...})
app.integrations.tableau.staging.list_workbooks({...})

All functions are identical across accounts — only the credentials differ.

Raw agent markdown
# Tableau — Lua API Reference

## list_workbooks

List workbooks available on the Tableau site.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `page_size` | integer | no | Number of workbooks per page (default: 100, max: 1000) |
| `page_number` | integer | no | Page number for pagination (1-based, default: 1) |

### Example

```lua
local result = app.integrations.tableau.list_workbooks({
  page_size = 50,
  page_number = 1
})

for _, wb in ipairs(result.workbooks or {}) do
  print(wb.name .. " (id: " .. wb.id .. ")")
end
```

---

## get_workbook

Get detailed information about a specific workbook.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `workbook_id` | string | yes | The workbook LUID (unique identifier) |

### Example

```lua
local result = app.integrations.tableau.get_workbook({
  workbook_id = "abc-123-def"
})

print("Workbook: " .. result.workbook.name)
print("Project: " .. (result.workbook.project.name or "N/A"))
```

---

## list_views

List views (dashboards and sheets) on the Tableau site.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `page_size` | integer | no | Number of views per page (default: 100, max: 1000) |
| `page_number` | integer | no | Page number for pagination (1-based, default: 1) |

### Example

```lua
local result = app.integrations.tableau.list_views({
  page_size = 100
})

for _, view in ipairs(result.views or {}) do
  print(view.name .. " in " .. (view.workbook.name or "unknown"))
end
```

---

## get_view

Get detailed information about a specific view.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `view_id` | string | yes | The view LUID (unique identifier) |

### Example

```lua
local result = app.integrations.tableau.get_view({
  view_id = "xyz-456-ghi"
})

print("View: " .. result.view.name)
print("Workbook: " .. (result.view.workbook.name or "N/A"))
```

---

## list_projects

List projects on the Tableau site. Projects organize workbooks and data sources.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `page_size` | integer | no | Number of projects per page (default: 100, max: 1000) |
| `page_number` | integer | no | Page number for pagination (1-based, default: 1) |

### Example

```lua
local result = app.integrations.tableau.list_projects({})

for _, project in ipairs(result.projects or {}) do
  print(project.name .. " (id: " .. project.id .. ")")
end
```

---

## get_current_user

Get information about the currently authenticated Tableau user.

### Parameters

None.

### Example

```lua
local result = app.integrations.tableau.get_current_user({})

print("User: " .. result.user.name)
print("Email: " .. (result.user.email or "N/A"))
print("Site role: " .. result.user.siteRole)
```

---

## Multi-Account Usage

If you have multiple Tableau accounts configured, use account-specific namespaces:

```lua
-- Default account (always works)
app.integrations.tableau.list_workbooks({...})

-- Explicit default (portable across setups)
app.integrations.tableau.default.list_workbooks({...})

-- Named accounts
app.integrations.tableau.production.list_workbooks({...})
app.integrations.tableau.staging.list_workbooks({...})
```

All functions are identical across accounts — only the credentials differ.
Metadata-derived Lua example
local result = app.integrations.tableau.list_workbooks({page_size = 1, page_number = 1})
print(result)

Functions

list_workbooks Read

List workbooks available on the Tableau site. Returns workbook names, IDs, project assignments, and owners. Use the workbook IDs with tableau_get_workbook for full details.

Lua path
app.integrations.tableau.list_workbooks
Full name
tableau.tableau_list_workbooks
ParameterTypeRequiredDescription
page_size integer no Number of workbooks per page (default: 100, max: 1000).
page_number integer no Page number for pagination (1-based, default: 1).
get_workbook Read

Get detailed information about a specific Tableau workbook, including its views, connections, and permissions. Requires the workbook LUID.

Lua path
app.integrations.tableau.get_workbook
Full name
tableau.tableau_get_workbook
ParameterTypeRequiredDescription
workbook_id string yes The workbook LUID (unique identifier). Obtain from tableau_list_workbooks.
list_views Read

List views (dashboards and sheets) available on the Tableau site. Returns view names, IDs, and associated workbooks. Use view IDs with tableau_get_view for full details.

Lua path
app.integrations.tableau.list_views
Full name
tableau.tableau_list_views
ParameterTypeRequiredDescription
page_size integer no Number of views per page (default: 100, max: 1000).
page_number integer no Page number for pagination (1-based, default: 1).
get_view Read

Get detailed information about a specific Tableau view (dashboard or sheet), including its workbook, owner, and usage stats. Requires the view LUID.

Lua path
app.integrations.tableau.get_view
Full name
tableau.tableau_get_view
ParameterTypeRequiredDescription
view_id string yes The view LUID (unique identifier). Obtain from tableau_list_views.
list_projects Read

List projects on the Tableau site. Projects organize workbooks and data sources. Returns project names, IDs, descriptions, and parent project info.

Lua path
app.integrations.tableau.list_projects
Full name
tableau.tableau_list_projects
ParameterTypeRequiredDescription
page_size integer no Number of projects per page (default: 100, max: 1000).
page_number integer no Page number for pagination (1-based, default: 1).
get_current_user Read

Get information about the currently authenticated Tableau user, including name, email, site role, and auth settings.

Lua path
app.integrations.tableau.get_current_user
Full name
tableau.tableau_get_current_user
ParameterTypeRequiredDescription
No parameters.