Skip to main content
Glama

update_listing

Update an existing capability listing by changing its price, endpoint, or maximum latency. Requires a wallet.

Instructions

Alias of publish_listing — same idempotent upsert. Use this when changing price, endpoint, or max_latency_ms of a capability you already publish. Requires a wallet.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
capabilityYes
price_usdcYes
endpointYes
max_latency_msYes
first_call_freeNo
currencyNo
chainNoSettlement chain for this listing. Only 'base' (Base mainnet) is accepted by the public registry.

Implementation Reference

  • Tool definition and input schema for update_listing — registered as an alias of publish_listing in the tools array.
    {
      name: "update_listing",
      description:
        "Alias of `publish_listing` — same idempotent upsert. Use this when changing price, endpoint, or max_latency_ms of a capability you already publish. Requires a wallet.",
      inputSchema: {
        type: "object",
        properties: {
          capability: { type: "string" },
          price_usdc: { type: "string" },
          endpoint: { type: "string" },
          max_latency_ms: { type: "number" },
          first_call_free: { type: "boolean" },
          currency: { type: "string", enum: ["USDC"] },
          chain: {
            type: "string",
            enum: ["base"],
            description:
              "Settlement chain for this listing. Only 'base' (Base mainnet) is accepted by the public registry.",
          },
        },
        required: ["capability", "price_usdc", "endpoint", "max_latency_ms"],
      },
    },
  • Handler for update_listing — delegates to client.publishListing() with the same logic as publish_listing.
    case "publish_listing":
    case "update_listing": {
      if (!client) return walletRequired(name);
      const listing = await client.publishListing({
        capability: String(args.capability),
        price_usdc: String(args.price_usdc),
        endpoint: String(args.endpoint),
        max_latency_ms: Number(args.max_latency_ms),
        first_call_free: Boolean(args.first_call_free ?? false),
        currency: (args.currency as "USDC" | undefined) ?? "USDC",
        chain: (args.chain as Listing["chain"] | undefined) ?? "base",
      } as Omit<Listing, "agent_id" | "signature">);
      return ok({ listing });
    }
  • SDK client method publishListing — signs the listing payload with the wallet and POSTs it to the registry.
    async publishListing(
      listing: Omit<Listing, "agent_id" | "signature">,
    ): Promise<Listing> {
      const partial = { ...listing, agent_id: this.agentId };
      const signature = await this.wallet.signTypedPayload(partial);
      const signed: Listing = { ...partial, signature };
      await this.transport.json("/v1/listings", {
        method: "POST",
        body: JSON.stringify(signed),
      });
      return signed;
    }
  • Zod schema and TypeScript type for the Listing object used by publishListing/update_listing.
    export const ListingSchema = z.object({
      agent_id: z.string().regex(/^0x[a-fA-F0-9]{40}$/) as z.ZodType<AgentId>,
      capability: z.string(),
      price_usdc: z.string().regex(/^\d+(\.\d+)?$/),
      currency: z.literal("USDC").default("USDC"),
      chain: z.literal("base").default("base"),
      max_latency_ms: z.number().int().positive(),
      first_call_free: z.boolean().default(false),
      endpoint: z.string().url(),
      signature: z.string().regex(/^0x[a-fA-F0-9]+$/) as z.ZodType<Hex>,
    });
    
    export type Listing = z.infer<typeof ListingSchema>;
Behavior3/5

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

No annotations exist, so description carries full burden. It discloses 'idempotent upsert' and wallet requirement, but lacks details on authentication, side effects, or response behavior. Adequate but not comprehensive.

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?

Two sentences, front-loaded with key info (alias, idempotent, usage). No wasted words; every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema, no annotations, and low parameter coverage. The description covers purpose and key constraints but leaves significant gaps: five parameters undocumented, no error handling, no return value explanation. Incomplete for a 7-param tool.

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?

With only 14% schema description coverage, the description should compensate. It mentions updating price, endpoint, and max_latency_ms, mapping to three of seven params, but omits capability, first_call_free, currency, chain. Adds some value but insufficient for low coverage.

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 it is an alias of publish_listing, an idempotent upsert. It identifies the verb (update/upsert) and resource (listing), differentiating it from siblings by noting it's an alias.

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?

Explicitly says 'Use this when changing price, endpoint, or max_latency_ms of a capability you already publish' and notes 'Requires a wallet.' It provides clear context but does not explicitly exclude alternatives or mention when not to use it.

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/Swarmwage/swarmwage'

If you have feedback or need assistance with the MCP directory API, please join our Discord server