Skip to main content
Glama

list_threads

Retrieve and filter conversation threads from the402.ai marketplace to monitor active, completed, or disputed transactions as a buyer or seller.

Instructions

List your conversation threads on the402.ai. Shows threads where you are the agent (buyer) or provider (seller). Filter by status to find active, completed, or disputed threads. Requires API key.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusNoFilter by thread status
limitNoResults per page (default: 20)
offsetNoPagination offset

Implementation Reference

  • The handler function for the list_threads tool. It calls the client's authGet method to fetch threads from the /v1/threads endpoint with optional status, limit, and offset filters.
    async ({ status, limit, offset }) => {
    	const params: Record<string, string> = {};
    	if (status) params.status = status;
    	if (limit !== undefined) params.limit = String(limit);
    	if (offset !== undefined) params.offset = String(offset);
    
    	const result = await client.authGet("/v1/threads", params);
    	return {
    		content: [
    			{ type: "text" as const, text: JSON.stringify(result, null, 2) },
    		],
    	};
    }
  • Registration of the list_threads tool, including its description and schema definition using zod.
    server.tool(
    	"list_threads",
    	"List your conversation threads on the402.ai. Shows threads where you are the agent (buyer) or provider (seller). Filter by status to find active, completed, or disputed threads. Requires API key.",
    	{
    		status: z
    			.enum([
    				"inquiry",
    				"negotiating",
    				"accepted",
    				"in_progress",
    				"completed",
    				"verified",
    				"disputed",
    				"cancelled",
    			])
    			.optional()
    			.describe("Filter by thread status"),
    		limit: z.number().optional().describe("Results per page (default: 20)"),
    		offset: z.number().optional().describe("Pagination offset"),
    	},

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/the402ai/mcp-server'

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