Skip to main content
Glama

create_purchase_order

Record stock receipts from suppliers by creating a purchase order in Shopline POS with supplier ID and item details.

Instructions

[WRITE] 建立新採購單。

【用途】 在 Shopline POS 系統中建立一筆新的採購單,用於記錄向供應商進貨的資訊。

【呼叫的 Shopline API】

  • POST /v1/pos/purchase_orders

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

【副作用】

  • 在 POS 採購單列表中新增一筆記錄

  • 採購單建立後可進行後續入庫確認操作

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
purchase_order_dataYes採購單資料,例如 {supplier_id, items: [{sku, quantity, cost}, ...], ...}
Behavior4/5

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

Description explicitly lists side effects: creates a new record and enables subsequent inventory confirmation. It also mentions the API endpoint. No annotations provided, so description carries full burden and does well.

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-organized with [WRITE] prefix, separate sections for purpose, API, return structure, and side effects. Every sentence is informative and concise, no redundancy.

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?

Despite no output schema, description specifies return dict structure. It also covers side effects. Given the one complex parameter and no annotations, the description is fairly complete and actionable for an agent.

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 single parameter 'purchase_order_data' is described with an example structure including supplier_id and items array, adding meaning beyond the schema's generic object type. Schema coverage is 100% but description adds value.

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 creates a new purchase order in the POS system with the [WRITE] tag and explains it records supplier purchases. Distinct from sibling tools like list_purchase_orders or delete_purchase_orders.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Description describes its purpose but does not provide explicit guidance on when to use vs alternatives or exclusions. It is implied for creating new orders, but lacks exclusion criteria.

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