Skip to main content
Glama
tzangms

shopline-mcp

by tzangms

get_affiliate_campaign_usage

Retrieve order usage statistics for a specific affiliate campaign, including total orders, revenue, and commission details to evaluate campaign performance.

Instructions

取得聯盟行銷活動的訂單使用統計。

【用途】 分析特定聯盟行銷活動帶來的訂單數與銷售額,評估推廣效果。 回傳訂單使用紀錄,可計算總訂單數、總銷售額、佣金金額等。

【呼叫的 Shopline API】

  • GET /v1/affiliate_campaigns/{campaign_id}/order_usage

【回傳結構】 dict 含 campaign_id, total_orders, total_revenue (TWD), items[]。 每筆訂單包含 order_id, order_number, revenue, commission, created_at。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
campaign_idYes聯盟行銷活動 ID(由 list_affiliate_campaigns 回傳的 id 欄位)
Behavior4/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 the API endpoint (GET /v1/affiliate_campaigns/{campaign_id}/order_usage), indicates read-only behavior via 'GET' and '回傳' (returns), and details the return structure including total_orders, total_revenue, and order-level fields. This gives the agent a clear picture of what to expect without hiding side effects.

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 well-organized into labeled sections (用途, API, 回傳結構), each with concise, purposeful content. It avoids redundancy and provides all necessary information in a compact form.

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

Completeness5/5

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

For a simple one-parameter read-only tool with no output schema, the description provides comprehensive context: purpose, API endpoint, and detailed return structure. It covers what the agent needs to know to invoke the tool correctly and interpret the result, with no major gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the schema description already explains campaign_id. The tool description adds value by specifying the source of the ID (from list_affiliate_campaigns) and by referencing campaign_id in the return structure, reinforcing how it is used. This goes beyond the schema's descriptive text.

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 opens with a specific verb and resource: '取得聯盟行銷活動的訂單使用統計' (get campaign order usage stats), and explains the purpose: analyzing order count and revenue to evaluate promotion effectiveness. This clearly distinguishes it from sibling tools like get_affiliate_campaign_detail (campaign settings) and list_affiliate_campaigns (listing campaigns).

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: use this tool when you need to analyze a specific affiliate campaign's order usage, count orders, revenue, and commissions, to assess promotional performance. It does not explicitly mention when not to use it or name alternatives, but the use case is well-defined.

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/tzangms/shoplinemcp'

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