Skip to main content
Glama

Customer LTV, cohorts and LTV:CAC

shopify_get_ltv
Read-only

Customer lifetime value from Shopify orders: average net sales per new customer within N days of their first order (LTV), contribution LTV after cost settings, repeat rate, new-customer CAC and LTV:CAC for Google, Meta, unattributed and all, plus monthly acquisition cohorts. Use for LTV, CAC payback, repeat purchase, retention or cohort questions.

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": "shopify_get_ltv"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNo
daysNo
limitNo
actionNo
statusNo
date_toNo
page_idNo
sort_byNo
user_idNo
platformNo
site_urlNo
client_idNo
date_fromNo
ad_accountNo
ig_user_idNo
user_emailNo
window_daysNo
range_presetNo
activity_onlyNo
campaign_nameNo
property_nameNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / platform
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Platform"
      +}
    • addedInput schema / properties / window_days
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Window Days"
      +}
  2. Added

TDQS

B3.3/5.0
Behavior4/5

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

Annotations already establish read-only and closed-world, so the description focuses on what is actually computed: LTV anchored to N days after first order, a contribution variant that depends on cost settings, attribution split across Google/Meta/unattributed/all, and monthly acquisition cohorts. That is meaningful disclosure of calculation logic beyond the annotations. It stops short of stating data freshness, sync requirements, or default behavior when no cost settings exist.

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?

Two sentences, no filler, and the metric inventory is front-loaded before the use-case line. The first sentence is dense with enumerated metrics but every clause names a distinct output, so nothing is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The output side is covered by the output schema and the annotations, but for a 21-parameter tool with 0% schema description coverage the definition leaves too much open: which parameters are needed to get CAC by platform, what values platform accepts, and how date_from/date_to/range_preset interact are all absent. An agent can name the tool's purpose but cannot confidently parameterize it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 21 parameters with zero description coverage, so the description carries the full burden and largely fails it. Only the window concept ('within N days of their first order') loosely maps to days/window_days without resolving which one controls what, and parameters such as platform, range_preset, ad_account, activity_only, sort_by, client_id, and site_url are entirely unexplained.

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?

States a specific resource and verb: customer lifetime value computed from Shopify orders, with named outputs (average net sales per new customer within N days of first order, contribution LTV, repeat rate, CAC, LTV:CAC by channel, monthly cohorts). It is clear what the tool returns. It does not explicitly differentiate itself from the sibling profit_get_ltv, so a 4 rather than a 5.

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?

The closing sentence lists use cases (LTV, CAC payback, repeat purchase, retention, cohort questions), which gives clear implied context. However, it gives no exclusions, no prerequisites (e.g., cost settings required for contribution LTV), and no pointer to which sibling to use for profit-based rather than sales-based LTV.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.