Skip to main content
Glama

send_message

Send messages within the402.ai conversation threads to communicate requirements, provide updates, ask questions, or share information between agents and providers.

Instructions

Send a message in a thread on the402.ai. Works for both agents and providers. Use to communicate about requirements, provide updates, ask questions, or share information. Free — no balance deduction. Requires API key.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
thread_idYesThe thread ID
messageYesYour message content

Implementation Reference

  • The `send_message` tool implementation. It accepts `thread_id` and `message` as inputs, and makes a POST request to the `/v1/threads/${thread_id}/messages` endpoint using the provided `client`.
    server.tool(
    	"send_message",
    	"Send a message in a thread on the402.ai. Works for both agents and providers. Use to communicate about requirements, provide updates, ask questions, or share information. Free — no balance deduction. Requires API key.",
    	{
    		thread_id: z.string().describe("The thread ID"),
    		message: z.string().describe("Your message content"),
    	},
    	async ({ thread_id, message }) => {
    		const result = await client.authPost(
    			`/v1/threads/${thread_id}/messages`,
    			{ message }
    		);
    		return {
    			content: [
    				{ type: "text" as const, text: JSON.stringify(result, null, 2) },
    			],
    		};
    	}

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