Skip to main content
Glama

Count saved leads

count_saved_leads
Read-onlyIdempotent

FREE and exact. Counts leads THIS ACCOUNT has already searched and saved, matching any combination of filters, with a breakdown of how many are enriched, have an email, have a contact email, or have been relevance-checked. Use it to size a job over data the account already owns before spending: "how many of my saved roofers have no CRM and a verified email". CRITICAL: this is NOT an inventory of what Lyre Leads can find, and a small result here means the account has not searched much yet, nothing more. Never report this number to a user as the amount of data available, and never use it to answer "how many X do you have" — call estimate_list for that.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "count_saved_leads"
  }
}

Input Schema

NameRequiredDescriptionDefault
cityNoSubstring match on city
typeNoSubstring match on the Google Maps business category, e.g. "Dentist"
queryNoSubstring match on the search keyword that found the lead, e.g. "roofing"
countryNoSubstring match on country
has_cmsNotrue = a CMS was detected. false = enriched and none detected (custom/hand-built site).
has_crmNotrue = a CRM was detected. false = enriched and none detected. This is the classic "they have no CRM, sell them one" filter.
enrolledNotrue = enrolled in automatic enrichment: re-read about monthly at no charge. Nothing is enrolled on its own. false = not enrolled; enroll_leads enrolls it, free within the plan's room.
has_emailNotrue = has a business email. false = enriched and confirmed to have none (excludes never-checked rows).
relevanceNoOne of: yes, no, unclear. Was this business judged to be the kind of business this row's own search query asked for? Runs inside enrichment at no extra cost: from the business website, with a verbatim quote from the page in relevance_evidence, or from its Google listing (name and category) when the category settles it, the site can't be read, or there is no site, with no quote. Absent means not judged yet, which is not the same as "no". Filter on "yes" to drop the results Google Maps returned that are not the trade you searched for.
search_idNoRestrict to one batch from search_leads
max_ratingNoMaximum Google star rating. Use with min_reviews to find well-reviewed but poorly-rated businesses.
min_ratingNoMinimum Google star rating
has_websiteNotrue = has a website. false = enriched and confirmed to have none.
max_reviewsNoMaximum Google review count
min_reviewsNoMinimum Google review count
ai_crawler_accessNoOne of: open, partial, blocked, unknown. "blocked" = the site is invisible to AI search engines.
enrichment_statusNoOne of: enriched, pending, unverifiable, no_website, failed
has_contact_emailNotrue = a named contact address is on file.
email_verification_statusNoOne of: verified, catch_all, unknown, invalid

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / relevance / description
      Previous value: -"One of: yes, no, unclear. Did a model reading the business website judge it to be the kind of business this row's own search query asked for? Runs inside enrichment at no extra cost, and every verdict carries a verbatim quote from the page in relevance_evidence. Absent means never judged, which is not the same as \"no\". Filter on \"yes\" to drop the results Google Maps returned that are not the trade you searched for."New value: +"One of: yes, no, unclear. Was this business judged to be the kind of business this row's own search query asked for? Runs inside enrichment at no extra cost: from the business website, with a verbatim quote from the page in relevance_evidence, or from its Google listing (name and category) when the category settles it, the site can't be read, or there is no site, with no quote. Absent means not judged yet, which is not the same as \"no\". Filter on \"yes\" to drop the results Google Maps returned that are not the trade you searched for."
  2. Changed1 schema field changed
    • changedInput schema / properties / enrolled / description
      Previous value: -"true = enrolled in enrichment: re-checked about monthly at no charge. Every business a search found is enrolled. false = not enrolled (usually imported); enroll_leads enrolls it at one token per two businesses."New value: +"true = enrolled in automatic enrichment: re-read about monthly at no charge. Nothing is enrolled on its own. false = not enrolled; enroll_leads enrolls it, free within the plan's room."
  3. Changed1 schema field changed
    • changedInput schema / properties / enrolled / description
      Previous value: -"true = enrolled in enrichment: re-checked about monthly at no charge. Every business a search found is enrolled. false = not enrolled (usually imported); enroll_leads enrolls it at two businesses per lead."New value: +"true = enrolled in enrichment: re-checked about monthly at no charge. Every business a search found is enrolled. false = not enrolled (usually imported); enroll_leads enrolls it at one token per two businesses."
  4. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the readOnly/idempotent annotations: it discloses that the call is free and exact, what the response breaks down into, and the critical semantic that a low count reflects thin prior searching rather than limited available data. It also flags the reporting hazard ('never report this number to a user as the amount of data available'), which is exactly the failure mode an agent would otherwise commit.

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-loaded with the two facts that matter ('FREE and exact', account-scoped), then the misuse warning. The closing warning restates the same hazard in slightly different words ('never report this number' vs 'never use it to answer how many X do you have'), which is defensible emphasis for a high-risk confusion but is mild redundancy.

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 19-parameter, zero-required read-only count tool with no output schema, the description covers what the agent needs: what is counted, which filter dimensions vary the count, what the response breaks down into, and the interpretive trap. Nothing required to call it or report it correctly is missing.

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% and the per-parameter text is already unusually detailed (including the false-means-enriched-and-confirmed semantics), so the schema does the heavy lifting. The description adds only that filters combine in 'any combination' and maps the breakdown to a few fields. That is useful but modest, so the baseline of 3 applies.

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 specific verb and resource ('counts leads THIS ACCOUNT has already searched and saved') plus the scope constraint (data the account already owns) and the return shape (a breakdown of enriched / has email / has contact email / relevance-checked). It explicitly distinguishes itself from estimate_list, which is the tool an agent would otherwise confuse it with.

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 when-to-use ('size a job over data the account already owns before spending') including an example query, plus an explicit when-not-to-use with the named alternative ('never use it to answer "how many X do you have" — call estimate_list for that'). It also tells the agent how to interpret a small result rather than treating it as an error.

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