Skip to main content
Glama
imMamdouhaboammar

PyMC Marketing MCP

optimize_flighting

Optimize weekly media flighting to maximize response or net profit under budget, spend-pattern, and iROAS constraints, accounting for adstock carryover.

Instructions

Optimize a dynamic weekly media flighting schedule over a planning horizon, accounting for adstock carryover dynamics, channel spend constraints, target iROAS floors, and profit-maximization objectives. The model must be approved or approved_with_caution before optimization. Returns a week-by-week spend table per channel, posterior response distribution, and net-profit estimates.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
configYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses the optimization behavior (adstock carryover, constraints, iROAS floors), the approval precondition, and the return values (weekly spend table, posterior response distribution, net-profit estimates). It does not explicitly state whether the operation mutates any state or requires authentication, but for a compute-and-return tool that is a minor gap.

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 dense sentences with zero filler. The main action, constraints, prerequisite, and return values are all packed into clear, front-loaded prose.

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

Completeness4/5

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

For a complex optimizer with no output schema, the description covers the key inputs, constraints, and outputs, plus the approval prerequisite. It could mention failure modes or parameter bounds, but those are largely captured in the schema.

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?

Schema description coverage is 0% for the single top-level parameter (config), and the description does not explain how to structure the input or map the mentioned constraints/objectives to specific parameter fields. Some compensation is attempted by naming channel spend constraints and target iROAS floors, but it does not compensate for the undocumented config object.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('Optimize') and a specific resource ('dynamic weekly media flighting schedule'), and details the constraints and objectives. It clearly distinguishes from sibling optimize_budget by focusing on weekly flighting across a planning horizon with adstock carryover.

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?

Explicitly states a prerequisite: the model must be approved or approved_with_caution before optimization. It does not name alternative tools or exclusion conditions, but this clear precondition provides actionable context.

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