# Best Practices

> **Status: Closed Beta** — These recommendations are based on current beta usage patterns and may evolve as the product matures.


## Overview

The Infillion Agent Connector works best when you give your AI agent clear, specific instructions. This guide covers recommended workflows, prompt patterns, and tips for getting the most out of the MCP integration.

## General Principles

### Be Specific About What You Want

AI agents perform best when given concrete objectives rather than vague requests. The more context you provide, the more efficiently the agent can select the right tools and parameters.

**Less effective:** "How are my campaigns doing?"

**More effective:** "Pull last 7 days performance for campaign 1383420 — show me impressions, spend, CTR, and CPA by day."

### Start With Discovery, Then Drill Down

When exploring unfamiliar data, start broad and narrow in. The agent can search across entities first, then inspect specific items in detail.

**Example workflow:**

1. "Find all active campaigns for advertiser 242869"
2. "Get full details on campaign 1383420, including strategies"
3. "Show me the last 30 days performance for that campaign by strategy"


### Let the Agent Chain Operations

The MCP tools are designed to work together. You don't need to manually orchestrate each step — describe your end goal and the agent will typically chain the right sequence of tool calls.

**Example:** "Create a new display strategy called 'Prospecting Q1' under campaign 1383420 with a $5 CPC goal, $50 max bid, even daily pacing, and run on all exchanges" — the agent will call `strategy_create` with all the appropriate parameters in a single operation.

## Common Workflows

### Campaign Health Check

Ask the agent to review a campaign's configuration and recent performance in one go:

> "Give me a health check on campaign 1383420 — show me the configuration, active strategies, and last 7 days performance. Flag anything that looks off with pacing or goal achievement."


The agent will typically call `get_campaign_info` (extended), `find_strategies`, and `query_report` to assemble a comprehensive view.

### Performance Analysis

For performance pulls, specify the metrics, time range, and dimensions you care about:

> "Pull performance for all active campaigns under advertiser 242869 for the last 30 days. Show impressions, clicks, total spend, CPA, and CTR rolled up by day. Sort by spend descending."


For hourly analysis:

> "Show me hourly spend and impressions for campaign 1383420 today. I want to see if any hours are over-delivering."


### Creative Audit

Check creative health across exchanges before launch:

> "Check the approval status for all creatives under concept 987654. Are any rejected or pending on major exchanges?"


The agent will use `find_atomic_creatives` to discover creatives and `atomic_creative_healthcheck` to check each one.

### Display Creative Onboarding

Onboard a 3PAS display creative and verify it before launch:

> "Create a new 300x250 display creative for advertiser 242869 using this ad tag: `<script src='https://adserver.example.com/tag.js'></script>`. Name it 'Q1 Prospecting - 300x250'. Then check its exchange approval status."


The agent will call `atomic_creative_create` with the tag and dimensions, then `atomic_creative_healthcheck` on the returned ID.

To onboard a hosted creative from a URL:

> "Upload the banner at https://cdn.example.com/banner-300x250.png as a MMAS hosted display creative for advertiser 242869 under concept 987654. Use click-through URL https://example.com/landing."


The agent will call `mmas_creative_upload`, which fetches the file server-side and registers it in MMAS.

### Strategy Optimization

Make targeted changes based on data:

> "Campaign 1383420, strategy 567890 — change the goal type to CPA with a $25 target, set max bid to $8, and switch pacing to even daily."


### Bulk Discovery

Search across your portfolio:

> "Find all campaigns under organization 100048 that are currently active and have a CPC goal. Show me their names, IDs, budgets, and current status."


### Deal Management

Discover and review PMP deals:

> "Find all active deals for organization 100048 that have 'premium' in the name. Show me deal IDs, prices, and supply sources."


### Reporting Deep Dives

The reporting tools support multiple datasets for different analysis needs:

| Analysis Need | Recommended Approach |
|  --- | --- |
| Standard campaign performance | `query_report` with `performance` dataset |
| Intraday pacing analysis | `query_hourly_performance_report` |
| Auction competitiveness | `query_win_loss_report` |
| Multi-dimension ad-hoc analysis | `query_all_dimensions_report` |
| Pixel fire verification | `query_pixel_loads_report` |


## Tips for Effective Usage

### Provide Entity IDs When You Have Them

If you know the campaign ID, strategy ID, or advertiser ID, include it in your request. This lets the agent skip the discovery step and go straight to the operation you need.

### Use Natural Language for Complex Targeting

When creating or updating strategies with targeting, you can describe it naturally:

> "Add geo targeting for the United States and Canada, exclude mobile web, and set a frequency cap of 3 impressions per user per day."


The agent will translate this into the appropriate targeting configuration.

### Request Specific Output Formats

If you need data in a particular format for downstream use, say so:

> "Pull last 30 days performance by strategy for campaign 1383420. Format the results as a table with strategy name, impressions, spend, CPC, and CTR."


### Check for New Tools Regularly

The Agent Connector is under active development and new tools are added frequently. Documentation may lag behind the latest releases. You can always ask your agent to list its available tools to discover new capabilities:

> "What MediaMath tools do you currently have access to?"
"Do you have any tools for managing [feature]?"


This ensures you're always working with the full set of available operations.

### Iterative Refinement

Don't hesitate to follow up on results. The agent maintains conversational context, so you can drill into specifics:

1. "Show me all strategies under campaign 1383420"
2. "Get full details on strategy 567890"
3. "What's the hourly performance for that strategy over the last 48 hours?"
4. "Pause that strategy"


## Troubleshooting

### "The agent says it can't find my campaign"

Verify that the campaign ID is correct and that your user account has permission to access the campaign's advertiser. The agent operates under your permission scope.

### "Reporting queries return empty results"

Check that your filters match existing data. Common issues include incorrect campaign IDs, time windows that don't overlap with campaign flight dates, or overly restrictive filter combinations. Try broadening your filters or extending the time window.

### "Strategy creation fails with a goal type error"

Certain goal types have prerequisites. For example, CPA and ROI goals require `use_optimization` to be enabled and a merit pixel to be configured on the parent campaign. Check the campaign configuration first.

### "The agent is making too many API calls"

For complex requests spanning many entities, consider narrowing your scope. Instead of analyzing all campaigns across an organization, start with a specific advertiser or date range.

## Feedback

As a closed beta participant, your feedback is invaluable. If you encounter issues, have feature requests, or discover particularly effective usage patterns, please share them with your **Client Services representative**. Your input directly shapes the product roadmap.

## Related Pages

- [Overview](/guides/mcp/overview) — Product introduction and architecture
- [Getting Connected](/guides/mcp/getting-connected) — Setup and onboarding
- [Tool Reference](/guides/mcp/tool-reference) — Complete tool listing and parameters