Skip to main content
Glama
get-mcp-ads

X Ads by Get MCP Ads

x ads list line items

x_ads_list_line_items
Read-onlyIdempotent

List line items (ad groups) for an X Ads account with search, filtering, sorting, and pagination to retrieve ad group records for reporting or management.

Instructions

List line items (ad groups) for an ads account Native X fields and pagination are preserved; monetary fields ending in _micro are millionths of the account currency.

Input Schema

NameRequiredDescriptionDefault
qNoSearch by line item name (1-255 characters).
countNoNumber of records to return per page (1-1000).
cursorNoPagination cursor from a previous response.
sort_byNoSort order as attribute-direction, e.g. created_at-asc or updated_at-desc.
account_idYesX Ads account ID from X_ADS_ACCOUNT_IDS.
with_draftNoInclude line items of draft campaigns in the response (default false).
campaign_idsNoComma-separated campaign IDs to scope the line items to.
with_deletedNoInclude soft-deleted line items in the response (default false).
line_item_idsNoComma-separated line item IDs to fetch specific records (max 200).
with_total_countNoInclude the total_count response attribute (default false; exclusive with cursor).
funding_instrument_idsNoComma-separated funding instrument IDs to scope the results to (max 200).

Output Schema

NameRequiredDescriptionDefault
resultYesOriginal tool result: parsed JSON when the text is JSON, otherwise the text or multiple MCP content blocks. Provider fields depend on the selected query.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.1.1
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedOutput schema / properties / result / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": true,
      -    "properties": {},
      -    "type": "object"
      -  },
      -  {
      -    "items": {},
      -    "type": "array"
      -  },
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "boolean"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": {},
      +    "properties": {},
      +    "type": "object"
      +  },
      +  {
      +    "items": {},
      +    "type": "array"
      +  },
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "type": "boolean"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  2. First observedv1.0.1

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the description's job is lighter. It adds two genuinely useful facts not in the structured fields: that native X fields and pagination are passed through unchanged, and that _micro monetary fields are millionths of the account currency — a real interpretation hazard.

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 short sentences, purpose first, with the money-format caveat following. Slightly run-on due to the missing sentence break between 'account' and 'Native X fields', but nothing is wasted.

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 a full output schema and complete annotation coverage, the description only needs to orient the agent. It does so, including the currency-unit caveat and pagination behavior; the main omission is routing guidance relative to sibling list/get tools.

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?

Schema description coverage is 100%, so all 11 parameters (including with_deleted, with_total_count exclusion with cursor, and the 200-ID limits) are already documented. The description adds no parameter-level meaning beyond the schema, so the baseline 3 applies.

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 (List) and resource (line items / ad groups) scoped to an ads account, which separates it cleanly from x_ads_get_line_item. It does not explicitly contrast with x_ads_list_campaigns or x_ads_list_line_item_placements, but the resource noun is unambiguous.

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

Usage Guidelines2/5

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

There is no statement of when to call this versus x_ads_get_line_item (single record), x_ads_list_campaigns, or the placements sibling, and no prerequisites or exclusions. The agent must infer usage purely from the name.

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