productivity
Trello Lua API for KosmoKrator Agents
Agent-facing Lua documentation and function reference for the Trello KosmoKrator integration.Lua Namespace
Agents call this integration through app.integrations.trello.*.
Use lua_read_doc("integrations.trello") 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
Trello workflow without starting an interactive agent session.
kosmo integrations:lua --eval 'dump(app.integrations.trello.list_boards({filter = "example_filter", fields = "example_fields", limit = 1}))' --json kosmo integrations:lua --eval 'print(docs.read("trello"))' --json
kosmo integrations:lua --eval 'print(docs.read("trello.list_boards"))' --json Workflow file
Put repeatable logic in a Lua file, then execute it with JSON output for the calling process.
local trello = app.integrations.trello
local result = trello.list_boards({filter = "example_filter", fields = "example_fields", limit = 1})
dump(result) kosmo integrations:lua workflow.lua --json
kosmo integrations:lua workflow.lua --force --json integrations:lua exposes app.integrations.trello, app.mcp.*, docs.*, json.*, and regex.*. Use app.integrations.trello.default.* or app.integrations.trello.work.* when you configured named credential accounts.
MCP-only Lua
If the script only needs configured MCP servers and does not need Trello, use the narrower 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.
Trello — Lua API Reference
list_boards
List all boards for the authenticated Trello member. Supports filtering by status and field selection.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
filter | string | no | Filter: "all", "closed", "members", "open", "organization", "public" (default: "all") |
fields | string | no | Comma-separated board fields to return (default: "all") |
limit | integer | no | Max number of boards to return (1–1000) |
Examples
-- List all open boards
local result = app.integrations.trello.list_boards({
filter = "open"
})
for _, board in ipairs(result) do
print(board.name .. " (id: " .. board.id .. ")")
end
-- List boards with specific fields
local result = app.integrations.trello.list_boards({
filter = "open",
fields = "name,url,dateLastActivity",
limit = 50
})
get_board
Get detailed information about a Trello board by ID.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | The board ID |
Examples
local result = app.integrations.trello.get_board({
id = "5abbe4b7ddc1b351ef961414"
})
print(result.name)
print("URL: " .. result.url)
print("Lists: " .. #result.lists)
list_lists
List all lists on a Trello board.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
board_id | string | yes | The board ID to list lists from |
Examples
local result = app.integrations.trello.list_lists({
board_id = "5abbe4b7ddc1b351ef961414"
})
for _, list in ipairs(result) do
print(list.name .. " (id: " .. list.id .. ")")
end
get_list
Get detailed information about a Trello list by ID.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | The list ID |
Examples
local result = app.integrations.trello.get_list({
id = "5abbe4b7ddc1b351ef961414"
})
print(result.name)
print("Board: " .. result.idBoard)
list_cards
List all cards in a Trello list. Supports limit and before cursor for pagination.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
list_id | string | yes | The list ID |
limit | integer | no | Max number of cards to return (1–1000) |
before | string | no | Card ID to fetch cards before (for pagination) |
Examples
-- List cards in a list
local result = app.integrations.trello.list_cards({
list_id = "5abbe4b7ddc1b351ef961414"
})
for _, card in ipairs(result) do
print(card.name .. " — " .. (card.desc or ""))
end
-- Paginated listing
local result = app.integrations.trello.list_cards({
list_id = "5abbe4b7ddc1b351ef961414",
limit = 10
})
create_card
Create a new card on a Trello list.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
name | string | yes | Name for the card |
id_list | string | yes | ID of the list to add the card to |
desc | string | no | Description (supports Markdown) |
id_labels | array | no | Array of label IDs to add |
id_members | array | no | Array of member IDs to assign |
due | string | no | Due date in ISO 8601 format |
pos | string | no | Position: "top", "bottom", or a positive number |
Examples
-- Create a simple card
local card = app.integrations.trello.create_card({
id_list = "5abbe4b7ddc1b351ef961414",
name = "New task"
})
-- Create a card with full details
local card = app.integrations.trello.create_card({
id_list = "5abbe4b7ddc1b351ef961414",
name = "Bug fix",
desc = "Fix the login page issue",
id_labels = { "labelId1" },
id_members = { "memberId1" },
due = "2026-04-30T12:00:00Z",
pos = "top"
})
print("Created card: " .. card.name .. " (id: " .. card.id .. ")")
get_current_user
Get the profile of the currently authenticated Trello user.
Parameters
None.
Examples
local result = app.integrations.trello.get_current_user({})
print("Logged in as: " .. result.fullName .. " (@" .. result.username .. ")")
print("ID: " .. result.id)
Multi-Account Usage
If you have multiple Trello accounts configured, use account-specific namespaces:
-- Default account (always works)
app.integrations.trello.function_name({...})
-- Explicit default (portable across setups)
app.integrations.trello.default.function_name({...})
-- Named accounts
app.integrations.trello.work.function_name({...})
app.integrations.trello.personal.function_name({...})
All functions are identical across accounts — only the credentials differ.
Raw agent markdown
# Trello — Lua API Reference
## list_boards
List all boards for the authenticated Trello member. Supports filtering by status and field selection.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `filter` | string | no | Filter: `"all"`, `"closed"`, `"members"`, `"open"`, `"organization"`, `"public"` (default: `"all"`) |
| `fields` | string | no | Comma-separated board fields to return (default: `"all"`) |
| `limit` | integer | no | Max number of boards to return (1–1000) |
### Examples
```lua
-- List all open boards
local result = app.integrations.trello.list_boards({
filter = "open"
})
for _, board in ipairs(result) do
print(board.name .. " (id: " .. board.id .. ")")
end
-- List boards with specific fields
local result = app.integrations.trello.list_boards({
filter = "open",
fields = "name,url,dateLastActivity",
limit = 50
})
```
---
## get_board
Get detailed information about a Trello board by ID.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `id` | string | yes | The board ID |
### Examples
```lua
local result = app.integrations.trello.get_board({
id = "5abbe4b7ddc1b351ef961414"
})
print(result.name)
print("URL: " .. result.url)
print("Lists: " .. #result.lists)
```
---
## list_lists
List all lists on a Trello board.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `board_id` | string | yes | The board ID to list lists from |
### Examples
```lua
local result = app.integrations.trello.list_lists({
board_id = "5abbe4b7ddc1b351ef961414"
})
for _, list in ipairs(result) do
print(list.name .. " (id: " .. list.id .. ")")
end
```
---
## get_list
Get detailed information about a Trello list by ID.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `id` | string | yes | The list ID |
### Examples
```lua
local result = app.integrations.trello.get_list({
id = "5abbe4b7ddc1b351ef961414"
})
print(result.name)
print("Board: " .. result.idBoard)
```
---
## list_cards
List all cards in a Trello list. Supports limit and before cursor for pagination.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `list_id` | string | yes | The list ID |
| `limit` | integer | no | Max number of cards to return (1–1000) |
| `before` | string | no | Card ID to fetch cards before (for pagination) |
### Examples
```lua
-- List cards in a list
local result = app.integrations.trello.list_cards({
list_id = "5abbe4b7ddc1b351ef961414"
})
for _, card in ipairs(result) do
print(card.name .. " — " .. (card.desc or ""))
end
-- Paginated listing
local result = app.integrations.trello.list_cards({
list_id = "5abbe4b7ddc1b351ef961414",
limit = 10
})
```
---
## create_card
Create a new card on a Trello list.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `name` | string | yes | Name for the card |
| `id_list` | string | yes | ID of the list to add the card to |
| `desc` | string | no | Description (supports Markdown) |
| `id_labels` | array | no | Array of label IDs to add |
| `id_members` | array | no | Array of member IDs to assign |
| `due` | string | no | Due date in ISO 8601 format |
| `pos` | string | no | Position: `"top"`, `"bottom"`, or a positive number |
### Examples
```lua
-- Create a simple card
local card = app.integrations.trello.create_card({
id_list = "5abbe4b7ddc1b351ef961414",
name = "New task"
})
-- Create a card with full details
local card = app.integrations.trello.create_card({
id_list = "5abbe4b7ddc1b351ef961414",
name = "Bug fix",
desc = "Fix the login page issue",
id_labels = { "labelId1" },
id_members = { "memberId1" },
due = "2026-04-30T12:00:00Z",
pos = "top"
})
print("Created card: " .. card.name .. " (id: " .. card.id .. ")")
```
---
## get_current_user
Get the profile of the currently authenticated Trello user.
### Parameters
None.
### Examples
```lua
local result = app.integrations.trello.get_current_user({})
print("Logged in as: " .. result.fullName .. " (@" .. result.username .. ")")
print("ID: " .. result.id)
```
---
## Multi-Account Usage
If you have multiple Trello accounts configured, use account-specific namespaces:
```lua
-- Default account (always works)
app.integrations.trello.function_name({...})
-- Explicit default (portable across setups)
app.integrations.trello.default.function_name({...})
-- Named accounts
app.integrations.trello.work.function_name({...})
app.integrations.trello.personal.function_name({...})
```
All functions are identical across accounts — only the credentials differ. local result = app.integrations.trello.list_boards({filter = "example_filter", fields = "example_fields", limit = 1})
print(result) Functions
list_boards Read
List all boards for the authenticated Trello member. Supports filtering by status and field selection.
- Lua path
app.integrations.trello.list_boards- Full name
trello.trello_list_boards
| Parameter | Type | Required | Description |
|---|---|---|---|
filter | string | no | Filter: "all", "closed", "members", "open", "organization", "public" (default: "all"). |
fields | string | no | Comma-separated board fields to return (default: "all"). |
limit | integer | no | Max number of boards to return (1–1000). |
get_board Read
Get detailed information about a Trello board by ID.
- Lua path
app.integrations.trello.get_board- Full name
trello.trello_get_board
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | The board ID. |
list_lists Read
List all lists on a Trello board.
- Lua path
app.integrations.trello.list_lists- Full name
trello.trello_list_lists
| Parameter | Type | Required | Description |
|---|---|---|---|
board_id | string | yes | The board ID to list lists from. |
get_list Read
Get detailed information about a Trello list by ID.
- Lua path
app.integrations.trello.get_list- Full name
trello.trello_get_list
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | The list ID. |
list_cards Read
List all cards in a Trello list. Supports limit and before cursor for pagination.
- Lua path
app.integrations.trello.list_cards- Full name
trello.trello_list_cards
| Parameter | Type | Required | Description |
|---|---|---|---|
list_id | string | yes | The list ID. |
limit | integer | no | Max number of cards to return (1–1000). |
before | string | no | Card ID to fetch cards before (for pagination). |
create_card Write
Create a new card on a Trello list.
- Lua path
app.integrations.trello.create_card- Full name
trello.trello_create_card
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | yes | Name for the card. |
id_list | string | yes | ID of the list to add the card to. |
desc | string | no | Description (supports Markdown). |
id_labels | array | no | Array of label IDs to add. |
id_members | array | no | Array of member IDs to assign. |
due | string | no | Due date in ISO 8601 format. |
pos | string | no | Position: "top", "bottom", or a positive number. |
get_current_user Read
Get the profile of the currently authenticated Trello user. Useful for verifying credentials and displaying account information.
- Lua path
app.integrations.trello.get_current_user- Full name
trello.trello_get_current_user
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||