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
| Name | Required | Description | Default |
|---|---|---|---|
| thread_id | Yes | The thread ID | |
| message | Yes | Your message content |
Implementation Reference
- src/tools/threads.ts:81-98 (handler)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) }, ], }; }