KosmoKrator

print

Lob CLI for Coding Agents

Use the Lob CLI for coding agents with headless JSON commands, schema discovery, credentials, and permission controls.

7 functions 5 read 2 write API key auth

Lob CLI for Coding Agents

Let coding agents discover schemas and execute integration functions through CLI commands or MCP.

Use this pattern when another coding agent needs exact commands and schema discovery. The Lob CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.

Command Shape

# Lob CLI for Coding Agents
kosmokrator integrations:configure lob --set api_key="$LOB_API_KEY" --enable --read allow --write ask --json
kosmo integrations:call lob.lob_list_letters '{"limit":1,"offset":1}' --json

Discovery Before Execution

Agents and scripts can inspect Lob docs and schemas before choosing a function.

kosmo integrations:docs lob --json
kosmo integrations:docs lob.lob_list_letters --json
kosmo integrations:schema lob.lob_list_letters --json
kosmo integrations:search "Lob" --json
kosmo integrations:list --json

Useful Lob CLI Functions

FunctionTypeParametersDescription
lob.lob_list_letters Read limit, offset List letters with pagination. Returns a page of letter objects sorted by creation date (newest first).
lob.lob_get_letter Read id Retrieve details of a specific letter by its Lob ID, including delivery status, tracking info, and the letter URL.
lob.lob_create_letter Write to, from, description, file, color, double_sided Create and send a letter via Lob. Provide recipient and sender addresses (as address IDs or inline address objects), plus an HTML file or template ID for the letter content.
lob.lob_list_postcards Read limit, offset List postcards with pagination. Returns a page of postcard objects sorted by creation date (newest first).
lob.lob_get_postcard Read id Retrieve details of a specific postcard by its Lob ID, including delivery status, tracking info, and thumbnails.
lob.lob_create_postcard Write to, from, description, front, back Create and send a postcard via Lob. Provide recipient and sender addresses (as address IDs or inline address objects), plus HTML or template IDs for the front and back.
lob.lob_get_current_user Read none List saved addresses in the Lob account. Returns all verified addresses that can be used as sender or recipient for letters and postcards.

Automation Notes

Related Lob CLI Pages