Skip to main content
Glama

get_affiliate_campaign_usage

Retrieves order usage statistics for an affiliate campaign, including total orders, revenue, and commission details, to evaluate promotion effectiveness.

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 欄位)
Behavior3/5

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

States API call (GET) implying read-only behavior, but does not explicitly declare non-destructive nature or other traits like rate limits. Without annotations, description partially compensates.

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

Conciseness4/5

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

Well-structured with sections (purpose, usage, API, return), but slightly verbose. Each sentence adds value; no wasted text.

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?

Given no output schema, description provides return structure (dict with fields and units TWD). Covers all needed info for agent to invoke and parse results.

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

Parameters5/5

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

Adds crucial info beyond schema: campaign_id is from list_affiliate_campaigns' id field, guiding the agent to chain calls correctly.

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?

Clearly states '取得...訂單使用統計' (get order usage statistics) with detailed description of returned data (orders, revenue, commission), distinguishing it from sibling get_affiliate_campaign_detail.

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 describes when to use: '分析特定聯盟行銷活動的訂單數與銷售額,評估推廣效果' (analyze orders and revenue for campaign performance). No explicit when-not-to-use but context is clear.

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/asgard-ai-platform/mcp-shopline'

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