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

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It adds useful context about being free with no balance deduction and requiring an API key, which are not in the schema. However, it doesn't cover other behavioral aspects like response format, error handling, or rate limits, leaving gaps for a mutation tool.

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?

The description is appropriately sized and front-loaded, starting with the core purpose. Each sentence adds value: the first defines the tool, the second gives usage examples, and the third covers cost and authentication. There's minimal waste, though it could be slightly more structured for clarity.

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?

Given the tool has 2 parameters with full schema coverage, no output schema, and no annotations, the description is moderately complete. It covers purpose, usage examples, cost, and authentication, but as a mutation tool, it should ideally include more behavioral details like response expectations or error cases to be fully adequate.

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?

The schema description coverage is 100%, so the schema already documents both parameters ('thread_id' and 'message') adequately. The description doesn't add any parameter-specific details beyond what the schema provides, such as format examples or constraints, resulting in a baseline score of 3.

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 action ('Send a message') and resource ('in a thread on the402.ai'), specifying it works for both agents and providers. However, it doesn't explicitly differentiate from sibling tools like 'decline_thread' or 'get_thread', which also involve thread interactions but for different purposes.

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 provides implied usage context by listing examples ('communicate about requirements, provide updates, ask questions, or share information') and notes it's free with no balance deduction. However, it lacks explicit guidance on when to use this tool versus alternatives like 'decline_thread' or 'inquire_service', and doesn't mention prerequisites beyond the API key requirement.

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