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.

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 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.
has_emailNotrue = has a business email. false = enriched and confirmed to have none (excludes never-checked rows).
relevanceNoOne 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.
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 / 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."
  2. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Goes well beyond the readOnly/idempotent annotations by disclosing that the call is FREE and exact, that results break down by enriched/has email/contact email/relevance-checked, and that a small result reflects account search history rather than total data available. It even warns against a specific misreporting failure mode, which is behavioral context annotations cannot express.

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?

Front-loads the two key selling points (FREE and exact), then scope, then usage, then a clearly flagged CRITICAL caveat. No redundant sentences; the length is justified by the false-inference risk the tool carries.

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?

Even without an output schema, the description enumerates the returned breakdown (enriched, has an email, contact email, relevance-checked) and the interpretation of results. Combined with a fully covered 19-param schema, nothing an agent needs to call this correctly is missing.

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 19 filters are already documented, and the baseline would be 3. The description adds value by stating filters can be combined in any combination and demonstrating a compound filter ('saved roofers have no CRM and a verified email'), clarifying these act as conjunctive optional constraints.

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 (counts) and a tightly scoped resource (leads THIS ACCOUNT has already searched and saved), and immediately differentiates from the inventory reading by naming estimate_list as the tool for 'how many X do you have'. An agent can route correctly without opening the schema.

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 explicit when-to-use ('size a job over data the account already owns before spending') with a concrete query example, plus two hard exclusions: it is NOT an inventory, and never report the number as available data. The alternative (estimate_list) is named for the excluded case.

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