Skip to main content
Glama
PyMC Marketing MCP

PyMC Marketing MCP

by funnelscript

Diagnose Mmm

diagnose_mmm
Read-onlyIdempotent

Validates sampler health and checks posterior predictive coverage, predictive error, and residual behavior before decision tools may run.

Instructions

Mandatory diagnostic gate. Checks sampler health plus posterior predictive coverage, predictive error, and residual behavior before decision tools may run.

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": {
      "model_id": "<model_id>"
    },
    "name": "diagnose_mmm"
  }
}

Input Schema

NameRequiredDescriptionDefault
model_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  2. First observedv0.4.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already establish read-only, idempotent, non-destructive, closed-world behavior, so the bar is lower. The description still adds meaningful context the annotations lack: this is a gate that can block subsequent decision tools, which affects call ordering. It doesn't explain what a failing diagnosis looks like.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two tight sentences, with the gate constraint front-loaded and the checked dimensions listed compactly. No filler or redundancy.

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?

With no output schema, the description carries the burden of explaining what a diagnosis returns (pass/fail, metrics, thresholds) and it does not. An agent knows when to call it and roughly what it inspects but not how to interpret or act on the result.

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 0% and the single parameter model_id is never mentioned in the description. The parameter is fairly self-explanatory, so the cost is small, but the description adds no meaning about which model identifier is expected or how it relates to prior fit_mmm output.

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 action (checks) and enumerates the exact diagnostics: sampler health, posterior predictive coverage, predictive error, and residual behavior. It clearly distinguishes this 'diagnostic gate' from fitting or decision tools, though it doesn't reference siblings by name.

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

Usage Guidelines4/5

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

It gives a strong conditional: run this before decision tools may run, and labels it mandatory. It stops short of naming the specific downstream tools (e.g., get_channel_contributions, get_incremental_roas) that are gated, so an agent must infer which calls require it.

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