Skip to main content
Glama
tzangms

shopline-mcp

by tzangms

update_customer_store_credits

Adjust a customer's store credit balance by adding or deducting funds for recharges, refunds, or promotional rewards.

Instructions

[WRITE] 調整客戶儲值金餘額。

【用途】 增加或扣除客戶儲值金,常用於儲值金充值、退款補償、活動贈送等場景。

【呼叫的 Shopline API】

  • PUT /v1/customers/{customer_id}/store-credits

【回傳結構】 dict 含 success: bool, resource_id: str, message: str。

【副作用】

  • 客戶儲值金餘額立即變動

  • 異動紀錄會寫入客戶的儲值金歷史(可透過 get_customer_profile 查看)

  • 扣除後如餘額不足,API 可能回傳錯誤

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteNo調整備註/原因
amountYes調整金額(正數=增加,負數=扣除)
customer_idYes客戶內部 ID
Behavior5/5

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

With no annotations provided, the description fully discloses the write behavior via the '[WRITE]' tag and side effects: immediate balance change, history record via get_customer_profile, and possible insufficient-balance error. It also gives the return structure, making behavioral expectations transparent.

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?

Description is well-structured with clear sections (purpose, API, return, side effects) and front-loaded with the write intent. Every sentence provides distinct value; no fluff.

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?

The description is complete for a mutation tool: it states purpose, underlying API, return schema, and side effects/error conditions. Without an output schema annotation, providing the return structure is valuable. No significant gaps are apparent.

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 covers 100% of parameters with descriptions, including amount's positive/negative semantics and note as a reason. The description adds no additional parameter-level detail beyond the schema, so it meets the baseline for high schema coverage.

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 '[WRITE] 調整客戶儲值金餘額' and explicitly states '增加或扣除客戶儲值金', using a specific verb and resource. It clearly identifies the tool as adjusting store credit balances, distinguishing it from sibling read tools like list_store_credits and point adjustment tools like adjust_customer_member_points.

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 lists concrete use cases: '儲值金充值、退款補償、活動贈送' (top-up, refund compensation, event gifting), giving clear context for when to use. However, it does not explicitly name alternatives or state when not to use this tool, so it falls short of the top score.

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