Skip to main content
Glama

meta_ads_leads_export_csv

Export Meta Ads lead form leads to a local CSV file. Maintains stable column order and excludes PII from logs for privacy.

Instructions

Fetches all leads for a lead form and writes them to a local CSV file. Returns the number of rows written. Header row is ["id", "created_time", *question_keys]; question_keys come from the form's declared questions (in declared order) so column order stays stable across exports. Pass field_order to lock a different column order (useful for stable CRM-import schemas). PII never appears in mureo's log output — only the row count. Read-only with respect to Meta, but writes locally. Meta retains lead data for 90 days; export regularly.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
account_idNoMeta Ads account ID in the format 'act_XXXXXXXXXX' (e.g. 'act_1234567890'). Optional — falls back to META_ADS_ACCOUNT_ID from the configured credentials. The leading 'act_' prefix is required.
form_idYesLead form ID whose leads to export.
output_pathYesAbsolute local path for the CSV file. Parent directory is auto-created if missing; existing file is overwritten. UTF-8 encoded.
limitNoMax leads per API call. Default 1000, Meta's per-call ceiling.
field_orderNoOptional list of question keys to lock the column order. Overrides the form's declared question order.
Behavior5/5

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

With no annotations, the description fully discloses behavior: it is read-only on Meta's side (fetches leads) but writes locally, details CSV format and column stability, mentions PII is never logged (only row count), and notes Meta's 90-day retention. This covers key operational traits.

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?

The description is four sentences, each focused and necessary. It front-loads the core action (fetching leads and writing CSV) and then adds important details in a logical order. No wasted words.

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?

Despite no output schema, the description clearly states the return value (number of rows written) and the output format (CSV with specific header). It also mentions Meta's data retention policy, making it complete for a tool of this complexity.

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?

The input schema already describes all 5 parameters with high coverage (100%). The description adds value by explaining the CSV header structure (including question_keys and field_order for stable ordering), which goes beyond the schema descriptions.

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?

The description clearly states the tool fetches all leads from a lead form and writes them to a local CSV file. It distinguishes itself from sibling tools like meta_ads_leads_get and meta_ads_leads_get_by_ad by emphasizing the local file output and specific CSV structure.

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?

The description provides context on when to use the tool (regular exports due to Meta's 90-day retention) and a privacy consideration (PII not logged). However, it does not explicitly state when not to use it or name alternatives, though the local export nature implies it's for persistent storage.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/logly/mureo'

If you have feedback or need assistance with the MCP directory API, please join our Discord server