Skip to main content
Glama

declare_supply

Publish supply products by specifying title and price. Buyers automatically match your listings. Returns product_id. Supports optional fields like description, category, stock, and delivery.

Instructions

发布供给商品。买家寻源时会自动匹配你的商品。返回 product_id。title 和 price 必填,其余可选。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYes商品标题
descriptionNo商品描述
category_l1No一级品类
category_l2No二级品类
priceYes单价(单位:分)
price_currencyNo币种,默认 CNY
moqNo最小起订量
stock_quantityNo库存数量
delivery_daysNo交期(天)
service_regionsNo服务区域
image_urlNo商品图片 URL
keywordsNo搜索关键词
contact_nameNo联系人
contact_phoneNo联系电话

Implementation Reference

  • API client method that POSTs to /acap/v1/supply-products to declare a new supply product.
    async declareSupply(data: {
      title: string; description?: string;
      category_l1?: string; category_l2?: string;
      price: number; price_currency?: string;
      moq?: number; stock_quantity?: number;
      delivery_days?: number; service_regions?: string;
      image_url?: string; keywords?: string;
      contact_name?: string; contact_phone?: string;
      extra_attrs?: Record<string, any>; expires_at?: string;
    }) {
      return this.request('POST', '/acap/v1/supply-products', data);
    }
  • MCP tool handler: parses input with DeclareSupplySchema, calls client.declareSupply(), and returns result.
    case 'declare_supply': {
      const p = S.DeclareSupplySchema.parse(args);
      result = await client.declareSupply(p);
      break;
  • Zod validation schema for declare_supply tool input, defining all fields with types and constraints.
    export const DeclareSupplySchema = z.object({
      title: z.string().min(1),
      description: z.string().optional(),
      category_l1: z.string().optional(),
      category_l2: z.string().optional(),
      price: z.number().positive(),
      price_currency: z.string().optional(),
      moq: z.number().int().positive().optional(),
      stock_quantity: z.number().int().nonnegative().optional(),
      delivery_days: z.number().int().positive().optional(),
      service_regions: z.string().optional(),
      image_url: z.string().url().optional(),
      keywords: z.string().optional(),
      contact_name: z.string().optional(),
      contact_phone: z.string().optional(),
    });
  • src/index.ts:504-528 (registration)
    MCP tool registration with name 'declare_supply', description, and JSON Schema input definition (title, price required).
    // ═══ 卖家 — 供给管理 ═══
    {
      name: 'declare_supply',
      description: '发布供给商品。买家寻源时会自动匹配你的商品。返回 product_id。title 和 price 必填,其余可选。',
      inputSchema: {
        type: 'object' as const,
        properties: {
          title: { type: 'string', description: '商品标题' },
          description: { type: 'string', description: '商品描述' },
          category_l1: { type: 'string', description: '一级品类' },
          category_l2: { type: 'string', description: '二级品类' },
          price: { type: 'number', description: '单价(单位:分)' },
          price_currency: { type: 'string', description: '币种,默认 CNY' },
          moq: { type: 'number', description: '最小起订量' },
          stock_quantity: { type: 'number', description: '库存数量' },
          delivery_days: { type: 'number', description: '交期(天)' },
          service_regions: { type: 'string', description: '服务区域' },
          image_url: { type: 'string', description: '商品图片 URL' },
          keywords: { type: 'string', description: '搜索关键词' },
          contact_name: { type: 'string', description: '联系人' },
          contact_phone: { type: 'string', description: '联系电话' },
        },
        required: ['title', 'price'],
      },
    },
  • src/index.ts:136-139 (registration)
    Tool is listed under the 'supply' group in the tool category grouping.
    supply: [
      'declare_supply', 'update_supply', 'list_supply_products',
      'get_supply_product', 'delete_supply_product',
    ],
Behavior3/5

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

Without annotations, the description notes the return of product_id and required fields, but lacks details on creation behavior, error handling, or uniqueness checks.

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 concise sentences front-load the action and return value, with no extraneous information.

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?

With 14 parameters and no output schema, the description minimally covers return value but lacks context on parameter effects, error conditions, or sourcing behavior.

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 covers 100% of parameters with descriptions; the description only restates that title and price are required, adding no new semantics.

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?

Description clearly states the tool publishes a supply product and returns a product_id, distinguishing it from sibling tools like 'update_supply' and 'delete_supply_product'.

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?

Implies usage for listing products for buyers to match when sourcing, but does not explicitly exclude alternatives or provide when-not-to-use guidance.

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/ggqshuai-hub/a2amarket-mcp-server'

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