listThreads
Retrieve email threads by inbox ID for AI agents using AgentMail. Specify inbox ID, limit, and offset to organize and manage communication effectively.
Instructions
List threads by inbox ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| inbox_id | Yes | ||
| limit | No | ||
| offset | No |
Implementation Reference
- node/src/functions.ts:33-36 (handler)Node.js handler function for the 'list_threads' tool. Extracts inbox_id and options from args and calls client.inboxes.threads.list(inbox_id, options).export async function listThreads(client: AgentMailClient, args: Args) { const { inbox_id, ...options } = args return client.inboxes.threads.list(inbox_id, options) }
- Python handler function for the 'list_threads' tool. Calls client.inboxes.threads.list with unpacked kwargs.def list_threads(client: AgentMail, kwargs: Kwargs): return client.inboxes.threads.list(**kwargs)
- node/src/tools.ts:60-65 (registration)Node.js registration of the 'list_threads' tool, specifying name, description, params_schema, and func.{ name: 'list_threads', description: 'List threads in inbox', params_schema: ListInboxItemsParams, func: listThreads, },
- python/src/agentmail_toolkit/tools.py:63-68 (registration)Python registration of the 'list_threads' tool as a Tool instance with name, description, params_schema, and func.Tool( name="list_threads", description="List threads in inbox", params_schema=ListInboxItemsParams, func=list_threads, ),