Skip to main content
Glama

set_hosted_strategy

Define hosted auto-response strategies for procurement intents. Set fixed price (cents) or budget ratio (0.0-1.0) to automatically quote on matching categories and budget filters.

Instructions

设置托管自动响应策略。有匹配意图时平台按此策略自动报价。auto_price: 固定报价(分); auto_price_ratio: 按买家预算百分比(如 0.85 = 85%)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
strategy_nameNo策略名称
category_l1Yes匹配品类(一级,必填)
category_l2No匹配品类(二级)
min_budgetNo最低预算过滤
max_budgetNo最高预算过滤
auto_priceNo固定报价(分)
auto_price_ratioNo按预算比例报价(0.0~1.0)
auto_quantityNo可供数量
auto_delivery_daysNo交货天数
auto_messageNo自动附言模板
auto_respondNo是否自动响应(默认 true)

Implementation Reference

  • Zod validation schema for 'set_hosted_strategy' input. Defines optional and required fields with constraints.
    export const SetHostedStrategySchema = z.object({
      strategy_name: z.string().optional(),
      category_l1: z.string().min(1, 'category_l1 为必填项'),
      category_l2: z.string().optional(),
      min_budget: z.number().nonnegative().optional(),
      max_budget: z.number().positive().optional(),
      auto_price: z.number().positive().optional(),
      auto_price_ratio: z.number().min(0).max(1).optional(),
      auto_quantity: z.number().int().positive().optional(),
      auto_delivery_days: z.number().int().positive().optional(),
      auto_message: z.string().optional(),
      auto_respond: z.boolean().optional(),
    });
  • Low-level API client method that sends a POST request to /acap/v1/hosted/strategies with the strategy data.
    async setHostedStrategy(data: {
      strategy_name?: string; category_l1: string; category_l2?: string;
      min_budget?: number; max_budget?: number;
      auto_price?: number; auto_price_ratio?: number;
      auto_quantity?: number; auto_delivery_days?: number;
      auto_message?: string; auto_respond?: boolean;
    }) {
      return this.request('POST', '/acap/v1/hosted/strategies', data);
    }
  • src/index.ts:638-659 (registration)
    Tool registration entry in the MCP tool list. Defines name, description, and JSON Schema inputSchema for the 'set_hosted_strategy' tool.
    // ═══ 卖家 — 托管议价策略 ═══
    {
      name: 'set_hosted_strategy',
      description: '设置托管自动响应策略。有匹配意图时平台按此策略自动报价。auto_price: 固定报价(分); auto_price_ratio: 按买家预算百分比(如 0.85 = 85%)。',
      inputSchema: {
        type: 'object' as const,
        properties: {
          strategy_name: { type: 'string', description: '策略名称' },
          category_l1: { type: 'string', description: '匹配品类(一级,必填)' },
          category_l2: { type: 'string', description: '匹配品类(二级)' },
          min_budget: { type: 'number', description: '最低预算过滤' },
          max_budget: { type: 'number', description: '最高预算过滤' },
          auto_price: { type: 'number', description: '固定报价(分)' },
          auto_price_ratio: { type: 'number', description: '按预算比例报价(0.0~1.0)' },
          auto_quantity: { type: 'number', description: '可供数量' },
          auto_delivery_days: { type: 'number', description: '交货天数' },
          auto_message: { type: 'string', description: '自动附言模板' },
          auto_respond: { type: 'boolean', description: '是否自动响应(默认 true)' },
        },
        required: ['category_l1'],
      },
    },
  • Handler case for 'set_hosted_strategy'. Parses args with SetHostedStrategySchema, then calls client.setHostedStrategy(p).
    // ── 卖家 — 托管议价策略 ──
    case 'set_hosted_strategy': {
      const p = S.SetHostedStrategySchema.parse(args);
      result = await client.setHostedStrategy(p);
      break;
    }
  • src/index.ts:147-149 (registration)
    Groups 'set_hosted_strategy' under the 'hosted_strategy' capability category.
    hosted_strategy: [
      'set_hosted_strategy', 'list_hosted_strategies', 'delete_hosted_strategy',
    ],
Behavior2/5

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

No annotations provided, so description carries full burden. It states the tool configures auto-quoting but does not disclose side effects (e.g., replacing existing strategies), required permissions, or failure conditions. Limited behavioral insight.

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 Chinese sentences front-load the purpose and two key parameters. No wasted words; efficient and direct.

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 11 parameters and no output schema, the description omits behavior for many parameters, success/failure outcomes, and interaction with existing strategies. Lacks completeness for a complex mutation 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?

Schema covers all 11 parameters (100%), so baseline is 3. Description adds value for auto_price and auto_price_ratio (explains units and ratio example) but ignores other parameters like budget filters and quantity. Does not fully compensate for low detail in schema.

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 it sets up a hosted automatic response strategy for auto-quoting on matching intents. It differentiates from siblings like delete by focusing on configuration, but could be more explicit about creating vs updating.

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 provides context (when a matching intent exists) but lacks explicit guidance on when to use this vs alternatives (e.g., list_hosted_strategies or delete_hosted_strategy). No exclusions given.

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