Skip to main content
Glama

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
NameRequiredDescriptionDefault
thread_idYesThe thread ID
priceYesProposed price in USD (e.g., '5.00', '25.50')
messageNoOptional message explaining the price or scope

Implementation Reference

  • 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) },
    		],
    	};
  • 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"),
    	},

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