Skip to main content
Glama

Get Customer Order History

ps_get_customer_orders
Read-onlyIdempotent

Retrieves a customer's order history by customer ID, including totals, statuses, payment methods, dates, and a summary of total orders and spend.

Instructions

Get the complete order history for a customer, with totals and statuses.

Args:

  • id_customer: Customer ID (required)

  • limit: Max orders to return (default: 50)

Returns: Array of orders sorted by date (newest first) with id, reference, state, payment method, totals, and dates. Also returns customer summary (total orders, total spent).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "id_customer": "<id_customer>"
    },
    "name": "ps_get_customer_orders"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMax orders to return
id_customerYesCustomer ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.1.0

TDQS

A3.5/5.0
Behavior3/5

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

The annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is fully covered without prose. Beyond that the description adds only sorting (newest first) and the default limit of 50, plus the presence of a customer summary; it says nothing about pagination behavior, truncation when limit is hit, or whether totals are lifetime or page-scoped.

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 short and front-loaded, with the purpose in the first sentence and Args/Returns cleanly delimited. The Args block largely duplicates the input schema, which is mild waste, but nothing is bloated or buried.

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?

There is no output schema, and the Returns sentence usefully enumerates the order fields (id, reference, state, payment method, totals, dates) and the customer summary, which is exactly the burden the description must carry. The main remaining gap for a read tool of this complexity is truncation/pagination semantics when limit is reached.

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?

Schema description coverage is 100%, with both parameters typed and documented, including the default of 50 and the 1–200 range enforced by the schema. The Args section simply restates the schema ('Customer ID (required)', 'Max orders to return (default: 50)') and adds no format, unit, or edge-case meaning, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource ('Get the complete order history for a customer') plus the scope of what is included (totals and statuses). It is clear enough to separate from a single-order getter, but it never names or contrasts a sibling like ps_list_orders or ps_get_order, so sibling differentiation is left to inference.

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?

Usage is only implied by the scoping phrase 'for a customer' — an agent can infer this is the per-customer history call rather than a global order listing. There is no explicit when-to-use, when-not-to-use, or named alternative, and no stated prerequisites such as whether the customer must exist.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools