Skip to main content
Glama
Generect Live API MCP Server

Generect Live API MCP Server

Official
by generect

Count matching leads (free)

count_leads
Read-onlyIdempotent

Estimate how many leads match an ICP and what pulling them costs before running a paid search. Use database mode for free audience sizing; realtime counts incur a flat fee.

Instructions

How many leads match an ICP, and what pulling them would cost at this account's prices. Free: this call never spends credits. It is the only way to size an audience without paying per row, which makes it the first step before search_leads. A realtime count is not free ($0.04 flat at the Tier 0 list price); it runs only when mode:"realtime" is passed explicitly.

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_leads"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNoData mode. "database" = Generect's own index: sub-second, free counts, free thin rows (see detail) or cheaper full rows; it accepts a subset of the filters today and names any it rejects. "realtime" = live LinkedIn lookup, 5–60s, billed per row, accepts every realtime filter. "auto" (default) tries database first and escalates to realtime only if a filter you passed is rejected there (the escalation is reported, and is refused above the per-call spend ceiling). Pick "database" explicitly when you only need a size estimate and cost matters more than freshness.
strictNoFields to match strictly, e.g. ["company_locations"].
keywordsNoFree-text keywords across headline/summary/skills. Realtime only: using it forces the pricier live mode.
personasNoAdvanced raw persona tuples [name, functions, seniorities, prohibits, priority?]. Realtime only: using it forces the pricier live mode.
functionsNoJob functions, e.g. ["Sales","Marketing","Engineering"]. Realtime only: using it forces the pricier live mode.
job_titleNoDEPRECATED alias for job_titles. Still honoured: it is merged into job_titles.
locationsNoWhere the lead lives, as Generect lists places: a country ("United States"), a state or region, or a city with its country ("Berlin, Germany"). A bare city name such as "Berlin" names several places and is refused with HTTP 400 "This location is not listed".
company_idNoAnchor to one company by LinkedIn numeric id.
job_titlesNoTarget job titles, OR-matched (e.g. ["CEO","Founder","Owner"]). A lead needs to match only one.
timeout_msNoRequest timeout in milliseconds.
exclude_idsNoSkip leads by Generect/Sales-Navigator id. Pass the ids you already received to paginate without duplicates. Ordering is not stable, so this is more reliable than offset.
senioritiesNoSeniority at the current employer, e.g. ["Owner","CXO","VP","Director","Manager"]. Current position only.
changed_jobsNoOnly leads who recently changed jobs. Realtime only: using it forces the pricier live mode.
company_linkNoAnchor to one company by LinkedIn URL.
company_nameNoAnchor to one company by name (exclusive with company_link/company_id).
company_typesNoEmployer types: "Public Company","Privately Held","Non Profit","Government Agency","Educational","Self Employed","Self Owned","Partnership".
exclude_namesNoSkip leads by full name. Works in both modes (the database-mode bug that returned 0 rows was fixed in the API on 2026-08-13, PRO-1333). exclude_ids is still the more reliable way to paginate.
get_max_leadsNoDEPRECATED: accepted but ignored. Always on now: search responses include results_count without asking.
company_filtersNoOptional: count leads only at companies matching these company filters (a two-level ICP). Still free in database mode.
lead_industriesNoDEPRECATED: accepted but ignored. Removed: v1 filters on the employer's industry. Use company_industries.
without_companyNoDEPRECATED: accepted but ignored. No longer needed: v1 filter-only search is the default when no company anchor is set.
years_in_companyNoTime at current company, same buckets as years_in_position. Realtime only: using it forces the pricier live mode.
company_locationsNoHQ location of the lead's current employer, written as in locations ("Berlin, Germany").
exclude_locationsNoLead locations to exclude, written as in locations.
filter_empty_varsNoDrop leads where these fields are empty, e.g. ["profile_photo","job_started_on"]. Useful to raise data quality before paying.
years_in_positionNoTime in current role: 1=<1y, 2=1-2y, 3=3-5y, 4=6-10y, 5=10y+. Realtime only: using it forces the pricier live mode.
company_headcountsNoEmployer size buckets. Allowed ONLY: "1-10","11-50","51-200","201-500","501-1000","1001-5000","5001-10000","10 000+" (note the space in "10 000+").
company_industriesNoIndustry of the current employer. Must match Generect industry names exactly (e.g. "Software Development", "Financial Services"); names are hierarchical and unknown names are rejected with HTTP 400 naming the field.
past_company_namesNoCompanies the lead previously worked at (alumni targeting). Realtime only: using it forces the pricier live mode.
posted_on_linkedinNoOnly leads who recently posted on LinkedIn. Realtime only: using it forces the pricier live mode.
linkedin_filter_linkNoA LinkedIn / Sales Navigator search URL to lift filters from. Realtime only: using it forces the pricier live mode.
allow_unlisted_valuesNoEscape hatch. This server checks industry / seniority / headcount / company-type values against the LinkedIn vocabularies before sending, because the API silently returns 0 results for an unknown industry or seniority instead of rejecting it. Set true only when you are sure a value is valid and this server is out of date.
exclude_title_keywordsNoDEPRECATED: accepted but ignored. No v1 equivalent. Narrow job_titles instead, or filter the returned rows yourself.
exclude_company_locationsNoEmployer HQ locations to exclude, written as in locations.
exclude_company_headcountsNoEmployer size buckets to exclude.
exclude_company_industriesNoEmployer industries to exclude.

Output Schema

NameRequiredDescriptionDefault
fixNo
whyNo
costNo
modeNo
adviceNo
statusNo
optionsNo
test_modeNo
results_countNo
needs_realtimeNo
test_mode_noticeNo
next_step_estimateNo
vocabulary_warningsNo
blocked_by_vocabularyNo
deprecated_params_ignoredNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv0.13.3
    • changedInput schema / properties / company_filters / properties / exclude_locations / description
      Previous value: -"HQ locations to exclude."New value: +"HQ locations to exclude, written as in locations."
    • changedInput schema / properties / company_filters / properties / locations / description
      Previous value: -"HQ locations: cities, states or countries."New value: +"HQ locations, as Generect lists places: a country, a state or region, or a city with its country (\"Berlin, Germany\"). A bare city name is refused with HTTP 400 \"This location is not listed\"."
    • changedInput schema / properties / company_filters / properties / sub_industries / description
      Previous value: -"Expand each selected industry to its sub-industries as well (broadens the match)."New value: +"How industries maps onto the LinkedIn industry tree. Default false: each selected industry also matches its sub-industries (\"Software Development\" includes \"Computer Games\"). true: only the industries named."
    • changedInput schema / properties / company_locations / description
      Previous value: -"HQ location of the lead's current employer."New value: +"HQ location of the lead's current employer, written as in locations (\"Berlin, Germany\")."
    • changedInput schema / properties / exclude_company_locations / description
      Previous value: -"Employer HQ locations to exclude."New value: +"Employer HQ locations to exclude, written as in locations."
    • changedInput schema / properties / exclude_locations / description
      Previous value: -"Lead locations to exclude."New value: +"Lead locations to exclude, written as in locations."
    • changedInput schema / properties / locations / description
      Previous value: -"Where the lead lives: matches cities, states and countries, e.g. [\"United States\",\"Berlin\"]."New value: +"Where the lead lives, as Generect lists places: a country (\"United States\"), a state or region, or a city with its country (\"Berlin, Germany\"). A bare city name such as \"Berlin\" names several places and is refused with HTTP 400 \"This location is not listed\"."
  2. Changed32 schema fields changedv0.13.2
    • changedInput schema / properties / changed_jobs / description
      Previous value: -"Only leads who recently changed jobs — realtime only: using it forces the pricier live mode."New value: +"Only leads who recently changed jobs. Realtime only: using it forces the pricier live mode."
    • changedInput schema / properties / company_filters / properties / allow_unlisted_values / description
      Previous value: -"Escape hatch for the local vocabulary check — see the lead-side field of the same name."New value: +"Escape hatch for the local vocabulary check; see the lead-side field of the same name."
    • changedInput schema / properties / company_filters / properties / company_names / description
      Previous value: -"Restrict to specific company names — realtime only: using it forces the pricier live mode."New value: +"Restrict to specific company names. Realtime only: using it forces the pricier live mode."
    • changedInput schema / properties / company_filters / properties / department_headcount / description
      Previous value: -"Department size, e.g. {\"name\":\"engineering\",\"min\":10,\"max\":100} — realtime only: using it forces the pricier live mode."New value: +"Department size, e.g. {\"name\":\"engineering\",\"min\":10,\"max\":100}. Realtime only: using it forces the pricier live mode."
    • changedInput schema / properties / company_filters / properties / headcount_growth / description
      Previous value: -"Headcount growth in percent — realtime only: using it forces the pricier live mode."New value: +"Headcount growth in percent. Realtime only: using it forces the pricier live mode."
    • changedInput schema / properties / company_filters / properties / hiring_on_linkedin / description
      Previous value: -"Only companies actively hiring — realtime only: using it forces the pricier live mode."New value: +"Only companies actively hiring. Realtime only: using it forces the pricier live mode."
    • changedInput schema / properties / company_filters / properties / keywords / description
      Previous value: -"Free-text keywords across name/description/specialties — realtime only: using it forces the pricier live mode."New value: +"Free-text keywords across name/description/specialties. Realtime only: using it forces the pricier live mode."
    • changedInput schema / properties / company_filters / properties / linkedins_links / description
      Previous value: -"Specific LinkedIn company URLs — realtime only: using it forces the pricier live mode."New value: +"Specific LinkedIn company URLs. Realtime only: using it forces the pricier live mode."
    • changedInput schema / properties / company_filters / properties / locations / description
      Previous value: -"HQ locations — cities, states or countries."New value: +"HQ locations: cities, states or countries."
    • changedInput schema / properties / company_filters / properties / num_of_followers / description
      Previous value: -"LinkedIn follower buckets: \"1-50\",\"51-100\",\"101-1000\",\"1001-5000\",\"5001+\" — realtime only: using it forces the pricier live mode."New value: +"LinkedIn follower buckets: \"1-50\",\"51-100\",\"101-1000\",\"1001-5000\",\"5001+\". Realtime only: using it forces the pricier live mode."
    • changedInput schema / properties / company_filters / properties / revenues_range / description
      Previous value: -"Annual revenue range, single object {min,max} — realtime only: using it forces the pricier live mode."New value: +"Annual revenue range, single object {min,max}. Realtime only: using it forces the pricier live mode."
    • changedInput schema / properties / company_filters / properties / technologies / description
      Previous value: -"Technologies the company uses — realtime only: using it forces the pricier live mode."New value: +"Technologies the company uses. Realtime only: using it forces the pricier live mode."
    • changedInput schema / properties / exclude_ids / description
      Previous value: -"Skip leads by Generect/Sales-Navigator id. Pass the ids you already received to paginate without duplicates — ordering is not stable, so this is more reliable than offset."New value: +"Skip leads by Generect/Sales-Navigator id. Pass the ids you already received to paginate without duplicates. Ordering is not stable, so this is more reliable than offset."
    • changedInput schema / properties / exclude_title_keywords / description
      Previous value: -"DEPRECATED — accepted but ignored. No v1 equivalent. Narrow job_titles instead, or filter the returned rows yourself."New value: +"DEPRECATED: accepted but ignored. No v1 equivalent. Narrow job_titles instead, or filter the returned rows yourself."
    • addedInput schema / properties / exclude_title_keywords / items
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / exclude_title_keywords / type
      Added value: +"array"
    • changedInput schema / properties / functions / description
      Previous value: -"Job functions, e.g. [\"Sales\",\"Marketing\",\"Engineering\"] — realtime only: using it forces the pricier live mode."New value: +"Job functions, e.g. [\"Sales\",\"Marketing\",\"Engineering\"]. Realtime only: using it forces the pricier live mode."
    • changedInput schema / properties / get_max_leads / description
      Previous value: -"DEPRECATED — accepted but ignored. Always on now: search responses include results_count without asking."New value: +"DEPRECATED: accepted but ignored. Always on now: search responses include results_count without asking."
    • addedInput schema / properties / get_max_leads / type
      Added value: +"boolean"
    • changedInput schema / properties / keywords / description
      Previous value: -"Free-text keywords across headline/summary/skills — realtime only: using it forces the pricier live mode."New value: +"Free-text keywords across headline/summary/skills. Realtime only: using it forces the pricier live mode."
    • changedInput schema / properties / lead_industries / description
      Previous value: -"DEPRECATED — accepted but ignored. Removed: v1 filters on the employer's industry. Use company_industries."New value: +"DEPRECATED: accepted but ignored. Removed: v1 filters on the employer's industry. Use company_industries."
    • addedInput schema / properties / lead_industries / items
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / lead_industries / type
      Added value: +"array"
    • changedInput schema / properties / linkedin_filter_link / description
      Previous value: -"A LinkedIn / Sales Navigator search URL to lift filters from — realtime only: using it forces the pricier live mode."New value: +"A LinkedIn / Sales Navigator search URL to lift filters from. Realtime only: using it forces the pricier live mode."
    • changedInput schema / properties / locations / description
      Previous value: -"Where the lead lives — matches cities, states and countries, e.g. [\"United States\",\"Berlin\"]."New value: +"Where the lead lives: matches cities, states and countries, e.g. [\"United States\",\"Berlin\"]."
    • changedInput schema / properties / past_company_names / description
      Previous value: -"Companies the lead previously worked at (alumni targeting) — realtime only: using it forces the pricier live mode."New value: +"Companies the lead previously worked at (alumni targeting). Realtime only: using it forces the pricier live mode."
    • changedInput schema / properties / personas / description
      Previous value: -"Advanced raw persona tuples [name, functions, seniorities, prohibits, priority?] — realtime only: using it forces the pricier live mode."New value: +"Advanced raw persona tuples [name, functions, seniorities, prohibits, priority?]. Realtime only: using it forces the pricier live mode."
    • changedInput schema / properties / posted_on_linkedin / description
      Previous value: -"Only leads who recently posted on LinkedIn — realtime only: using it forces the pricier live mode."New value: +"Only leads who recently posted on LinkedIn. Realtime only: using it forces the pricier live mode."
    • changedInput schema / properties / without_company / description
      Previous value: -"DEPRECATED — accepted but ignored. No longer needed — v1 filter-only search is the default when no company anchor is set."New value: +"DEPRECATED: accepted but ignored. No longer needed: v1 filter-only search is the default when no company anchor is set."
    • addedInput schema / properties / without_company / type
      Added value: +"boolean"
    • changedInput schema / properties / years_in_company / description
      Previous value: -"Time at current company, same buckets as years_in_position — realtime only: using it forces the pricier live mode."New value: +"Time at current company, same buckets as years_in_position. Realtime only: using it forces the pricier live mode."
    • changedInput schema / properties / years_in_position / description
      Previous value: -"Time in current role: 1=<1y, 2=1-2y, 3=3-5y, 4=6-10y, 5=10y+ — realtime only: using it forces the pricier live mode."New value: +"Time in current role: 1=<1y, 2=1-2y, 3=3-5y, 4=6-10y, 5=10y+. Realtime only: using it forces the pricier live mode."
  3. Changed15 schema fields changedv0.12.2
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
    • removedInput schema / properties / company_filters / additionalProperties
      Removed value: -false
    • removedInput schema / properties / company_filters / properties / department_headcount / additionalProperties
      Removed value: -false
    • removedInput schema / properties / company_filters / properties / headcount_growth / additionalProperties
      Removed value: -false
    • removedInput schema / properties / company_filters / properties / revenues_range / additionalProperties
      Removed value: -false
    • changedInput schema / properties / exclude_names / description
      Previous value: -"Skip leads by full name. KNOWN ISSUE: in database mode any non-empty value collapses the result set to 0 (verified 2026-08-09); it behaves correctly in realtime mode. Prefer exclude_ids, or filter names out yourself after the search."New value: +"Skip leads by full name. Works in both modes (the database-mode bug that returned 0 rows was fixed in the API on 2026-08-13, PRO-1333). exclude_ids is still the more reliable way to paginate."
    • changedInput schema / properties / mode / description
      Previous value: -"Data mode. \"database\" = cached, sub-second, cheaper, free counts, core filters only. \"realtime\" = live LinkedIn lookup, 5–60s, pricier, supports every filter. \"auto\" (default) tries database first and only escalates to realtime if a filter you passed is unsupported there — an escalation is reported in the response. Pick \"database\" explicitly when you only need a size estimate and cost matters more than freshness."New value: +"Data mode. \"database\" = Generect's own index: sub-second, free counts, free thin rows (see detail) or cheaper full rows; it accepts a subset of the filters today and names any it rejects. \"realtime\" = live LinkedIn lookup, 5–60s, billed per row, accepts every realtime filter. \"auto\" (default) tries database first and escalates to realtime only if a filter you passed is rejected there (the escalation is reported, and is refused above the per-call spend ceiling). Pick \"database\" explicitly when you only need a size estimate and cost matters more than freshness."
    • addedInput schema / properties / personas / items
      Added value: +{}
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedOutput schema / properties / blocked_by_vocabulary / $ref
      Removed value: -"#/properties/vocabulary_warnings"
    • addedOutput schema / properties / blocked_by_vocabulary / items
      Added value: +{}
    • addedOutput schema / properties / blocked_by_vocabulary / type
      Added value: +"array"
    • addedOutput schema / properties / deprecated_params_ignored / propertyNames
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / vocabulary_warnings / items
      Added value: +{}
  4. Addedv0.9.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/openWorld, but the description adds the economically decisive behavior an agent cannot infer: this call never spends credits, a realtime count is $0.04 flat at Tier 0, and realtime is only triggered by an explicit mode. That is exactly the kind of consequence-of-invocation context the annotations do not carry.

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 tight sentences, front-loaded with what the tool returns, then the free guarantee, then the paid exception. Nothing is repeated from the title or schema, and the highest-stakes fact (free unless realtime is explicit) is placed where it will be read first.

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 36-parameter counting tool with full schema descriptions and an output schema, the description covers the two things structured data cannot: the cost model and the correct call sequence relative to search_leads. Nothing an agent needs in order to invoke it safely 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 baseline is 3, and the description earns a bump by attaching cost semantics to the one parameter that matters most: mode:"realtime" must be passed explicitly or the call stays free, and the $0.04 flat Tier 0 price is a concrete number the schema does not state. It adds no guidance on the other 35 parameters, but the schema fully covers those.

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+resource pair ("How many leads match an ICP") plus the secondary output (the cost of pulling them), which tells an agent exactly what the call returns conceptually. It also distinguishes itself from search_leads by positioning itself as the sizing step, so the boundary between the two tools is unambiguous.

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?

Gives explicit sequencing guidance: it is "the first step before search_leads," and it names the only condition under which the paid path runs (mode:"realtime" passed explicitly). It stops short of stating when to skip counting entirely or pointing at the company-side sibling for company sizing, so the routing is clear but not exhaustive.

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