Link Search Menu Expand Document

PDF

Best Practices


Connecting AI applications to the OpenX MCP server efficiently requires a few simple practices that optimize token consumption while making results faster and more accurate. Every message re-sends the whole conversation, including loaded tool definitions, skills, and earlier results. Therefore, context that accumulates costs tokens on every turn and makes mix-ups more likely.

This topic covers where tokens go, best practices for using the server, how to manage standard procedures with skills, and setup guidance for AI apps connecting to the OpenX MCP server.


Where Tokens Go

Tool definitions represent the primary fixed token overhead: about 65k tokens if all tools (over 100) load at once, versus 3–4k when tools load on demand.

SourceApproximate costWhat drives it
All tool definitions (loaded up front)~65k tokensSchema and descriptions for all available tools.
Tool names and summaries only (on-demand loading)~3–4k tokensFull schemas load only when needed.
Individual tool200–500 tokensSimple lookups at the low end, create and update tools higher.
A skill (for example, deal creation)Several thousand tokensStep-by-step playbook and reference material.
Tool resultsVaries widelyFull records, block lists and segment searches add thousands each.
Conversation historyCumulative per turnEverything above stays in context and is re-sent.

Because every turn re-sends the conversation, token accumulation scales rapidly in long chats. The practices below describe how to manage token usage.


Best Practices for Users

These apply to anyone using the OpenX MCP server through an AI app.

Managing Chats

  1. Keep one chat per deal or task. Stay in the same chat while steps depend on each other, such as a package, its deals, then a delivery check. Start fresh when switching campaigns or task types.
  2. Open new chats with a short brief. For example: advertiser, deal IDs, goal, date range. A reusable template makes this quick and consistent.
  3. Read a skill once per chat. Re-fetching a skill in the same conversation pays its full cost again, so add to your project instructions: “Fetch each OpenX skill at most once per conversation and reuse it.” (see Standing Instructions).

Making Requests

  1. Include everything in the first message. Deal name, dates, DSP and seat ID, price, format, devices and geo up front avoid several clarifying turns.
  2. Be specific when naming deals. Use the exact deal name or the deal ID (see the next section).
  3. Ask focused questions. “Why is OX-bef-123 losing bids to TTD?” pulls one or two diagnostics. “Give me a full health check” runs the whole troubleshooting sequence.
  4. Settle details before creating anything. Review the summary carefully before saying yes. Fixes after creation mean extra updates, read-backs and confirmations.

Working with Results

  1. Prefer compact lookups. Finding objects by name with a small result limit is faster and lighter than pulling full lists.
  2. Ask for the answer, not the data. Request “top 5 domains by lost bids” or a summary table rather than full records, block lists or segment dumps. Raw results stay in context for the rest of the chat.
  3. Keep date ranges tight. Use 7 days instead of 30 unless the trend matters, and add filters (DSP, channel, format) when you know where to look.
  4. Download reports instead of reading them in chat. For row-heavy data, get the CSV link and a short preview, then analyze the file outside the chat.

Working efficiently

  1. Batch similar work. Deals with the same targeting go in one request with one shared package, one summary and one confirmation.
  2. Save your defaults once. Put naming conventions, standard exclusions and preferred DSPs in saved preferences or project instructions so you never repeat them.

Working with Reports

Use the reporting system. For large tabular reports, use OpenX reporting and download the file: building a report cell by cell in chat is slow and uses a lot of context.


Deal Names vs. Deal IDs

Exact deal names work well, deal IDs (OX-…) are slightly better, and vague descriptions are the only thing to avoid. A name lookup is a single fast search that returns compact results.

How you refer to a dealResult
Deal ID (OX-…)Most precise. Grouped deals can share one code; the tools sum them or ask which one is meant.
Exact deal nameWorks well. One fast lookup.
Partial or common name (“the Acme deal”)May match several deals and add a clarifying turn.
Description only (“that banner test from last week”)Triggers broader searches and list pulls first.

Troubleshooting tools use OpenX’s internal deal number, so a name or code takes one extra lookup to resolve. The agent handles this automatically.


Using Skills to Manage SOPs

Teams can package their standard procedures as a custom skill in their AI app, eliminating repetitive instructions into every chat. Examples include naming conventions, standard exclusions, approval steps, and pairing banner and video deals.

A skill costs only its one-line description until a request needs it, which makes it cheaper than repeating instructions or keeping them in every system prompt.

  1. Add only what’s specific to your org. Point to the OpenX server skill for the mechanics (“follow openx-deal-creation, plus these rules”) instead of copying it. Copied content costs tokens and goes stale when OpenX updates its skills.
  2. Keep it lean. Use a short playbook, with longer references (naming tables, DSP seat lists) in separate files that load only when needed.
  3. Share it across the team. One org-level skill keeps everyone’s process consistent and avoids each person maintaining their own version.

Setting Up your AI App

The most critical setup decision is loading tools on demand, which reduces upfront cost from ~65k tokens to ~3–4k.

EnvironmentHow to load tools on demand
Claude apps (Web, Desktop, Mobile)Already automatic for large connector toolsets.
Custom apps on the Claude APIAdd the tool search tool and set defer_loading:true on the MCP toolset (Anthropic docs).
Other AI platformsUse the framework’s deferred-loading option if it has one; otherwise enable only the OpenX tools your workflows need.

Standing Instructions

Add these to project instructions or your app’s system prompt:

  • “Fetch each OpenX skill at most once per conversation and reuse it.”
  • “Find deals, orders and line items with searchOptionsByPath using a name filter and a small limit. Use list tools only when full records are needed.”

Other Options for Custom Apps

  • Exclude heavy list tools if your workflows don’t need full records.
  • Match the model to the job: a smaller, faster model for routine lookups and pacing checks, the most capable model for builds and troubleshooting.

About the Estimates

Token figures are approximate and vary by AI app, model, and workflow. They show relative cost, not exact usage.


Troubleshooting and Common Issues