KosmoKrator

productivity

Vercel Lua API for KosmoKrator Agents

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

7 functions 7 read 0 write API token auth

Lua Namespace

Agents call this integration through app.integrations.vercel.*. Use lua_read_doc("integrations.vercel") 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.

Vercel Integration

The Vercel integration provides tools to manage your Vercel projects, deployments, domains, and teams.

Authentication

You need a Vercel API token (Bearer token). Generate one at vercel.com/account/tokens.

The token is sent as a Bearer header on every request. Ensure it has the scopes required for the operations you plan to use.


Projects

List Projects

local projects = app.integrations.vercel.vercel_list_projects({
    limit = 20,
    team_id = "team_xxx"   -- optional
})
ParameterTypeRequiredDescription
limitintegerNoMax projects to return (default 20, max 100)
team_idstringNoScope to a specific team

Get Project

local project = app.integrations.vercel.vercel_get_project({
    id = "prj_xxx"
})
ParameterTypeRequiredDescription
idstringYesThe project ID
team_idstringNoTeam ID if project belongs to team

Deployments

List Deployments

local deployments = app.integrations.vercel.vercel_list_deployments({
    project_id = "prj_xxx",        -- optional
    state = "READY",                -- optional: READY, ERROR, BUILDING, QUEUED
    target = "production",          -- optional: production, preview, development
    limit = 20,
    team_id = "team_xxx"            -- optional
})
ParameterTypeRequiredDescription
project_idstringNoFilter by project ID
statestringNoFilter by state (READY, ERROR, BUILDING, QUEUED)
targetstringNoFilter by target (production, preview, development)
limitintegerNoMax deployments to return (default 20, max 100)
team_idstringNoScope to a specific team

Get Deployment

local deployment = app.integrations.vercel.vercel_get_deployment({
    id = "dpl_xxx"
})
ParameterTypeRequiredDescription
idstringYesThe deployment ID
team_idstringNoTeam ID if deployment belongs to team

Domains

List Domains

local domains = app.integrations.vercel.vercel_list_domains({
    limit = 20,
    team_id = "team_xxx"   -- optional
})
ParameterTypeRequiredDescription
limitintegerNoMax domains to return (default 20, max 100)
team_idstringNoScope to a specific team

Teams

List Teams

local teams = app.integrations.vercel.vercel_list_teams({
    limit = 20
})
ParameterTypeRequiredDescription
limitintegerNoMax teams to return (default 20, max 100)

User

Get Current User

local user = app.integrations.vercel.vercel_get_current_user({})

Returns the authenticated user profile including username, email, and plan details. No parameters required.


Pagination

List endpoints (list_projects, list_deployments, list_domains, list_teams) support a limit parameter. Use smaller limits for faster responses. Vercel may return a pagination object with next cursors for fetching additional pages.


Notes

  • All API calls use the Vercel v2 REST API (https://api.vercel.com/v2).
  • Token scopes determine which resources are accessible. A Full Account token provides access to all endpoints.
  • The team_id parameter is optional for personal accounts but required when accessing team-scoped resources.

Multi-Account Usage

You can configure multiple Vercel accounts (e.g., personal and team):

-- Default account
local projects = app.integrations.vercel.vercel_list_projects({})

-- Named account
local projects = app.integrations.vercel.vercel_list_projects({
    account = "my-team"
})
Raw agent markdown
# Vercel Integration

The Vercel integration provides tools to manage your Vercel projects, deployments, domains, and teams.

## Authentication

You need a **Vercel API token** (Bearer token). Generate one at [vercel.com/account/tokens](https://vercel.com/account/tokens).

The token is sent as a `Bearer` header on every request. Ensure it has the scopes required for the operations you plan to use.

---

## Projects

### List Projects

```lua
local projects = app.integrations.vercel.vercel_list_projects({
    limit = 20,
    team_id = "team_xxx"   -- optional
})
```

| Parameter | Type     | Required | Description                                 |
|-----------|----------|----------|---------------------------------------------|
| `limit`   | integer  | No       | Max projects to return (default 20, max 100)|
| `team_id` | string   | No       | Scope to a specific team                    |

### Get Project

```lua
local project = app.integrations.vercel.vercel_get_project({
    id = "prj_xxx"
})
```

| Parameter | Type   | Required | Description                       |
|-----------|--------|----------|-----------------------------------|
| `id`      | string | Yes      | The project ID                    |
| `team_id` | string | No       | Team ID if project belongs to team|

---

## Deployments

### List Deployments

```lua
local deployments = app.integrations.vercel.vercel_list_deployments({
    project_id = "prj_xxx",        -- optional
    state = "READY",                -- optional: READY, ERROR, BUILDING, QUEUED
    target = "production",          -- optional: production, preview, development
    limit = 20,
    team_id = "team_xxx"            -- optional
})
```

| Parameter    | Type    | Required | Description                                              |
|--------------|---------|----------|----------------------------------------------------------|
| `project_id` | string  | No       | Filter by project ID                                     |
| `state`      | string  | No       | Filter by state (READY, ERROR, BUILDING, QUEUED)         |
| `target`     | string  | No       | Filter by target (production, preview, development)      |
| `limit`      | integer | No       | Max deployments to return (default 20, max 100)          |
| `team_id`    | string  | No       | Scope to a specific team                                 |

### Get Deployment

```lua
local deployment = app.integrations.vercel.vercel_get_deployment({
    id = "dpl_xxx"
})
```

| Parameter | Type   | Required | Description                            |
|-----------|--------|----------|----------------------------------------|
| `id`      | string | Yes      | The deployment ID                      |
| `team_id` | string | No       | Team ID if deployment belongs to team  |

---

## Domains

### List Domains

```lua
local domains = app.integrations.vercel.vercel_list_domains({
    limit = 20,
    team_id = "team_xxx"   -- optional
})
```

| Parameter | Type     | Required | Description                                |
|-----------|----------|----------|--------------------------------------------|
| `limit`   | integer  | No       | Max domains to return (default 20, max 100)|
| `team_id` | string   | No       | Scope to a specific team                   |

---

## Teams

### List Teams

```lua
local teams = app.integrations.vercel.vercel_list_teams({
    limit = 20
})
```

| Parameter | Type     | Required | Description                             |
|-----------|----------|----------|-----------------------------------------|
| `limit`   | integer  | No       | Max teams to return (default 20, max 100)|

---

## User

### Get Current User

```lua
local user = app.integrations.vercel.vercel_get_current_user({})
```

Returns the authenticated user profile including username, email, and plan details. No parameters required.

---

## Pagination

List endpoints (`list_projects`, `list_deployments`, `list_domains`, `list_teams`) support a `limit` parameter. Use smaller limits for faster responses. Vercel may return a `pagination` object with `next` cursors for fetching additional pages.

---

## Notes

- All API calls use the Vercel v2 REST API (`https://api.vercel.com/v2`).
- Token scopes determine which resources are accessible. A **Full Account** token provides access to all endpoints.
- The `team_id` parameter is optional for personal accounts but required when accessing team-scoped resources.

## Multi-Account Usage

You can configure multiple Vercel accounts (e.g., personal and team):

```lua
-- Default account
local projects = app.integrations.vercel.vercel_list_projects({})

-- Named account
local projects = app.integrations.vercel.vercel_list_projects({
    account = "my-team"
})
```

Metadata-Derived Lua Example

local result = app.integrations.vercel.vercel_get_current_user({})
print(result)

Functions

vercel_get_current_user

Get the currently authenticated Vercel user profile, including username, email, and plan.

Operation
Read read
Full name
vercel.vercel_get_current_user
ParameterTypeRequiredDescription
No parameters.

vercel_get_deployment

Get details for a specific Vercel deployment by ID, including status, URL, and build logs.

Operation
Read read
Full name
vercel.vercel_get_deployment
ParameterTypeRequiredDescription
id string yes The deployment ID.
team_id string no Optional team ID if the deployment belongs to a team.

vercel_get_project

Get details for a specific Vercel project by ID, including framework, domains, and settings.

Operation
Read read
Full name
vercel.vercel_get_project
ParameterTypeRequiredDescription
id string yes The project ID.
team_id string no Optional team ID if the project belongs to a team.

vercel_list_deployments

List deployments across your Vercel projects. Filter by project, state, or target.

Operation
Read read
Full name
vercel.vercel_list_deployments
ParameterTypeRequiredDescription
project_id string no Filter deployments by project ID.
state string no Filter by deployment state (e.g., READY, ERROR, BUILDING, QUEUED).
target string no Filter by target environment (e.g., production, preview, development).
limit integer no Maximum number of deployments to return (default 20, max 100).
team_id string no Optional team ID to scope deployments to a specific team.

vercel_list_domains

List all domains configured in Vercel, including verification and DNS status.

Operation
Read read
Full name
vercel.vercel_list_domains
ParameterTypeRequiredDescription
limit integer no Maximum number of domains to return (default 20, max 100).
team_id string no Optional team ID to scope domains to a specific team.

vercel_list_projects

List all Vercel projects. Returns project names, IDs, framework, and deployment status.

Operation
Read read
Full name
vercel.vercel_list_projects
ParameterTypeRequiredDescription
limit integer no Maximum number of projects to return (default 20, max 100).
team_id string no Optional team ID to scope projects to a specific team.

vercel_list_teams

List all Vercel teams you belong to, including membership roles and member counts.

Operation
Read read
Full name
vercel.vercel_list_teams
ParameterTypeRequiredDescription
limit integer no Maximum number of teams to return (default 20, max 100).