Skip to main content
Glama

Abandoned Cart Analysis

ps_abandoned_cart_analysis
Read-onlyIdempotent

Identify abandoned carts by comparing carts with orders, enrich them with customer data, and report abandoned count, conversion rate, and cart list for a chosen lookback period.

Instructions

Analyse shopping carts that were not converted to orders (abandoned carts).

Crosses carts with orders to identify carts without a matching order. Enriches with customer data when available.

Args:

  • days: Lookback period in days (default: 30)

  • limit: Max carts to analyse (default: 200)

Returns: Abandoned cart count, conversion rate, and list of abandoned carts with customer info.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "ps_abandoned_cart_analysis"
  }
}

Input Schema

NameRequiredDescriptionDefault
daysNoLookback period in days
limitNoMax carts to analyse

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, and closed-world behavior, so the safety profile is covered. The description adds genuine substance beyond that: the join logic used to derive results and the conditional enrichment with customer data when available, which tells the agent output may be unevenly populated.

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 narrative is front-loaded with the core operation and the method, then moves to a compact Args/Returns structure. The Args block is redundant with a fully documented schema, which costs a little, but the Returns line earns its place given there is no output schema.

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?

For a two-parameter, read-only analytics tool with no output schema, the definition supplies the mechanism, both parameter defaults, and an explicit list of returned fields (count, conversion rate, cart list with customer info). What remains unsaid - how date ranges are bounded or how customers are matched - is minor for this complexity.

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% and the schema already carries types, defaults, and min/max bounds for both parameters. The description's Args block simply restates the same defaults (30 days, 200 carts) without adding interpretation, so it neither compensates for nor extends the schema.

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 ("Analyse shopping carts that were not converted to orders") and goes further by explaining the mechanism: crossing carts with orders to find those lacking a match. This clearly separates it from cart-retrieval siblings like ps_get_cart, though no sibling is named explicitly.

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 tool's subject matter; there is no statement of when to prefer this over ps_average_basket_analysis or a plain cart listing, and no exclusions or prerequisites (e.g., data freshness) are given. The scope is narrow enough that an agent can infer intent, but it is inference.

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