Skip to main content
Glama
PyMC Marketing MCP

PyMC Marketing MCP

by funnelscript

Submit Fit Mmm Job

submit_fit_mmm_job
Idempotent

Submit an asynchronous MMM fitting job that runs in the background, enabling you to continue other tasks while Bayesian model training completes.

Instructions

Submit an asynchronous MMM fitting job that executes in the background without blocking.

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

Input Schema

NameRequiredDescriptionDefault
configYes
idempotency_keyNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changed
    • removedInput schema / $defs
      Removed value: -{
      -  "AdstockConfig": {
      -    "properties": {
      -      "l_max": {
      -        "default": 8,
      -        "description": "Maximum lag periods for adstock",
      -        "maximum": 52,
      -        "minimum": 1,
      -        "title": "L Max",
      -        "type": "integer"
      -      },
      -      "normalize": {
      -        "default": true,
      -        "description": "Whether to normalize adstock weights to sum to 1",
      -        "title": "Normalize",
      -        "type": "boolean"
      -      },
      -      "type": {
      -        "default": "geometric",
      -        "enum": [
      -          "geometric",
      -          "delayed",
      -          "weibull_cdf",
      -          "weibull_pdf",
      -          "binomial",
      -          "none"
      -        ],
      -        "title": "Type",
      -        "type": "string"
      -      }
      -    },
      -    "title": "AdstockConfig",
      -    "type": "object"
      -  },
      -  "ChannelPriorConfig": {
      -    "description": "Per-channel prior parameters and/or transform class selection.",
      -    "properties": {
      -      "adstock": {
      -        "anyOf": [
      -          {
      -            "$ref": "#/$defs/AdstockConfig"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null
      -      },
      -      "priors": {
      -        "additionalProperties": {
      -          "$ref": "#/$defs/PriorDistributionConfig"
      -        },
      -        "description": "Per-parameter prior overrides (e.g. {'adstock_alpha': PriorDistributionConfig(...)})",
      -        "title": "Priors",
      -        "type": "object"
      -      },
      -      "saturation": {
      -        "anyOf": [
      -          {
      -            "$ref": "#/$defs/SaturationConfig"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null
      -      }
      -    },
      -    "title": "ChannelPriorConfig",
      -    "type": "object"
      -  },
      -  "FitMMMInput": {
      -    "properties": {
      -      "adstock": {
      -        "$ref": "#/$defs/AdstockConfig",
      -        "description": "Global adstock configuration (default for all channels)"
      -      },
      -      "channel_columns": {
      -        "description": "Media spend column names",
      -        "items": {
      -          "type": "string"
      -        },
      -        "maxItems": 40,
      -        "minItems": 1,
      -        "title": "Channel Columns",
      -        "type": "array"
      -      },
      -      "channel_priors": {
      -        "additionalProperties": {
      -          "$ref": "#/$defs/ChannelPriorConfig"
      -        },
      -        "description": "Per-channel adstock and/or saturation overrides. Keys must be a subset of channel_columns. Channels not listed use the global adstock/saturation config.",
      -        "title": "Channel Priors",
      -        "type": "object"
      -      },
      -      "control_columns": {
      -        "description": "Non-media control columns",
      -        "items": {
      -          "type": "string"
      -        },
      -        "maxItems": 100,
      -        "title": "Control Columns",
      -        "type": "array"
      -      },
      -      "dataset_id": {
      -        "description": "Registered dataset ID",
      -        "title": "Dataset Id",
      -        "type": "string"
      -      },
      -      "date_column": {
      -        "description": "Column containing temporal dates",
      -        "title": "Date Column",
      -        "type": "string"
      -      },
      -      "dims": {
      -        "description": "Multidimensional panel dimensions (e.g. ['geo'])",
      -        "items": {
      -          "type": "string"
      -        },
      -        "maxItems": 4,
      -        "title": "Dims",
      -        "type": "array"
      -      },
      -      "sampler": {
      -        "$ref": "#/$defs/SamplerConfig",
      -        "description": "NUTS sampler configuration"
      -      },
      -      "saturation": {
      -        "$ref": "#/$defs/SaturationConfig",
      -        "description": "Global saturation configuration (default for all channels)"
      -      },
      -      "target_column": {
      -        "description": "Outcome KPI column (e.g. revenue, conversions)",
      -        "title": "Target Column",
      -        "type": "string"
      -      },
      -      "yearly_seasonality": {
      -        "anyOf": [
      -          {
      -            "maximum": 12,
      -            "minimum": 1,
      -            "type": "integer"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "description": "Order of Fourier yearly seasonality",
      -        "title": "Yearly Seasonality"
      -      }
      -    },
      -    "required": [
      -      "dataset_id",
      -      "date_column",
      -      "target_column",
      -      "channel_columns"
      -    ],
      -    "title": "FitMMMInput",
      -    "type": "object"
      -  },
      -  "PriorDistributionConfig": {
      -    "properties": {
      -      "dist": {
      -        "default": "Beta",
      -        "description": "Prior distribution family (e.g. Beta, Gamma, HalfNormal, Normal)",
      -        "title": "Dist",
      -        "type": "string"
      -      },
      -      "kwargs": {
      -        "additionalProperties": {
      -          "type": "number"
      -        },
      -        "description": "Distribution parameters (e.g. alpha, beta, sigma, mu)",
      -        "title": "Kwargs",
      -        "type": "object"
      -      }
      -    },
      -    "title": "PriorDistributionConfig",
      -    "type": "object"
      -  },
      -  "SamplerConfig": {
      -    "properties": {
      -      "chains": {
      -        "default": 4,
      -        "description": "Number of MCMC chains",
      -        "maximum": 8,
      -        "minimum": 2,
      -        "title": "Chains",
      -        "type": "integer"
      -      },
      -      "draws": {
      -        "default": 1000,
      -        "description": "Posterior draws per chain",
      -        "maximum": 20000,
      -        "minimum": 50,
      -        "title": "Draws",
      -        "type": "integer"
      -      },
      -      "random_seed": {
      -        "default": 42,
      -        "description": "Deterministic random seed",
      -        "title": "Random Seed",
      -        "type": "integer"
      -      },
      -      "target_accept": {
      -        "default": 0.9,
      -        "description": "Target acceptance rate for NUTS",
      -        "maximum": 0.999,
      -        "minimum": 0.8,
      -        "title": "Target Accept",
      -        "type": "number"
      -      },
      -      "tune": {
      -        "default": 1000,
      -        "description": "Tuning/warmup iterations per chain",
      -        "maximum": 20000,
      -        "minimum": 50,
      -        "title": "Tune",
      -        "type": "integer"
      -      }
      -    },
      -    "title": "SamplerConfig",
      -    "type": "object"
      -  },
      -  "SaturationConfig": {
      -    "properties": {
      -      "type": {
      -        "default": "logistic",
      -        "enum": [
      -          "logistic",
      -          "tanh",
      -          "tanh_baselined",
      -          "michaelis_menten",
      -          "hill",
      -          "hill_sigmoid",
      -          "inverse_scaled_logistic",
      -          "log",
      -          "root",
      -          "none"
      -        ],
      -        "title": "Type",
      -        "type": "string"
      -      }
      -    },
      -    "title": "SaturationConfig",
      -    "type": "object"
      -  }
      -}
    • addedInput schema / additionalProperties
      Added value: +false
    • removedInput schema / properties / config / $ref
      Removed value: -"#/$defs/FitMMMInput"
    • addedInput schema / properties / config / properties
      Added value: +{
      +  "adstock": {
      +    "description": "Global adstock configuration (default for all channels)",
      +    "properties": {
      +      "l_max": {
      +        "default": 8,
      +        "description": "Maximum lag periods for adstock",
      +        "maximum": 52,
      +        "minimum": 1,
      +        "title": "L Max",
      +        "type": "integer"
      +      },
      +      "normalize": {
      +        "default": true,
      +        "description": "Whether to normalize adstock weights to sum to 1",
      +        "title": "Normalize",
      +        "type": "boolean"
      +      },
      +      "type": {
      +        "default": "geometric",
      +        "enum": [
      +          "geometric",
      +          "delayed",
      +          "weibull_cdf",
      +          "weibull_pdf",
      +          "binomial",
      +          "none"
      +        ],
      +        "title": "Type",
      +        "type": "string"
      +      }
      +    },
      +    "title": "AdstockConfig",
      +    "type": "object"
      +  },
      +  "channel_columns": {
      +    "description": "Media spend column names",
      +    "items": {
      +      "type": "string"
      +    },
      +    "maxItems": 40,
      +    "minItems": 1,
      +    "title": "Channel Columns",
      +    "type": "array"
      +  },
      +  "channel_priors": {
      +    "additionalProperties": {
      +      "description": "Per-channel prior parameters and/or transform class selection.",
      +      "properties": {
      +        "adstock": {
      +          "anyOf": [
      +            {
      +              "properties": {
      +                "l_max": {
      +                  "default": 8,
      +                  "description": "Maximum lag periods for adstock",
      +                  "maximum": 52,
      +                  "minimum": 1,
      +                  "title": "L Max",
      +                  "type": "integer"
      +                },
      +                "normalize": {
      +                  "default": true,
      +                  "description": "Whether to normalize adstock weights to sum to 1",
      +                  "title": "Normalize",
      +                  "type": "boolean"
      +                },
      +                "type": {
      +                  "default": "geometric",
      +                  "enum": [
      +                    "geometric",
      +                    "delayed",
      +                    "weibull_cdf",
      +                    "weibull_pdf",
      +                    "binomial",
      +                    "none"
      +                  ],
      +                  "title": "Type",
      +                  "type": "string"
      +                }
      +              },
      +              "title": "AdstockConfig",
      +              "type": "object"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "default": null
      +        },
      +        "priors": {
      +          "additionalProperties": {
      +            "properties": {
      +              "dist": {
      +                "default": "Beta",
      +                "description": "Prior distribution family (e.g. Beta, Gamma, HalfNormal, Normal)",
      +                "title": "Dist",
      +                "type": "string"
      +              },
      +              "kwargs": {
      +                "additionalProperties": {
      +                  "type": "number"
      +                },
      +                "description": "Distribution parameters (e.g. alpha, beta, sigma, mu)",
      +                "title": "Kwargs",
      +                "type": "object"
      +              }
      +            },
      +            "title": "PriorDistributionConfig",
      +            "type": "object"
      +          },
      +          "description": "Per-parameter prior overrides (e.g. {'adstock_alpha': PriorDistributionConfig(...)})",
      +          "title": "Priors",
      +          "type": "object"
      +        },
      +        "saturation": {
      +          "anyOf": [
      +            {
      +              "properties": {
      +                "type": {
      +                  "default": "logistic",
      +                  "enum": [
      +                    "logistic",
      +                    "tanh",
      +                    "tanh_baselined",
      +                    "michaelis_menten",
      +                    "hill",
      +                    "hill_sigmoid",
      +                    "inverse_scaled_logistic",
      +                    "log",
      +                    "root",
      +                    "none"
      +                  ],
      +                  "title": "Type",
      +                  "type": "string"
      +                }
      +              },
      +              "title": "SaturationConfig",
      +              "type": "object"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "default": null
      +        }
      +      },
      +      "title": "ChannelPriorConfig",
      +      "type": "object"
      +    },
      +    "description": "Per-channel adstock and/or saturation overrides. Keys must be a subset of channel_columns. Channels not listed use the global adstock/saturation config.",
      +    "title": "Channel Priors",
      +    "type": "object"
      +  },
      +  "control_columns": {
      +    "description": "Non-media control columns",
      +    "items": {
      +      "type": "string"
      +    },
      +    "maxItems": 100,
      +    "title": "Control Columns",
      +    "type": "array"
      +  },
      +  "dataset_id": {
      +    "description": "Registered dataset ID",
      +    "title": "Dataset Id",
      +    "type": "string"
      +  },
      +  "date_column": {
      +    "description": "Column containing temporal dates",
      +    "title": "Date Column",
      +    "type": "string"
      +  },
      +  "dims": {
      +    "description": "Multidimensional panel dimensions (e.g. ['geo'])",
      +    "items": {
      +      "type": "string"
      +    },
      +    "maxItems": 4,
      +    "title": "Dims",
      +    "type": "array"
      +  },
      +  "sampler": {
      +    "description": "NUTS sampler configuration",
      +    "properties": {
      +      "chains": {
      +        "default": 4,
      +        "description": "Number of MCMC chains",
      +        "maximum": 8,
      +        "minimum": 2,
      +        "title": "Chains",
      +        "type": "integer"
      +      },
      +      "draws": {
      +        "default": 1000,
      +        "description": "Posterior draws per chain",
      +        "maximum": 20000,
      +        "minimum": 50,
      +        "title": "Draws",
      +        "type": "integer"
      +      },
      +      "random_seed": {
      +        "default": 42,
      +        "description": "Deterministic random seed",
      +        "title": "Random Seed",
      +        "type": "integer"
      +      },
      +      "target_accept": {
      +        "default": 0.9,
      +        "description": "Target acceptance rate for NUTS",
      +        "maximum": 0.999,
      +        "minimum": 0.8,
      +        "title": "Target Accept",
      +        "type": "number"
      +      },
      +      "tune": {
      +        "default": 1000,
      +        "description": "Tuning/warmup iterations per chain",
      +        "maximum": 20000,
      +        "minimum": 50,
      +        "title": "Tune",
      +        "type": "integer"
      +      }
      +    },
      +    "title": "SamplerConfig",
      +    "type": "object"
      +  },
      +  "saturation": {
      +    "description": "Global saturation configuration (default for all channels)",
      +    "properties": {
      +      "type": {
      +        "default": "logistic",
      +        "enum": [
      +          "logistic",
      +          "tanh",
      +          "tanh_baselined",
      +          "michaelis_menten",
      +          "hill",
      +          "hill_sigmoid",
      +          "inverse_scaled_logistic",
      +          "log",
      +          "root",
      +          "none"
      +        ],
      +        "title": "Type",
      +        "type": "string"
      +      }
      +    },
      +    "title": "SaturationConfig",
      +    "type": "object"
      +  },
      +  "target_column": {
      +    "description": "Outcome KPI column (e.g. revenue, conversions)",
      +    "title": "Target Column",
      +    "type": "string"
      +  },
      +  "yearly_seasonality": {
      +    "default": null,
      +    "description": "Order of Fourier yearly seasonality",
      +    "title": "Yearly Seasonality",
      +    "type": "integer"
      +  }
      +}
    • addedInput schema / properties / config / required
      Added value: +[
      +  "dataset_id",
      +  "date_column",
      +  "target_column",
      +  "channel_columns"
      +]
    • addedInput schema / properties / config / title
      Added value: +"FitMMMInput"
    • addedInput schema / properties / config / type
      Added value: +"object"
    • removedInput schema / properties / idempotency_key / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / idempotency_key / type
      Added value: +"string"
  2. First observedv0.4.0

TDQS

C2.9/5.0
Behavior3/5

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

Annotations already declare non-read-only, non-destructive, idempotent behavior; the description adds the genuinely useful fact that execution is asynchronous and non-blocking. It does not disclose what a caller receives (job identifier), how idempotency_key affects retries, or resource cost of a potentially long MCMC run, so the added context stops short of full behavioral disclosure.

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?

A single front-loaded sentence with no wasted words, and the async trait is placed where it is most useful. Its brevity is efficient rather than padded, though it is arguably too terse for a tool with this much configuration surface.

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?

For a mutation job-submission tool with a large nested config object and no output schema, the description omits the essentials: what the call returns (job id), the async lifecycle, and the role of idempotency_key. The annotations cover safety but not the workflow context an agent needs before invoking 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?

Top-level schema description coverage is reported at 0%: neither the required nested 'config' object nor 'idempotency_key' is explained in the description. The nested schema self-documents many fields, but an agent still gets no guidance from the description on what config must contain or what idempotency_key does.

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 names a specific verb and resource ('Submit ... MMM fitting job') and adds the defining trait that it is asynchronous, which separates it from a synchronous fit. It does not explicitly distinguish itself from close siblings such as submit_cross_validate_mmm_job or fit_mmm, so differentiation is only partial.

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

Usage Guidelines2/5

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

There is no when-to-use / when-not-to-use guidance and no named alternative, even though siblings like fit_mmm and the other submit_*_job tools exist. It also says nothing about what to do after submitting (e.g., retrieve the job id with get_job_status or poll_job_progress), leaving the workflow implicit.

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