Skip to main content
Glama

create_service

List a new service on the402.ai marketplace by defining its name, description, pricing, category, and input requirements to make it discoverable by AI agents worldwide.

Instructions

List a new service on the the402.ai marketplace as a provider. Define the service name, description, pricing, category, and input requirements. Your service will be discoverable by AI agents worldwide. Requires API key (provider account).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesService name (clear, descriptive, max 100 chars)
descriptionYesDetailed description of what the service does, who it's for, and what agents will receive
categoryYesService category (e.g., 'data', 'development', 'content', 'security')
priceYesPrice in USD (e.g., '0.50', '25.00')
pricing_modelNofixed = set price, quote_required = negotiate per request (default: fixed)
service_typeNodata_api = instant, automated_service = async processing, human_service = expert work
fulfillment_typeNoHow the service is fulfilled
estimated_deliveryNoEstimated delivery time (e.g., '< 1 minute', '24 hours', '3-5 days')
tagsNoTags for discoverability
input_schemaNoJSON Schema defining required input fields agents must provide when purchasing
webhook_urlNoURL to receive webhook notifications for new orders

Implementation Reference

  • The implementation of the 'create_service' tool, including its registration, Zod schema definition, and handler logic.
    server.tool(
    	"create_service",
    	"List a new service on the the402.ai marketplace as a provider. Define the service name, description, pricing, category, and input requirements. Your service will be discoverable by AI agents worldwide. Requires API key (provider account).",
    	{
    		name: z
    			.string()
    			.describe("Service name (clear, descriptive, max 100 chars)"),
    		description: z
    			.string()
    			.describe(
    				"Detailed description of what the service does, who it's for, and what agents will receive"
    			),
    		category: z
    			.string()
    			.describe(
    				"Service category (e.g., 'data', 'development', 'content', 'security')"
    			),
    		price: z.string().describe("Price in USD (e.g., '0.50', '25.00')"),
    		pricing_model: z
    			.enum(["fixed", "quote_required"])
    			.optional()
    			.describe(
    				"fixed = set price, quote_required = negotiate per request (default: fixed)"
    			),
    		service_type: z
    			.enum(["data_api", "automated_service", "human_service"])
    			.optional()
    			.describe(
    				"data_api = instant, automated_service = async processing, human_service = expert work"
    			),
    		fulfillment_type: z
    			.enum(["instant", "async", "human"])
    			.optional()
    			.describe("How the service is fulfilled"),
    		estimated_delivery: z
    			.string()
    			.optional()
    			.describe(
    				"Estimated delivery time (e.g., '< 1 minute', '24 hours', '3-5 days')"
    			),
    		tags: z.array(z.string()).optional().describe("Tags for discoverability"),
    		input_schema: z
    			.record(z.unknown())
    			.optional()
    			.describe(
    				"JSON Schema defining required input fields agents must provide when purchasing"
    			),
    		webhook_url: z
    			.string()
    			.optional()
    			.describe("URL to receive webhook notifications for new orders"),
    	},
    	async ({
    		name,
    		description,
    		category,
    		price,
    		pricing_model,
    		service_type,
    		fulfillment_type,
    		estimated_delivery,
    		tags,
    		input_schema,
    		webhook_url,
    	}) => {
    		const body: Record<string, unknown> = {
    			name,
    			description,
    			category,
    			price,
    		};
    		if (pricing_model) body.pricing_model = pricing_model;
    		if (service_type) body.service_type = service_type;
    		if (fulfillment_type) body.fulfillment_type = fulfillment_type;
    		if (estimated_delivery) body.estimated_delivery = estimated_delivery;
    		if (tags) body.tags = tags;
    		if (input_schema) body.input_schema = input_schema;
    		if (webhook_url) body.webhook_url = webhook_url;
    
    		const result = await client.authPost("/v1/services", body);
    		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 full burden. It discloses that this is a write operation ('List a new service'), requires authentication ('Requires API key'), and has a global effect ('discoverable by AI agents worldwide'). However, it doesn't mention potential side effects (e.g., if listing fails), rate limits, or error conditions, leaving behavioral 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 front-loaded with the core purpose in the first sentence, followed by supporting details. It's appropriately sized (three sentences) with minimal waste, though 'the the402.ai' has a typo ('the' duplicated). Each sentence adds value: action, parameters, and authentication requirement.

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's complexity (11 parameters, mutation operation, no annotations, no output schema), the description is moderately complete. It covers purpose, key parameters, and authentication, but lacks details on return values, error handling, or operational constraints. For a creation tool with rich input schema, it's adequate but has clear gaps in behavioral context.

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?

Schema description coverage is 100%, so the schema already documents all 11 parameters thoroughly. The description lists some parameters (name, description, pricing, category, input requirements) but doesn't add meaning beyond what the schema provides—it merely echoes them without explaining interactions or constraints. Baseline 3 is appropriate given high schema coverage.

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 ('List a new service') and the resource ('on the the402.ai marketplace as a provider'), with specific details about what gets defined (name, description, pricing, etc.). It distinguishes from siblings like 'update_service' or 'delete_service' by focusing on creation, but doesn't explicitly contrast with other creation tools like 'create_plan'.

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 implies usage context ('as a provider', 'discoverable by AI agents worldwide') and mentions a prerequisite ('Requires API key (provider account)'), but doesn't explicitly state when to use this versus alternatives like 'create_plan' or 'manage_product'. It provides some guidance but lacks clear when/when-not directives.

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