Skip to main content
Glama
imMamdouhaboammar

PyMC Marketing MCP

select_best_model

Compare multiple fitted marketing mix models using PSIS-LOO, WAIC, or Bayesian stacking to identify the top-performing model by predictive accuracy and return its ID.

Instructions

Compare multiple fitted MMMs using PSIS-LOO, WAIC, or Bayesian stacking weights via ArviZ. All models must be fitted on the same dataset. Returns ranked specifications, LOO/WAIC scores, and recommended model ID. Methods: loo (PSIS-LOO), waic (WAIC), stacking (BMA weights), all (run all three).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
configYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

C2.9/5.0
Behavior2/5

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

Since no annotations are provided, the description carries the full burden and does usefully disclose the same-dataset constraint and return payload. However, its method list ('loo, waic, stacking, all') is stale relative to the schema, which splits this into 'criterion' ('loo', 'waic', 'both') and 'weighting' ('stacking', 'bb-pseudo-bma', 'pseudo-bma') and marks 'method' as deprecated — so the description can actively mislead an agent about valid inputs.

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 description is compact (~60 words) and front-loaded with the primary action, followed by concrete return details and method options. The trailing 'Methods:' list repeats PSIS-LOO/WAIC/stacking already named in the first sentence, a minor redundancy that keeps it from a 5.

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 tool has a nested four-property config, no output schema, no annotations, and a closely named sibling ('compare_models') yet the description covers only the core action and returns. It does not map the method list onto the actual parameters, does not disambiguate from 'compare_models', and gives no sense of error behavior or how the 'recommended model ID' is determined.

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 top-level 'config' parameter has no description (0% coverage per signals), though the nested ModelComparisonInput properties are individually documented. The description attempts to compensate but introduces a value ('all') that does not exist in the schema ('both' does), conflates criterion and weighting into a single 'Methods' list, and omits the deprecation warning, so it partially undermines parameter clarity.

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 ('Compare multiple fitted MMMs') and names concrete statistical methods (PSIS-LOO, WAIC, Bayesian stacking) plus the outputs (ranked specifications, scores, recommended model ID). However, it does not differentiate from the close sibling 'compare_models', so it cannot reach 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?

A clear prerequisite is given ('All models must be fitted on the same dataset') and the method enumeration helps the agent choose values, implying when the tool is appropriate. But there is no explicit when-not-to-use guidance and no reference to the overlapping sibling 'compare_models', leaving the choice between them ambiguous.

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