Skip to main content
Glama
PyMC Marketing MCP

PyMC Marketing MCP

by funnelscript

Predict Expected Spend

predict_expected_spend
Read-onlyIdempotent

Predict average transaction spend per customer from a fitted Gamma-Gamma model, with an option to return the top N customers by expected spend.

Instructions

Predict average transaction monetary spend per customer from a fitted Gamma-Gamma value model.

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": {
      "config": "<config>"
    },
    "name": "predict_expected_spend"
  }
}

Input Schema

NameRequiredDescriptionDefault
configYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • removedInput schema / $defs
      Removed value: -{
      -  "PredictExpectedSpendInput": {
      -    "properties": {
      -      "model_id": {
      -        "description": "Fitted monetary value model ID (Gamma-Gamma)",
      -        "title": "Model Id",
      -        "type": "string"
      -      },
      -      "top_n": {
      -        "anyOf": [
      -          {
      -            "maximum": 10000,
      -            "minimum": 1,
      -            "type": "integer"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "description": "Return top N customers by expected spend",
      -        "title": "Top N"
      -      }
      -    },
      -    "required": [
      -      "model_id"
      -    ],
      -    "title": "PredictExpectedSpendInput",
      -    "type": "object"
      -  }
      -}
    • addedInput schema / additionalProperties
      Added value: +false
    • removedInput schema / properties / config / $ref
      Removed value: -"#/$defs/PredictExpectedSpendInput"
    • addedInput schema / properties / config / properties
      Added value: +{
      +  "model_id": {
      +    "description": "Fitted monetary value model ID (Gamma-Gamma)",
      +    "title": "Model Id",
      +    "type": "string"
      +  },
      +  "top_n": {
      +    "default": null,
      +    "description": "Return top N customers by expected spend",
      +    "title": "Top N",
      +    "type": "integer"
      +  }
      +}
    • addedInput schema / properties / config / required
      Added value: +[
      +  "model_id"
      +]
    • addedInput schema / properties / config / title
      Added value: +"PredictExpectedSpendInput"
    • addedInput schema / properties / config / type
      Added value: +"object"
  2. First observedv0.4.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so safety is covered. The description adds that the result derives from a previously fitted model rather than training inline, which is useful context, but says nothing about behavior when model_id is unknown or how many customers are returned when top_n is omitted.

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?

One front-loaded sentence with no filler and the key qualifier ('per customer') early. It is efficient but so terse that it has no room left for the prerequisite or output-shape hints it needs.

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

Completeness3/5

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

For a read-only prediction tool with annotations covering safety and no output schema, the description covers what is predicted but omits the return shape (per-customer expected spend values, truncated by top_n) and the failure mode for a missing/invalid fitted model. Adequate but leaves real gaps an agent would want closed.

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 schema's own descriptions carry both leaf parameters (model_id, top_n), so the effective structured coverage is higher than the reported 0% metric. The description reinforces the model_id semantics by specifying 'fitted Gamma-Gamma value model', though it adds nothing about top_n truncation behavior. A 3-4 range; the model-type clarification earns the 4.

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?

Names a specific verb (predict) and a precise target (average transaction monetary spend per customer) plus the model family (Gamma-Gamma), which distinguishes it from the count-oriented predict_expected_purchases and the broader predict_customer_clv. It stops short of explicitly naming which sibling to use instead, 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 phrase 'from a fitted Gamma-Gamma value model' implies a prerequisite (a model must already be fitted, e.g. via fit_value_model), but the definition never states when to choose this tool over predict_expected_purchases or predict_customer_clv. Usage is implied rather than stated, and there are no exclusions.

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