Skip to main content
Glama

Export leads to CSV

export_leads

Build a lead list as a CSV, one row per business: name, category, address, phone, website, emails, socials, coordinates, confidence, place id, source, license and a Google Maps link, plus website emails and opening hours for places find_emails has read. Use it instead of paging search_places when you need more than about 100 rows or a file for a spreadsheet or CRM. Needs category ids and a location. By default only places with both a website and a phone are kept; set require_website/require_phone to false for broader lists, or no_website=true for places without a site. Returns a download link valid 24 hours (or the CSV text with inline=true), a 5-row preview and total_matches. Uses one call plus one export-quota row per row; list_exports re-issues the link later for free.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "category": "<category>"
    },
    "name": "export_leads"
  }
}

Input Schema

NameRequiredDescriptionDefault
cityNoCity name as written in addresses, e.g. "Austin". Exact match; pair with state to avoid same-named cities. For a metro area prefer near + radius_km.
nearNoCenter point for a radius search: "City, ST", a 5-digit ZIP, or "lat,lon". Results are sorted by distance.
stateNo2-letter US state code, e.g. "TX".
inlineNoReturn the CSV text in the result (csv field, up to 250 rows) instead of a download link. Use when you can't fetch URLs, e.g. in a sandbox that blocks storefinch.com.
categoryYesCategory ids from find_categories, e.g. ["plumbing"]. Includes subcategories.
max_rowsNoMost rows to include. The plan also caps it: 5,000 per export on Pro, 250 on Free, and the monthly export quota.
postcodeNo5-digit ZIP code.
radius_kmNoRadius in km around `near` (max 100). Ignored without `near`.
no_websiteNoOnly places with NO website listed, e.g. web-design prospects. Sources can miss a site, so confirm before pitching. Can't be combined with require_website.
require_emailNoOnly places whose data sources list an email (about a third of places).
require_phoneNoOnly places with a phone number listed.
min_confidenceNoMinimum Overture confidence that the place exists (0.5-1). 0.77 is a good default; lower adds more, noisier rows.
require_websiteNoOnly places with a website listed.

Output Schema

NameRequiredDescriptionDefault
csvNoThe CSV text, only when inline=true.
noteNoWhy the export was capped, if it was.
centerNo
csv_urlNoDownload link, valid 24 hours. Absent when inline=true.
previewYesFirst 5 rows.
export_idNoId for list_exports; absent when nothing matched.
data_releaseYes
total_matchesYes
rows_in_exportYesRows in the CSV (and charged to the export quota).
quota_remainingYes
expires_in_hoursNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / require_email / description
      Previous value: -"Only places whose data sources list an email (about a third of places). For more, run find_emails on places with a website."New value: +"Only places whose data sources list an email (about a third of places)."
    • changedOutput schema / $defs / PlaceSummary / properties / id / description
      Previous value: -"Place id for get_place, verify_websites and find_emails."New value: +"Place id, for get_place and the other tools that take place ids."
  2. Changed10 schema fields changed
    • changedInput schema / properties / category / description
      Previous value: -"Category ids from find_categories, e.g. [\"plumbing\"]."New value: +"Category ids from find_categories, e.g. [\"plumbing\"]. Includes subcategories."
    • changedInput schema / properties / city / description
      Previous value: -"City name as written in addresses, e.g. \"Austin\". Exact match; for a metro area prefer near + radius_km."New value: +"City name as written in addresses, e.g. \"Austin\". Exact match; pair with state to avoid same-named cities. For a metro area prefer near + radius_km."
    • addedInput schema / properties / max_rows / description
      Added value: +"Most rows to include. The plan also caps it: 5,000 per export on Pro, 250 on Free, and the monthly export quota."
    • changedInput schema / properties / min_confidence / description
      Previous value: -"Minimum Overture confidence that the place exists (0-1). 0.77 is a good default; lower adds more, noisier rows."New value: +"Minimum Overture confidence that the place exists (0.5-1). 0.77 is a good default; lower adds more, noisier rows."
    • addedInput schema / properties / no_website
      Added value: +{
      +  "default": false,
      +  "description": "Only places with NO website listed, e.g. web-design prospects. Sources can miss a site, so confirm before pitching. Can't be combined with require_website.",
      +  "title": "No Website",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / radius_km / description
      Previous value: -"Radius in km around `near` (max 100)."New value: +"Radius in km around `near` (max 100). Ignored without `near`."
    • addedInput schema / properties / require_email / description
      Added value: +"Only places whose data sources list an email (about a third of places). For more, run find_emails on places with a website."
    • addedInput schema / properties / require_phone / description
      Added value: +"Only places with a phone number listed."
    • addedInput schema / properties / require_website / description
      Added value: +"Only places with a website listed."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$defs": {
      +    "Center": {
      +      "properties": {
      +        "label": {
      +          "description": "How `near` was understood.",
      +          "title": "Label",
      +          "type": "string"
      +        },
      +        "lat": {
      +          "title": "Lat",
      +          "type": "number"
      +        },
      +        "lon": {
      +          "title": "Lon",
      +          "type": "number"
      +        },
      +        "radius_km": {
      +          "title": "Radius Km",
      +          "type": "number"
      +        }
      +      },
      +      "required": [
      +        "label",
      +        "lat",
      +        "lon",
      +        "radius_km"
      +      ],
      +      "title": "Center",
      +      "type": "object"
      +    },
      +    "PlaceSummary": {
      +      "properties": {
      +        "address": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "default": null,
      +          "title": "Address"
      +        },
      +        "category": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "default": null,
      +          "title": "Category"
      +        },
      +        "confidence": {
      +          "anyOf": [
      +            {
      +              "type": "number"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "default": null,
      +          "description": "Overture confidence (0-1) that the place exists.",
      +          "title": "Confidence"
      +        },
      +        "distance_km": {
      +          "anyOf": [
      +            {
      +              "type": "number"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "default": null,
      +          "description": "Only for radius searches.",
      +          "title": "Distance Km"
      +        },
      +        "email": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "default": null,
      +          "description": "First email from the data sources, if any.",
      +          "title": "Email"
      +        },
      +        "id": {
      +          "description": "Place id for get_place, verify_websites and find_emails.",
      +          "title": "Id",
      +          "type": "string"
      +        },
      +        "name": {
      +          "title": "Name",
      +          "type": "string"
      +        },
      +        "phone": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "default": null,
      +          "description": "E.164 format, e.g. +15125550123.",
      +          "title": "Phone"
      +        },
      +        "website": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "default": null,
      +          "title": "Website"
      +        }
      +      },
      +      "required": [
      +        "id",
      +        "name"
      +      ],
      +      "title": "PlaceSummary",
      +      "type": "object"
      +    },
      +    "Quota": {
      +      "properties": {
      +        "calls": {
      +          "description": "Tool calls left this month.",
      +          "title": "Calls",
      +          "type": "integer"
      +        },
      +        "export_rows": {
      +          "description": "Export rows left this month.",
      +          "title": "Export Rows",
      +          "type": "integer"
      +        }
      +      },
      +      "required": [
      +        "calls",
      +        "export_rows"
      +      ],
      +      "title": "Quota",
      +      "type": "object"
      +    }
      +  },
      +  "properties": {
      +    "center": {
      +      "anyOf": [
      +        {
      +          "$ref": "#/$defs/Center"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null
      +    },
      +    "csv": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "description": "The CSV text, only when inline=true.",
      +      "title": "Csv"
      +    },
      +    "csv_url": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "description": "Download link, valid 24 hours. Absent when inline=true.",
      +      "title": "Csv Url"
      +    },
      +    "data_release": {
      +      "title": "Data Release",
      +      "type": "string"
      +    },
      +    "expires_in_hours": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "title": "Expires In Hours"
      +    },
      +    "export_id": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "description": "Id for list_exports; absent when nothing matched.",
      +      "title": "Export Id"
      +    },
      +    "note": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "description": "Why the export was capped, if it was.",
      +      "title": "Note"
      +    },
      +    "preview": {
      +      "description": "First 5 rows.",
      +      "items": {
      +        "$ref": "#/$defs/PlaceSummary"
      +      },
      +      "title": "Preview",
      +      "type": "array"
      +    },
      +    "quota_remaining": {
      +      "$ref": "#/$defs/Quota"
      +    },
      +    "rows_in_export": {
      +      "description": "Rows in the CSV (and charged to the export quota).",
      +      "title": "Rows In Export",
      +      "type": "integer"
      +    },
      +    "total_matches": {
      +      "title": "Total Matches",
      +      "type": "integer"
      +    }
      +  },
      +  "required": [
      +    "total_matches",
      +    "rows_in_export",
      +    "preview",
      +    "data_release",
      +    "quota_remaining"
      +  ],
      +  "title": "Export",
      +  "type": "object"
      +}
  3. Changed1 schema field changed
    • addedInput schema / properties / inline
      Added value: +{
      +  "default": false,
      +  "description": "Return the CSV text in the result (csv field, up to 250 rows) instead of a download link. Use when you can't fetch URLs, e.g. in a sandbox that blocks storefinch.com.",
      +  "title": "Inline",
      +  "type": "boolean"
      +}
  4. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations only say readOnlyHint=false and destructiveHint=false; the description goes well beyond by disclosing quota cost ('one export-quota row per row'), the 24-hour link lifetime, the inline mode's 250-row cap, and the default filter behavior that silently drops places lacking a website or phone. The only missing piece is whether a failed/partial export still burns quota.

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?

Front-loads the artifact and its columns, then moves to when-to-use, defaults, and output in a logical order. The long column enumeration is dense but purposeful; a couple of clauses (e.g. repeating the return payload) could be trimmed since an output schema exists.

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?

For a 13-parameter export tool with a rich output schema, the description covers what the file contains, which defaults silently filter rows, quota implications, and how to retrieve the link later. An agent has everything needed to call it correctly and to set expectations about cost.

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 would be 3, but the description adds cross-parameter meaning the schema does not: the default 'website AND phone' retention rule, the require_website/no_website mutual exclusion, and the plan-level cap interacting with max_rows. It stops short of explaining how category ids are discovered beyond naming find_categories.

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 a concrete verb and artifact (build a lead list as CSV, one row per business) and enumerates the columns produced, so the agent knows exactly what it gets. It explicitly distinguishes itself from sibling search_places ('use it instead of paging') and from find_emails/list_exports by scope.

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

Usage Guidelines5/5

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

Gives a concrete switching threshold against the sibling tool ('more than about 100 rows or a file for a spreadsheet or CRM'), states prerequisites (category ids and a location), and explains the follow-up path via list_exports for re-issuing a link for free. Nothing 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.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources