KosmoKrator

bookmarks

Raindrop.io Lua API for KosmoKrator Agents

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

7 functions 5 read 2 write Bearer token auth

Lua Namespace

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

Raindrop.io — Lua API Reference

list_bookmarks

List bookmarks with optional collection and search filters.

Parameters

NameTypeRequiredDescription
collection_idintegernoCollection ID to filter by. 0 = all, -1 = unsorted, -99 = trash
searchstringnoSearch query to filter bookmarks
pageintegernoPage number (starts at 1, default: 1)
per_pageintegernoResults per page (max 50, default: 25)

Examples

List all bookmarks (first page)

local result = app.integrations.raindrop.list_bookmarks({})

for _, item in ipairs(result.items) do
  print(item.title .. " -> " .. item.link)
end

Search bookmarks

local result = app.integrations.raindrop.list_bookmarks({
  search = "laravel"
})

Bookmarks in a specific collection

local result = app.integrations.raindrop.list_bookmarks({
  collection_id = 12345,
  page = 2,
  per_page = 50
})

get_bookmark

Get full details of a single bookmark.

Parameters

NameTypeRequiredDescription
idintegeryesThe bookmark ID

Example

local result = app.integrations.raindrop.get_bookmark({ id = 12345 })
local bm = result.item
print(bm.title)
print(bm.link)
print(bm.excerpt)

create_bookmark

Save a new bookmark.

Parameters

NameTypeRequiredDescription
linkstringyesThe URL to bookmark
titlestringnoTitle override (auto-detected if omitted)
tagsarraynoTags to assign (array of strings)
collection_idintegernoTarget collection ID (0 = Unsorted)
excerptstringnoShort description or note

Example

local result = app.integrations.raindrop.create_bookmark({
  link = "https://laravel.com/docs",
  title = "Laravel Documentation",
  tags = { "php", "framework", "docs" },
  collection_id = 42,
  excerpt = "Official Laravel documentation"
})

update_bookmark

Update an existing bookmark’s fields.

Parameters

NameTypeRequiredDescription
idintegeryesThe bookmark ID
linkstringnoNew URL
titlestringnoNew title
tagsarraynoReplace tags
collection_idintegernoMove to a different collection
excerptstringnoNew description or note

Example

local result = app.integrations.raindrop.update_bookmark({
  id = 12345,
  title = "Updated Title",
  tags = { "updated", "important" }
})

list_collections

List all bookmark collections (folders).

Parameters

None.

Example

local result = app.integrations.raindrop.list_collections({})

for _, col in ipairs(result.items) do
  print(col.title .. " (ID: " .. col._id .. ", count: " .. col.count .. ")")
end

get_collection

Get details of a specific collection.

Parameters

NameTypeRequiredDescription
idintegeryesThe collection ID

Example

local result = app.integrations.raindrop.get_collection({ id = 42 })
local col = result.item
print(col.title .. " — " .. col.count .. " bookmarks")

get_current_user

Get the authenticated user’s profile.

Parameters

None.

Example

local result = app.integrations.raindrop.get_current_user({})
local user = result.user
print(user.fullName .. " (" .. user.email .. ")")
print("Plan: " .. user.pro .. " | Storage: " .. user.usedSpace .. " bytes")

Multi-Account Usage

If you have multiple Raindrop.io accounts configured, use account-specific namespaces:

-- Default account (always works)
app.integrations.raindrop.list_bookmarks({})

-- Explicit default (portable across setups)
app.integrations.raindrop.default.list_bookmarks({})

-- Named accounts
app.integrations.raindrop.work.list_bookmarks({})
app.integrations.raindrop.personal.list_bookmarks({})

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

Raw agent markdown
# Raindrop.io — Lua API Reference

## list_bookmarks

List bookmarks with optional collection and search filters.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `collection_id` | integer | no | Collection ID to filter by. `0` = all, `-1` = unsorted, `-99` = trash |
| `search` | string | no | Search query to filter bookmarks |
| `page` | integer | no | Page number (starts at 1, default: 1) |
| `per_page` | integer | no | Results per page (max 50, default: 25) |

### Examples

#### List all bookmarks (first page)

```lua
local result = app.integrations.raindrop.list_bookmarks({})

for _, item in ipairs(result.items) do
  print(item.title .. " -> " .. item.link)
end
```

#### Search bookmarks

```lua
local result = app.integrations.raindrop.list_bookmarks({
  search = "laravel"
})
```

#### Bookmarks in a specific collection

```lua
local result = app.integrations.raindrop.list_bookmarks({
  collection_id = 12345,
  page = 2,
  per_page = 50
})
```

---

## get_bookmark

Get full details of a single bookmark.

### Parameters

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

### Example

```lua
local result = app.integrations.raindrop.get_bookmark({ id = 12345 })
local bm = result.item
print(bm.title)
print(bm.link)
print(bm.excerpt)
```

---

## create_bookmark

Save a new bookmark.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `link` | string | yes | The URL to bookmark |
| `title` | string | no | Title override (auto-detected if omitted) |
| `tags` | array | no | Tags to assign (array of strings) |
| `collection_id` | integer | no | Target collection ID (0 = Unsorted) |
| `excerpt` | string | no | Short description or note |

### Example

```lua
local result = app.integrations.raindrop.create_bookmark({
  link = "https://laravel.com/docs",
  title = "Laravel Documentation",
  tags = { "php", "framework", "docs" },
  collection_id = 42,
  excerpt = "Official Laravel documentation"
})
```

---

## update_bookmark

Update an existing bookmark's fields.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `id` | integer | yes | The bookmark ID |
| `link` | string | no | New URL |
| `title` | string | no | New title |
| `tags` | array | no | Replace tags |
| `collection_id` | integer | no | Move to a different collection |
| `excerpt` | string | no | New description or note |

### Example

```lua
local result = app.integrations.raindrop.update_bookmark({
  id = 12345,
  title = "Updated Title",
  tags = { "updated", "important" }
})
```

---

## list_collections

List all bookmark collections (folders).

### Parameters

None.

### Example

```lua
local result = app.integrations.raindrop.list_collections({})

for _, col in ipairs(result.items) do
  print(col.title .. " (ID: " .. col._id .. ", count: " .. col.count .. ")")
end
```

---

## get_collection

Get details of a specific collection.

### Parameters

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

### Example

```lua
local result = app.integrations.raindrop.get_collection({ id = 42 })
local col = result.item
print(col.title .. " — " .. col.count .. " bookmarks")
```

---

## get_current_user

Get the authenticated user's profile.

### Parameters

None.

### Example

```lua
local result = app.integrations.raindrop.get_current_user({})
local user = result.user
print(user.fullName .. " (" .. user.email .. ")")
print("Plan: " .. user.pro .. " | Storage: " .. user.usedSpace .. " bytes")
```

---

## Multi-Account Usage

If you have multiple Raindrop.io accounts configured, use account-specific namespaces:

```lua
-- Default account (always works)
app.integrations.raindrop.list_bookmarks({})

-- Explicit default (portable across setups)
app.integrations.raindrop.default.list_bookmarks({})

-- Named accounts
app.integrations.raindrop.work.list_bookmarks({})
app.integrations.raindrop.personal.list_bookmarks({})
```

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

Metadata-Derived Lua Example

local result = app.integrations.raindrop.raindrop_list_bookmarks({
  collection_id = 1,
  search = "example_search",
  page = 1,
  per_page = 1
})
print(result)

Functions

raindrop_list_bookmarks

List bookmarks from Raindrop.io. Optionally filter by collection or search query. Returns paginated results with bookmark details.

Operation
Read read
Full name
raindrop.raindrop_list_bookmarks
ParameterTypeRequiredDescription
collection_id integer no Collection ID to filter by. Use 0 for all bookmarks, -1 for unsorted, -99 for trash. Omit to list all.
search string no Search query to filter bookmarks by keyword.
page integer no Page number for pagination (starts at 1, default: 1).
per_page integer no Number of results per page (max 50, default: 25).

raindrop_get_bookmark

Get full details of a single bookmark by its ID, including title, URL, tags, excerpt, and metadata.

Operation
Read read
Full name
raindrop.raindrop_get_bookmark
ParameterTypeRequiredDescription
id integer yes The bookmark ID.

raindrop_create_bookmark

Save a new bookmark to Raindrop.io. Provide a URL and optionally set the title, tags, collection, and description.

Operation
Write write
Full name
raindrop.raindrop_create_bookmark
ParameterTypeRequiredDescription
link string yes The URL to bookmark.
title string no Title for the bookmark. If omitted, Raindrop will auto-detect from the page.
tags array no Tags to assign to the bookmark (array of strings).
collection_id integer no Collection ID to save into. Use 0 or omit for "Unsorted".
excerpt string no A short description or note for the bookmark.

raindrop_update_bookmark

Update an existing bookmark in Raindrop.io. Provide the bookmark ID and the fields to change (title, URL, tags, collection, description, etc.).

Operation
Write write
Full name
raindrop.raindrop_update_bookmark
ParameterTypeRequiredDescription
id integer yes The bookmark ID to update.
link string no New URL for the bookmark.
title string no New title for the bookmark.
tags array no Replace tags (array of strings).
collection_id integer no Move to a different collection by providing its ID.
excerpt string no New description or note.

raindrop_list_collections

List all bookmark collections (folders) from Raindrop.io. Returns collection names, IDs, and counts.

Operation
Read read
Full name
raindrop.raindrop_list_collections
ParameterTypeRequiredDescription
No parameters.

raindrop_get_collection

Get details of a specific collection by ID, including its name, color, icon, and bookmark count.

Operation
Read read
Full name
raindrop.raindrop_get_collection
ParameterTypeRequiredDescription
id integer yes The collection ID.

raindrop_get_current_user

Get the authenticated Raindrop.io user's profile — name, email, subscription plan, and storage usage.

Operation
Read read
Full name
raindrop.raindrop_get_current_user
ParameterTypeRequiredDescription
No parameters.