Skip to main content
Glama

update_customer_store_credits

Adjust a customer's store credit balance by adding or deducting credits for top-ups, refunds, or promotional rewards. Updates balance immediately and logs the change in the customer's credit history.

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
customer_idYes客戶內部 ID
amountYes調整金額(正數=增加,負數=扣除)
noteNo調整備註/原因
Behavior4/5

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

No annotations provided, so description carries full burden. Lists key side effects: immediate balance change, history logged, error if insufficient balance. Missing auth or rate limits, but sufficient for typical use.

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, front-loaded purpose. Includes API endpoint and return structure, which is informative but slightly verbose. Could be trimmed without losing clarity.

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?

No output schema, but description explains return dict. Covers side effects and parameter meaning. With 3 params and no nested objects, it is fairly complete. Could mention error responses in more detail.

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%, so parameters are well documented. Description adds value by explaining that positive amount adds and negative deducts, which is important for correct usage.

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?

Description clearly states it adjusts store credits with specific use cases (top-up, refund, gifts). Distinguishes from sibling tools like adjust_customer_member_points (different resource) and list_store_credits (read vs write).

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?

Provides clear context with example scenarios, but does not explicitly state when not to use or compare to alternatives. Good for a specific operation.

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