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"),
    	},
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden. It discloses authentication requirement ('Requires API key') and scope (threads where user is agent or provider), but doesn't mention pagination behavior, rate limits, error conditions, or what the response format looks like. It adds some context but leaves significant behavioral aspects unspecified.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences with zero waste: first states purpose, second adds filtering context, third specifies authentication requirement. Appropriately sized and front-loaded with the core functionality.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a list tool with 3 parameters, 100% schema coverage, but no annotations and no output schema, the description provides basic purpose and authentication context but lacks information about response format, pagination details, or error handling. It's minimally adequate but has clear gaps in behavioral transparency.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description mentions filtering by status but doesn't add meaning beyond what the schema provides about the enum values or other parameters. Baseline 3 is appropriate when schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('List') and resource ('conversation threads on the402.ai'), specifying it shows threads where the user is agent or provider. It doesn't explicitly distinguish from sibling tools like 'get_thread' or 'decline_thread', but the listing purpose is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage by mentioning filtering by status to find active, completed, or disputed threads, but doesn't explicitly state when to use this tool versus alternatives like 'get_thread' (for single thread details) or 'list_purchases' (different resource). No explicit when-not or alternative guidance is provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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

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