Skip to main content
Glama

meta_ads_leads_export_csv

Export Meta Ads lead form leads to a local CSV file with stable column order and row count returned. Avoid PII in logs and export regularly since Meta retains data for only 90 days.

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
limitNoMax leads per API call. Default 1000, Meta's per-call ceiling.
form_idYesLead form ID whose leads to export.
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.
field_orderNoOptional list of question keys to lock the column order. Overrides the form's declared question order.
output_pathYesAbsolute local path for the CSV file. Parent directory is auto-created if missing; existing file is overwritten. UTF-8 encoded.
Behavior5/5

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

No annotations provided, so description carries full burden. It discloses side effects (writes locally), return value (row count), header format, column order stability, PII handling, and data retention. Excellent coverage.

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?

Three dense sentences, each providing necessary context. No redundant information, front-loaded with core purpose.

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 or annotations, description covers purpose, output format, side effects, and retention. Fully sufficient for an agent to select and invoke correctly.

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 covers all parameters (100%), so baseline is 3. Description adds value by explaining field_order's purpose for stable CRM schemas and header row composition, exceeding baseline.

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 exactly what it does: fetches leads for a lead form and writes to a local CSV. Distinct from sibling tools like meta_ads_leads_get by mentioning local file output.

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?

Clearly implies use for CSV export and mentions regular exporting due to 90-day retention, but does not explicitly name alternative tools or when not to use.

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