Skip to main content
Glama

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
NameRequiredDescriptionDefault
inbox_idYes
limitNo
offsetNo

Implementation Reference

  • 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.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 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, ),

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/agentmail-to/agentmail-toolkit'

If you have feedback or need assistance with the MCP directory API, please join our Discord server