Skip to main content
Glama

create_metafield

Create a custom app metafield to store additional merchant data or settings. Provide namespace, key, value, and value type to add a new record.

Instructions

[WRITE] 建立商家應用元欄位(App Metafield)。

【用途】 為商家建立自定義的元欄位,用於儲存應用程式所需的額外商家設定或資料。

【呼叫的 Shopline API】

  • POST /merchants/current/app-metafields

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

【副作用】

  • 在商家的應用元欄位中新增一筆記錄

  • 相同 namespace + key 組合若已存在,可能會失敗或覆蓋(取決於 Shopline 實作)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
metafield_dataYes元欄位資料,例如:{"namespace": "my_app", "key": "custom_key", "value": "custom_value", "value_type": "string"}
Behavior5/5

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

With no annotations provided, the description fully discloses behavior: it is a write operation (marked [WRITE]), lists side effects (adding a record, potential idempotency issues), and provides the API endpoint. It also details the return structure. This is thorough behavioral transparency.

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 sections for purpose, API, return, and side effects. It is concise yet comprehensive, though slightly verbose compared to an ideal minimal description. Each section adds value.

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, the description adequately explains the return structure. It covers all essential aspects: purpose, API endpoint, input example, side effects, and behavior on duplicates. For a single-parameter tool, it is complete and leaves no significant gaps.

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?

The input schema has 100% coverage with a description that includes an example. The description further adds context by explaining the purpose of the metafield data and the importance of the namespace+key combination, which goes beyond the schema's basic description.

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 explicitly states the tool creates app metafields for merchants, specifying the resource and action. It distinguishes itself from other create tools by focusing on metafields and mentioning namespace and key, which is unique to this tool.

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 includes a usage section explaining when to create metafields for storing app settings. It also warns about potential failure or overwrite if the same namespace+key exists, providing guidance on constraints. However, it does not explicitly compare to other tools or state when not to use it.

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