Skip to main content
Glama

Get Ad Campaigns

get_ads_campaigns
Read-only

Lists the company's ad campaigns in a date range with their spend, impressions, clicks and conversions. limit caps the rows (1 to 100, default 50). start and end are full ISO 8601 timestamps such as 2026-04-01T00:00:00Z; omit both for the last 90 days. Call get_ecommerce_connection_status first and answer together with it: never report zero for a platform whose data is still syncing or not connected. It reads the active company; for another company the user owns, pass its companyId from list_companies instead of switching the active company.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_ads_campaigns"
  }
}

Input Schema

NameRequiredDescriptionDefault
endNoOPTIONAL end as a FULL ISO 8601 timestamp WITH time + timezone, e.g. '2026-04-30T23:59:59Z'. Never date-only. Omit alongside `start` to fall back to the rolling 90-day window.
limitNomax rows (1-100, default 50)
startNoOPTIONAL start as a FULL ISO 8601 timestamp WITH time + timezone, e.g. '2026-04-01T00:00:00Z'. Always include the time component and Z suffix — date-only strings (like '2026-04-01') are rejected by the upstream service. If the customer doesn't specify a date range, OMIT this and the tool defaults to the last 90 days.
contextNoOptional, for analytics only. In one sentence, why you are calling this tool and how it serves the user's goal. Describe the purpose in general terms: never include names, emails, phone numbers, addresses, IDs or any other personal details.
companyIdNoOPTIONAL. The doolaCompanyId (an id like '30E5c1AQA326uOuDlsic4No7zZ5'). LEAVE THIS EMPTY/UNSET to use the customer's currently active company — that is the correct default for almost every question. Pass a value ONLY when the customer explicitly references a *different* company they own (e.g. 'show me transactions for my other company X'). NEVER pass a company name, slug, or human label here — only an exact id string.
llm_modelNoOptional, for analytics only. Your exact model identifier from your system prompt (e.g. "claude-opus-4-8"), or "unknown" if unsure. Never guess.
conversation_idNoOptional, for analytics only. The exact conversation_id from this server's previous response, unchanged. The first response provides one, so leave this out until you have it and never invent one. Keep passing the same value for the rest of the conversation, even when the user moves on to a new request.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, and the description adds real context beyond them: it reads the active company, defaults to a rolling 90-day window when dates are omitted, rejects date-only strings upstream, and carries a data-freshness caveat about syncing platforms. Return shape is only sketched by field names, so it falls short of a 5.

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?

Front-loaded with purpose, then parameters, then the prerequisite check and company scoping; nearly every clause carries operational information. It is dense as a single paragraph, but little is wasted.

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 zero-required-parameter read tool with 100% schema coverage, annotations, and no output schema, the definition covers defaults, date formatting pitfalls, prerequisite verification, and multi-company scoping. An agent has enough to call it correctly and interpret empty results.

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

Parameters4/5

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

Schema coverage is 100%, so a 3 is the floor, and the description adds meaning on top: the 1-100 limit range with default 50, the full ISO 8601 timestamp requirement with an example, the omit-both-for-90-days fallback, and the companyId-vs-active-company rule. It does not explain context, llm_model, or conversation_id, which the schema already labels as analytics-only.

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 and resource ("Lists the company's ad campaigns in a date range") and enumerates the returned metrics (spend, impressions, clicks, conversions), which separates it from get_ads_platforms and get_ads_time_series without opening their schemas.

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?

Gives explicit when-to-use and when-not guidance: call get_ecommerce_connection_status first and answer together with it, never report zero for a platform still syncing or not connected, and use companyId from list_companies rather than switching active company for another owned company.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.