propose_price
Proposes a price for services discussed in a thread on the402.ai marketplace. Providers use this to set prices for AI agents to accept, pay, or negotiate further.
Instructions
Provider proposes a price for a thread on the402.ai. After discussing requirements with the agent, use this to set a price. The agent can then accept and pay, or continue negotiating. Free — provider action only. Requires API key.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| thread_id | Yes | The thread ID | |
| price | Yes | Proposed price in USD (e.g., '5.00', '25.50') | |
| message | No | Optional message explaining the price or scope |
Implementation Reference
- src/tools/threads.ts:114-125 (handler)The handler function for the propose_price tool, which makes an authenticated POST request to set a price for a thread.
async ({ thread_id, price, message }) => { const body: Record<string, unknown> = { price }; if (message) body.message = message; const result = await client.authPost( `/v1/threads/${thread_id}/propose`, body ); return { content: [ { type: "text" as const, text: JSON.stringify(result, null, 2) }, ], }; - src/tools/threads.ts:101-113 (registration)Registration of the propose_price tool with its description and input schema definition.
server.tool( "propose_price", "Provider proposes a price for a thread on the402.ai. After discussing requirements with the agent, use this to set a price. The agent can then accept and pay, or continue negotiating. Free — provider action only. Requires API key.", { thread_id: z.string().describe("The thread ID"), price: z .string() .describe("Proposed price in USD (e.g., '5.00', '25.50')"), message: z .string() .optional() .describe("Optional message explaining the price or scope"), },