KosmoKrator

productivity

Google Keep Lua API for KosmoKrator Agents

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

Lua Namespace

Agents call this integration through app.integrations.google_keep.*. Use lua_read_doc("integrations.google-keep") 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 Google Keep workflow without starting an interactive agent session.

Inline Lua call
kosmo integrations:lua --eval 'dump(app.integrations.google_keep.notes_get({}))' --json
Read Lua docs headlessly
kosmo integrations:lua --eval 'print(docs.read("google-keep"))' --json
kosmo integrations:lua --eval 'print(docs.read("google-keep.notes_get"))' --json

Workflow file

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

workflow.lua
local google_keep = app.integrations.google_keep
local result = google_keep.notes_get({})

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.google_keep, app.mcp.*, docs.*, json.*, and regex.*. Use app.integrations.google_keep.default.* or app.integrations.google_keep.work.* when you configured named credential accounts.

MCP-only Lua

If the script only needs configured MCP servers and does not need Google Keep, 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.

Google Keep

Google Keep tools are exposed under app.integrations.google_keep. This package is generated from Google’s official Keep v1 Discovery document and exposes 7 REST methods.

Use it for note workflows: list notes, get notes, create notes, delete notes, create or delete note permissions in batches, and download attachment media.

Each method-specific tool accepts Discovery path parameters as top-level arguments, known query parameters as top-level shortcuts or inside query, and request resources inside body. Resource path parameters preserve /, so pass full names like notes/example or notes/example/permissions/permission-id.

Examples

local notes = app.integrations.google_keep.google_keep_notes_list({
  pageSize = 10,
  filter = "trashed = false"
})

local note = app.integrations.google_keep.google_keep_notes_create({
  body = {
    title = "Agent checklist",
    body = { text = { text = "Review queued tasks" } }
  }
})

local shared = app.integrations.google_keep.google_keep_notes_permissions_batch_create({
  parent = "notes/example",
  body = {
    requests = {
      { permission = { role = "WRITER", email = "[email protected]" } }
    }
  }
})

Returned data is the parsed JSON response from the Keep API. Empty successful responses return { success = true, status = <http_status> }. Media downloads that do not return JSON are returned as { body = <string>, status = <http_status>, content_type = <header> }.

Use https://www.googleapis.com/auth/keep.readonly for read-only note access and https://www.googleapis.com/auth/keep for create, delete, sharing, and media workflows.

Raw agent markdown
# Google Keep

Google Keep tools are exposed under `app.integrations.google_keep`. This package is generated from Google's official Keep v1 Discovery document and exposes 7 REST methods.

Use it for note workflows: list notes, get notes, create notes, delete notes, create or delete note permissions in batches, and download attachment media.

Each method-specific tool accepts Discovery path parameters as top-level arguments, known query parameters as top-level shortcuts or inside `query`, and request resources inside `body`. Resource path parameters preserve `/`, so pass full names like `notes/example` or `notes/example/permissions/permission-id`.

## Examples

```lua
local notes = app.integrations.google_keep.google_keep_notes_list({
  pageSize = 10,
  filter = "trashed = false"
})

local note = app.integrations.google_keep.google_keep_notes_create({
  body = {
    title = "Agent checklist",
    body = { text = { text = "Review queued tasks" } }
  }
})

local shared = app.integrations.google_keep.google_keep_notes_permissions_batch_create({
  parent = "notes/example",
  body = {
    requests = {
      { permission = { role = "WRITER", email = "[email protected]" } }
    }
  }
})
```

Returned data is the parsed JSON response from the Keep API. Empty successful responses return `{ success = true, status = <http_status> }`. Media downloads that do not return JSON are returned as `{ body = <string>, status = <http_status>, content_type = <header> }`.

Use `https://www.googleapis.com/auth/keep.readonly` for read-only note access and `https://www.googleapis.com/auth/keep` for create, delete, sharing, and media workflows.
Metadata-derived Lua example
local result = app.integrations.google_keep.notes_get({})
print(result)

Functions

notes_get Read

Notes Get (GET /v1/{+name}).

Lua path
app.integrations.google_keep.notes_get
Full name
google-keep.google_keep_notes_get
ParameterTypeRequiredDescription
No parameters.
notes_list Read

Notes List (GET /v1/notes).

Lua path
app.integrations.google_keep.notes_list
Full name
google-keep.google_keep_notes_list
ParameterTypeRequiredDescription
No parameters.
notes_delete Write

Notes Delete (DELETE /v1/{+name}).

Lua path
app.integrations.google_keep.notes_delete
Full name
google-keep.google_keep_notes_delete
ParameterTypeRequiredDescription
No parameters.
notes_create Write

Notes Create (POST /v1/notes).

Lua path
app.integrations.google_keep.notes_create
Full name
google-keep.google_keep_notes_create
ParameterTypeRequiredDescription
No parameters.
notes_permissions_batch_delete Write

Notes Permissions Batch Delete (POST /v1/{+parent}/permissions:batchDelete).

Lua path
app.integrations.google_keep.notes_permissions_batch_delete
Full name
google-keep.google_keep_notes_permissions_batch_delete
ParameterTypeRequiredDescription
No parameters.
notes_permissions_batch_create Write

Notes Permissions Batch Create (POST /v1/{+parent}/permissions:batchCreate).

Lua path
app.integrations.google_keep.notes_permissions_batch_create
Full name
google-keep.google_keep_notes_permissions_batch_create
ParameterTypeRequiredDescription
No parameters.
media_download Read

Media Download (GET /v1/{+name}).

Lua path
app.integrations.google_keep.media_download
Full name
google-keep.google_keep_media_download
ParameterTypeRequiredDescription
No parameters.