Skip to main content
Glama

Get spend and cost models

get_spend
Read-onlyIdempotent

Retrieve imported ad spend with cost models, completeness, and freshness; use date filters or a cursor to page rows and fetch the next set of results.

Instructions

Return imported ad spend, cost models, completeness and spend freshness. Without from, to or cursor every row comes back at once; with any of them the rows are paged, ordered by network, campaign, ad set, ad and day, and next_cursor is null on the last page.

Input Schema

NameRequiredDescriptionDefault
toNoLast metric day to include (UTC, YYYY-MM-DD). May be sent without from.
fromNoFirst metric day to include (UTC, YYYY-MM-DD). May be sent without to.
limitNoRows per page, 1-5000 (1000 when omitted). Read only in paged mode; alone it changes nothing.
app_idNoOptional app id to scope the result to one app.
cursorNoPass the next_cursor from the previous response to fetch the following page. Omit for the first page.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and openWorld, so the safety profile is covered. The description adds behavior the annotations cannot convey: full-dump versus paged semantics, the ordering key (network, campaign, ad set, ad, day), and that next_cursor is null on the last page — all directly useful for correct invocation.

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?

Two sentences, front-loaded with the resource list, then the paging contract. Every clause carries information (trigger, ordering, terminal cursor), though the second sentence packs several distinct rules into one dense chain and would scan better split.

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?

With no output schema, the description carries the return-shape burden and does so for the important parts: the four data categories returned, the row ordering, and the next_cursor pagination contract. Minor gaps remain — no mention of auth/scope requirements or row-volume limits for the unpaged path.

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 the baseline is 3. The description earns above baseline by documenting the cross-parameter rule — any of from, to or cursor turns on paging — which the schema only states per-parameter ('alone it changes nothing') and never as a combined trigger.

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?

States a specific verb ('Return') and enumerates the resources returned: imported ad spend, cost models, completeness and spend freshness. An agent can tell it is a read tool over spend data, but nothing in the text distinguishes it from siblings like import_spend, pull_network_spend, set_cost_model or get_attribution_rollup.

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

Usage Guidelines3/5

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

It explains the operational condition that selects full-dump mode versus paged mode ('without from, to or cursor every row comes back at once'), which is real usage guidance. However, it never says when to reach for this tool rather than import_spend, pull_network_spend or get_attribution_rollup, so the choice between siblings is left to inference.

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