Skip to main content
Glama

Pull spend from an ad network

pull_network_spend

Fetch and import creative-level ad spend from Meta, Google, or TikTok connections on demand for immediate or extended reporting windows beyond the automatic 6-hour sync.

Instructions

Fetch and import creative-level spend from a configured Meta, Google or TikTok connection. AttriKit already pulls every enabled connection every 6 hours, covering today and the 3 days before; call this for an immediate pull or a longer window. Report rows are kept only for campaigns whose network id AttriKit knows (create_campaign_link.network_campaign_id); if none match, the call fails and imports nothing. A network reports rows only for ads that have delivered, so the first useful pull is after the ads start spending.

Input Schema

NameRequiredDescriptionDefault
app_idYesThe AttriKit app id.
networkYes
covers_toYes
covers_fromYes
connection_idNo
idempotency_keyNoStable retry key for this exact mutation.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

A4/5.0
Behavior4/5

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

Annotations declare it is a mutation (readOnlyHint=false), non-idempotent and open-world; the description adds real behavior beyond that: rows are kept only for campaigns whose network id AttriKit already knows, and if none match the call fails and imports nothing. That failure semantics disclosure is valuable. It doesn't explain what a successful import returns or how partial matches are handled.

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?

Four sentences, each carrying distinct information: what it does, why you'd call it given scheduled polling, the campaign-id matching constraint, and the delivered-ads caveat. Front-loaded with the action and zero filler.

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 mutation with side effects and no output schema, the description covers the essential risks: failure with no import, the prerequisite that campaigns must already be linked, and the caveat that no rows exist before ads spend. Missing details on return shape and idempotency_key usage keep it short of full completeness.

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

Parameters3/5

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

With only 33% schema description coverage, the description must carry weight. It clarifies network (must be a configured Meta/Google/TikTok connection) and implies covers_from/covers_to via 'longer window', but app_id, connection_id and the idempotency_key are never explained, and the tension between an idempotency_key parameter and idempotentHint=false is left unaddressed.

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

Purpose4/5

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

The description opens with a specific verb+resource: fetching and importing creative-level spend from a configured Meta/Google/TikTok connection, scoped to an app. It is clear what the tool does, but it never names the closely related siblings get_spend and import_spend, so an agent must infer the boundary from context alone.

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?

It states the triggering condition well: automatic polling already covers every enabled connection every 6 hours for today plus the prior 3 days, so this tool is for an immediate pull or a longer window. It gives no exclusions or explicit routing versus get_spend/import_spend, which leaves a gap for a toolset that contains near-duplicate spend tools.

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