Call Lumail V2 tools from server-side TypeScript code through the SDK.
The SDK can list, inspect, and run Lumail tools through the V2 tools API.
This is useful when your app wants one generic tool interface for actions like dashboard stats, subscriber search, campaign operations, or AI-assisted copy improvements. It is still a normal API call from your application. For direct assistant integrations, use MCP.
const { tools, grouped } = await lumail.tools.list();
console.log(tools.length);
console.log(Object.keys(grouped));
const { tool } = await lumail.tools.get("list_subscribers");
console.log(tool.inputSchema);
const result = await lumail.tools.run<{ subscribers: unknown[] }>(
"list_subscribers",
{
limit: 10,
status: "SUBSCRIBED",
},
);
| Scenario | Use SDK tools? |
|---|---|
| Your backend needs a generic action runner | Yes |
| You want to expose selected Lumail actions in an admin UI | Yes |
| You are writing TypeScript automation scripts | Yes |
| You are connecting Claude or Cursor directly | Use MCP |
| You need Python, Ruby, Go, or PHP | Use the REST Tools API |