KosmoKrator

productivity

Teamwork Lua API for KosmoKrator Agents

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

7 functions 6 read 1 write API token auth

Lua Namespace

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

Agent-Facing Lua Docs

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

Client for the Teamwork REST API — Lua API Reference

teamwork_list_projects

List projects in Teamwork with optional filters..

Parameters

NameTypeRequiredDescription
statusstringnoFilter by project status (e.g. “active”, “late”, “completed”).
pageintegernoPage number for pagination.
pageSizeintegernoNumber of projects per page (max 500).

Example

local result = app.integrations.teamwork.teamwork_list_projects({
  status = ""
  page = 0
  pageSize = 0
})

teamwork_get_project

Get detailed information about a Teamwork project..

Parameters

NameTypeRequiredDescription
idintegeryesThe project ID.

Example

local result = app.integrations.teamwork.teamwork_get_project({
  id = 0
})

teamwork_list_tasks

List tasks in Teamwork with optional filters..

Parameters

NameTypeRequiredDescription
projectIdintegernoProject ID to filter tasks by.
pageintegernoPage number for pagination.
pageSizeintegernoNumber of tasks per page (max 500).
filterstringnoFilter tasks (e.g. “all”, “overdue”, “today”).
sortstringnoSort order (e.g. “duedate”, “priority”).

Example

local result = app.integrations.teamwork.teamwork_list_tasks({
  projectId = 0
  page = 0
  pageSize = 0
})

teamwork_get_task

Get detailed information about a Teamwork task..

Parameters

NameTypeRequiredDescription
idintegeryesThe task ID.

Example

local result = app.integrations.teamwork.teamwork_get_task({
  id = 0
})

teamwork_create_task

Create a new task in Teamwork..

Parameters

NameTypeRequiredDescription
projectIdintegeryesThe project ID to create the task in.
namestringyesName of the task.
descriptionstringnoDetailed description of the task.
assigneeIdintegernoUser ID to assign the task to.
dueDatestringnoDue date in YYYYMMDD format.
prioritystringnoTask priority (e.g. “low”, “medium”, “high”).
startDatestringnoStart date in YYYYMMDD format.

Example

local result = app.integrations.teamwork.teamwork_create_task({
  projectId = 0
  name = ""
  description = ""
})

teamwork_list_timers

List time timers for the authenticated user in Teamwork..

Parameters

NameTypeRequiredDescription
pageintegernoPage number for pagination.
pageSizeintegernoNumber of timers per page.

Example

local result = app.integrations.teamwork.teamwork_list_timers({
  page = 0
  pageSize = 0
})

teamwork_get_current_user

Get the currently authenticated Teamwork user..

Example

local result = app.integrations.teamwork.teamwork_get_current_user({
})

Multi-Account Usage

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

-- Default account (always works)
app.integrations.teamwork.function_name({...})

-- Explicit default (portable across setups)
app.integrations.teamwork.default.function_name({...})

-- Named accounts
app.integrations.teamwork.work.function_name({...})
app.integrations.teamwork.personal.function_name({...})

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

Raw agent markdown
# Client for the Teamwork REST API — Lua API Reference

## teamwork_list_projects

List projects in Teamwork with optional filters..

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `status` | string | no | Filter by project status (e.g. "active", "late", "completed"). |
| `page` | integer | no | Page number for pagination. |
| `pageSize` | integer | no | Number of projects per page (max 500). |

### Example

```lua
local result = app.integrations.teamwork.teamwork_list_projects({
  status = ""
  page = 0
  pageSize = 0
})
```

## teamwork_get_project

Get detailed information about a Teamwork project..

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `id` | integer | yes | The project ID. |

### Example

```lua
local result = app.integrations.teamwork.teamwork_get_project({
  id = 0
})
```

## teamwork_list_tasks

List tasks in Teamwork with optional filters..

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `projectId` | integer | no | Project ID to filter tasks by. |
| `page` | integer | no | Page number for pagination. |
| `pageSize` | integer | no | Number of tasks per page (max 500). |
| `filter` | string | no | Filter tasks (e.g. "all", "overdue", "today"). |
| `sort` | string | no | Sort order (e.g. "duedate", "priority"). |

### Example

```lua
local result = app.integrations.teamwork.teamwork_list_tasks({
  projectId = 0
  page = 0
  pageSize = 0
})
```

## teamwork_get_task

Get detailed information about a Teamwork task..

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `id` | integer | yes | The task ID. |

### Example

```lua
local result = app.integrations.teamwork.teamwork_get_task({
  id = 0
})
```

## teamwork_create_task

Create a new task in Teamwork..

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `projectId` | integer | yes | The project ID to create the task in. |
| `name` | string | yes | Name of the task. |
| `description` | string | no | Detailed description of the task. |
| `assigneeId` | integer | no | User ID to assign the task to. |
| `dueDate` | string | no | Due date in YYYYMMDD format. |
| `priority` | string | no | Task priority (e.g. "low", "medium", "high"). |
| `startDate` | string | no | Start date in YYYYMMDD format. |

### Example

```lua
local result = app.integrations.teamwork.teamwork_create_task({
  projectId = 0
  name = ""
  description = ""
})
```

## teamwork_list_timers

List time timers for the authenticated user in Teamwork..

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `page` | integer | no | Page number for pagination. |
| `pageSize` | integer | no | Number of timers per page. |

### Example

```lua
local result = app.integrations.teamwork.teamwork_list_timers({
  page = 0
  pageSize = 0
})
```

## teamwork_get_current_user

Get the currently authenticated Teamwork user..

### Example

```lua
local result = app.integrations.teamwork.teamwork_get_current_user({
})
```

---

## Multi-Account Usage

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

```lua
-- Default account (always works)
app.integrations.teamwork.function_name({...})

-- Explicit default (portable across setups)
app.integrations.teamwork.default.function_name({...})

-- Named accounts
app.integrations.teamwork.work.function_name({...})
app.integrations.teamwork.personal.function_name({...})
```

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

Metadata-Derived Lua Example

local result = app.integrations.teamwork.teamwork_create_task({
  projectId = 1,
  name = "example_name",
  description = "example_description",
  assigneeId = 1,
  dueDate = "example_dueDate",
  priority = "example_priority",
  startDate = "example_startDate"
})
print(result)

Functions

teamwork_create_task

Create a new task in Teamwork.

Operation
Write write
Full name
teamwork.teamwork_create_task
ParameterTypeRequiredDescription
projectId integer yes The project ID to create the task in.
name string yes Name of the task.
description string no Detailed description of the task.
assigneeId integer no User ID to assign the task to.
dueDate string no Due date in YYYYMMDD format.
priority string no Task priority (e.g. "low", "medium", "high").
startDate string no Start date in YYYYMMDD format.

teamwork_get_current_user

Get the currently authenticated Teamwork user.

Operation
Read read
Full name
teamwork.teamwork_get_current_user
ParameterTypeRequiredDescription
No parameters.

teamwork_get_project

Get detailed information about a Teamwork project.

Operation
Read read
Full name
teamwork.teamwork_get_project
ParameterTypeRequiredDescription
id integer yes The project ID.

teamwork_get_task

Get detailed information about a Teamwork task.

Operation
Read read
Full name
teamwork.teamwork_get_task
ParameterTypeRequiredDescription
id integer yes The task ID.

teamwork_list_projects

List projects in Teamwork with optional filters.

Operation
Read read
Full name
teamwork.teamwork_list_projects
ParameterTypeRequiredDescription
status string no Filter by project status (e.g. "active", "late", "completed").
page integer no Page number for pagination.
pageSize integer no Number of projects per page (max 500).

teamwork_list_tasks

List tasks in Teamwork with optional filters.

Operation
Read read
Full name
teamwork.teamwork_list_tasks
ParameterTypeRequiredDescription
projectId integer no Project ID to filter tasks by.
page integer no Page number for pagination.
pageSize integer no Number of tasks per page (max 500).
filter string no Filter tasks (e.g. "all", "overdue", "today").
sort string no Sort order (e.g. "duedate", "priority").

teamwork_list_timers

List time timers for the authenticated user in Teamwork.

Operation
Read read
Full name
teamwork.teamwork_list_timers
ParameterTypeRequiredDescription
page integer no Page number for pagination.
pageSize integer no Number of timers per page.