Skip to main content
Glama

update_service

Modify service listings on the402.ai marketplace. Change price, description, status, delivery time, or other fields to keep offerings current.

Instructions

Update an existing service listing on the402.ai. Change price, description, status (active/inactive), or any other field. Requires API key (service owner only).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
service_idYesThe service ID to update
nameNoNew service name
descriptionNoNew description
priceNoNew price in USD
statusNoSet active or inactive
estimated_deliveryNoNew estimated delivery time
tagsNoNew tags
input_schemaNoNew input schema
webhook_urlNoNew webhook URL

Implementation Reference

  • Handler function for the update_service tool. It gathers non-empty parameters and performs an authenticated PUT request to the API.
    async ({
    	service_id,
    	name,
    	description,
    	price,
    	status,
    	estimated_delivery,
    	tags,
    	input_schema,
    	webhook_url,
    }) => {
    	const body: Record<string, unknown> = {};
    	if (name) body.name = name;
    	if (description) body.description = description;
    	if (price) body.price = price;
    	if (status) body.status = status;
    	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.authPut(`/v1/services/${service_id}`, body);
    	return {
    		content: [
    			{ type: "text" as const, text: JSON.stringify(result, null, 2) },
    		],
    	};
    }
  • Zod schema definition for update_service tool inputs.
    {
    	service_id: z.string().describe("The service ID to update"),
    	name: z.string().optional().describe("New service name"),
    	description: z.string().optional().describe("New description"),
    	price: z.string().optional().describe("New price in USD"),
    	status: z
    		.enum(["active", "inactive"])
    		.optional()
    		.describe("Set active or inactive"),
    	estimated_delivery: z
    		.string()
    		.optional()
    		.describe("New estimated delivery time"),
    	tags: z.array(z.string()).optional().describe("New tags"),
    	input_schema: z
    		.record(z.unknown())
    		.optional()
    		.describe("New input schema"),
    	webhook_url: z.string().optional().describe("New webhook URL"),
    },
  • Registration of the update_service tool with the MCP server.
    server.tool(
    	"update_service",
    	"Update an existing service listing on the402.ai. Change price, description, status (active/inactive), or any other field. Requires API key (service owner only).",
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses that the tool requires an API key and is restricted to service owners, which is crucial for permissions. However, it lacks details on mutation behavior (e.g., partial updates, validation, error handling, or response format), leaving gaps for an agent to infer.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two concise sentences with zero waste: the first states the purpose and scope, and the second specifies prerequisites. It is front-loaded with the core functionality, making it efficient for an agent to parse.

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?

For a mutation tool with 9 parameters, no annotations, and no output schema, the description is incomplete. It covers authentication needs but lacks details on behavioral traits (e.g., idempotency, side effects) and output expectations. Given the complexity, it should provide more guidance on usage and results.

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 fully documents all 9 parameters. The description adds minimal value beyond the schema by listing examples of fields that can be changed ('price, description, status, or any other field'), but does not provide additional syntax, constraints, or usage context for parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Update') and resource ('an existing service listing on the402.ai'), with specific examples of what can be changed ('price, description, status, or any other field'). It distinguishes from sibling tools like 'create_service' (for new listings) and 'delete_service' (for removal).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use this tool: to modify an existing service listing. It implicitly contrasts with 'create_service' for new listings, but does not explicitly mention when not to use it or name specific alternatives among siblings like 'manage_service' or 'update_profile'.

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