Skip to main content
Glama

get_promotion_roi

Calculates the return on investment (ROI) of promotional activities by matching promotion data with order sales within a specified date range.

Instructions

交叉比對促銷活動與銷售數據,計算各活動的 ROI。

【用途】取得指定時間區間內活躍的促銷活動,並比對訂單中的 promotion_items, 統計每個活動帶來的訂單數、營業額、折扣金額,計算平均每單折扣與折扣占比。 【呼叫的 Shopline API】

  • GET /v1/promotions(促銷活動列表)

  • GET /v1/orders/search(訂單查詢) 【回傳結構】dict 含 period、total_promotions、promotions(各活動 ROI 明細)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
start_dateYes起始日期 YYYY-MM-DD
end_dateYes結束日期 YYYY-MM-DD
Behavior3/5

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

The description reveals that the tool calls two internal APIs (GET /v1/promotions and GET /v1/orders/search) and returns a dict. However, it does not disclose potential side effects (none expected), rate limits, or performance implications. Without annotations, more explicit safety guarantees would be beneficial.

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?

The description is well-structured with labeled sections (用途, 呼叫的 API, 回傳結構) and is concise at around 100 characters. Every sentence adds value, though minor redundancy exists (e.g., repeating 'promotion_items').

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

Completeness4/5

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

Given the tool's complexity (composite operation with two APIs) and no output schema, the description provides a clear return structure and explains the business logic. It lacks details on edge cases (e.g., no promotions or orders) and prerequisites, but overall covers the essential aspects.

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?

The input schema already provides clear descriptions for both parameters (start_date and end_date with YYYY-MM-DD format). The description adds context that these define the time range for active promotions, but this does not significantly enhance understanding beyond the schema, leading to a baseline score.

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 the tool's purpose: cross-referencing promotion and sales data to calculate ROI for each promotion. It specifies inputs (date range), outputs (orders count, revenue, discount, ROI), and the return structure, distinguishing it from siblings like list_promotions or get_promotion_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?

The description indicates when to use the tool (to get ROI for promotions in a date range) and implies its aggregation nature. It does not explicitly state when not to use it or name alternatives, but the context is clear enough for an agent to infer correct usage.

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