Skip to main content
Glama
getsimba-ai

Simba MCP Server

Official
by getsimba-ai

Set Campaign Mapping

set_campaign_mapping
DestructiveIdempotent

Replace a model's campaign mapping to control which channel each campaign counts toward. Provide campaign IDs or name patterns; conflicts and unmapped campaigns are reported.

Instructions

Replace the model's campaign map: which model channel each campaign counts towards.

Each row is {platform, campaign_id | name_pattern, channel, valid_from?, valid_to?}: exactly one of campaign_id (the platform's id, exact) or name_pattern (a glob on the campaign name, e.g. "YouTube*", case-insensitive); channel must be one of the model's channel names (as in get_model_results); dates are ISO and optional (open-ended when absent). An exact-id row beats any pattern row. The whole map is replaced by rows; send every row you want kept.

Refused (422, code campaign_map_invalid, nothing saved) when a channel is not the model's (the error names the closest one), when a campaign would count towards two channels on any date (two exact rows on one campaign with overlapping dates, or two patterns matching one campaign with overlapping dates; conflicts lists them), or when a row is malformed.

Returns the map report: {map, unmapped: [{platform, campaign_id, campaign_name, spend, first_seen, last_seen, platform_channel_type, suggested_channel}], conflicts: [], drift: [{channel, campaign_spend, model_spend, ratio, over_tolerance, campaigns}], tolerance, currency, currency_mismatch, window, channels}. drift compares the spend of the campaigns mapped to each channel with the model's own spend for that channel over the dates both have; over_tolerance is a WARNING (the map is saved), usually a campaign that belongs elsewhere or model data that stops before the campaigns do. Unmapped campaigns stay listed and are not counted; map them in a later call.

Args: model_hash: The fitted MMM the map belongs to. rows: The complete map. tolerance: The drift warning threshold as a fraction (default 0.05).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rowsYes
toleranceNo
model_hashYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.14.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations declare destructiveHint/idempotentHint/openWorldHint, and the description adds substantial context beyond them: the full-replacement destruction of the previous map, the 422 refusal codes and that nothing is saved, conflict detection with `conflicts`, and that drift `over_tolerance` is only a warning while the map is still saved. This is rich 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?

Dense but well-structured and front-loaded with the core action, then the row format, then failure modes. Given the complexity of the row schema and error semantics, the length is largely justified, though the return-value enumeration is longer than strictly needed given an output schema exists.

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

Completeness5/5

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

For a destructive, schema-heavy tool with an output schema, the description covers row semantics, collisions, precedence, failure modes, and even the return report meaning. It is complete enough that an agent could invoke it correctly on the first attempt.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description carries the full burden and does so: it fully specifies the row shape ({platform, campaign_id | name_pattern, channel, valid_from?, valid_to?}), the mutual exclusivity of campaign_id vs name_pattern, glob semantics with an example, ISO date rules, and precedence (exact-id beats pattern). Args section also clarifies model_hash and tolerance.

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?

Opens with a specific verb+resource: 'Replace the model's campaign map: which model channel each campaign counts towards.' This is unambiguous and clearly distinct from siblings like list_campaigns or get_campaign_report. The agent knows exactly what operation this is.

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

Usage Guidelines5/5

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

Explicitly states replacement semantics ('The whole map is replaced by `rows`; send every row you want kept') and gives precise refusal conditions (422 campaign_map_invalid) with the cause of each. It also describes what to do with unmapped campaigns ('map them in a later call'), which is genuine when-to-use guidance.

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

Deploy Server

Other Tools