Skip to main content
Glama
tzangms

shopline-mcp

by tzangms

get_refund_by_store

Group return orders by store or channel to calculate refund counts, amounts, and frequently returned products for a date range, helping you assess return performance per store.

Instructions

依門市/通路分析退貨退款分佈。

【用途】取得指定時間區間內的退貨單,並依關聯訂單的門市/通路分群, 計算各門市的退貨筆數、退款金額、最常被退貨的商品,協助評估各通路退貨狀況。 【呼叫的 Shopline API】

  • GET /v1/return_orders(退貨單列表)

  • GET /v1/orders/{order_id}(取得關聯訂單的通路資訊) 【回傳結構】dict 含 period、total_return_orders、stores(各門市退貨統計)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
end_dateYes結束日期 YYYY-MM-DD。建議與 start_date 維持較短區間以加快查詢。
start_dateYes起始日期 YYYY-MM-DD。⚠️ 本工具會逐頁掃描區間內所有訂單,區間越大越慢,請只查實際需要的最小區間(如單週或單月),避免一次查詢過長期間。
Behavior4/5

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

With no annotations, the description carries the burden. It discloses that it calls two underlying Shopline APIs (GET /v1/return_orders and GET /v1/orders/{order_id}), implying per-order lookups, and describes the return structure (dict with period, total_return_orders, stores). It doesn't explicitly state read-only or rate limits, but the 'get/analyze' nature and API calls provide reasonable behavioral expectations.

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 structured with clear sections (purpose, APIs, return structure) and is appropriately sized for a moderately complex tool. The first line states the core function, and each subsequent line adds distinct value without padding.

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 lack of output schema, the description compensates by outlining the return structure and the APIs involved. It covers the tool's analytical purpose, inputs (implicitly via schema), and output shape, though it doesn't detail the 'stores' subfields or error handling, leaving minor gaps.

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 schema already provides 100% coverage for both parameters, including format and performance warnings. The description itself doesn't add parameter-specific details, so a baseline score of 3 is appropriate.

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 specifies a clear action: '依門市/通路分析退貨退款分佈' (analyze return/refund distribution by store/channel) and details the computation (counts, refund amounts, top products). This distinguishes it from siblings like get_refund_summary or list_return_orders, which are broader or different in scope.

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?

It provides context that this is for evaluating channel return status ('協助評估各通路退貨狀況') and specifies the operational scope (date range, grouping by store). It doesn't explicitly name alternative tools or exclusion conditions, but the purpose statement makes its niche clear relative to summary/list tools.

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