Skip to main content
Glama

Count matching companies (free)

count_companies
Read-onlyIdempotent

How many companies match an ICP, and what pulling them would cost. Free: this call never spends credits. The first step before search_companies. As with count_leads, a realtime count costs $0.04 at the Tier 0 list price and 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_companies"
  }
}

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.
keywordsNoFree-text keywords across name/description/specialties. Realtime only: using it forces the pricier live mode.
locationsNoHQ locations: cities, states or countries.
headcountsNoSize buckets. Allowed ONLY: "1-10","11-50","51-200","201-500","501-1000","1001-5000","5001-10000","10 000+".
industriesNoCompany industries. Must match Generect industry names exactly (e.g. "Software Development"); unknown names are rejected with HTTP 400.
timeout_msNoRequest timeout in milliseconds.
exclude_idsNoExclude companies by LinkedIn id/URN.
technologiesNoTechnologies the company uses. Realtime only: using it forces the pricier live mode.
company_namesNoRestrict to specific company names. Realtime only: using it forces the pricier live mode.
company_typesNoCompany types: "Public Company","Privately Held","Non Profit","Government Agency","Educational", …
revenues_rangeNoAnnual revenue range, single object {min,max}. Realtime only: using it forces the pricier live mode.
sub_industriesNoExpand each selected industry to its sub-industries as well (broadens the match).
exclude_domainsNoExclude companies by domain (e.g. existing customers).
linkedins_linksNoSpecific LinkedIn company URLs. Realtime only: using it forces the pricier live mode.
headcount_growthNoHeadcount growth in percent. Realtime only: using it forces the pricier live mode.
num_of_followersNoLinkedIn follower buckets: "1-50","51-100","101-1000","1001-5000","5001+". Realtime only: using it forces the pricier live mode.
exclude_locationsNoHQ locations to exclude.
get_max_companiesNoDEPRECATED: accepted but ignored. Always on now: search responses include results_count without asking.
exclude_industriesNoIndustries to exclude.
hiring_on_linkedinNoOnly companies actively hiring. Realtime only: using it forces the pricier live mode.
fallback_from_leadsNoDEPRECATED: accepted but ignored. Removed. It fabricated lead-derived name aggregates and cost an extra billable query.
department_headcountNoDepartment size, e.g. {"name":"engineering","min":10,"max":100}. Realtime only: using it forces the pricier live mode.
allow_unlisted_valuesNoEscape hatch for the local vocabulary check; see the lead-side field of the same name.

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. Changed15 schema fields changed
    • changedInput schema / 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_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 / 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 / fallback_from_leads / description
      Previous value: -"DEPRECATED — accepted but ignored. Removed. It fabricated lead-derived name aggregates and cost an extra billable query."New value: +"DEPRECATED: accepted but ignored. Removed. It fabricated lead-derived name aggregates and cost an extra billable query."
    • addedInput schema / properties / fallback_from_leads / type
      Added value: +"boolean"
    • changedInput schema / properties / get_max_companies / 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_companies / type
      Added value: +"boolean"
    • changedInput schema / 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 / 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 / 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 / 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 / locations / description
      Previous value: -"HQ locations — cities, states or countries."New value: +"HQ locations: cities, states or countries."
    • changedInput schema / 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 / 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 / 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."
  2. Changed11 schema fields changed
    • 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 / department_headcount / additionalProperties
      Removed value: -false
    • removedInput schema / properties / headcount_growth / additionalProperties
      Removed value: -false
    • removedInput schema / properties / revenues_range / additionalProperties
      Removed value: -false
    • 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: +{}
  3. Changed1 schema field changed
    • 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."
  4. Changed2 schema fields changed
    • addedInput schema / properties / allow_unlisted_values
      Added value: +{
      +  "description": "Escape hatch for the local vocabulary check — see the lead-side field of the same name.",
      +  "type": "boolean"
      +}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "advice": {
      +      "type": "string"
      +    },
      +    "blocked_by_vocabulary": {
      +      "$ref": "#/properties/vocabulary_warnings"
      +    },
      +    "cost": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "amount_charged_usd": {
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "billed": {
      +          "type": "string"
      +        },
      +        "note": {
      +          "type": "string"
      +        },
      +        "operation": {
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "deprecated_params_ignored": {
      +      "additionalProperties": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "fix": {
      +      "type": "string"
      +    },
      +    "mode": {
      +      "type": "string"
      +    },
      +    "needs_realtime": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "next_step_estimate": {},
      +    "options": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "results_count": {
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "status": {
      +      "type": "string"
      +    },
      +    "test_mode": {
      +      "type": "boolean"
      +    },
      +    "test_mode_notice": {
      +      "type": "string"
      +    },
      +    "vocabulary_warnings": {
      +      "type": "array"
      +    },
      +    "why": {
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  5. Added

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, open-world, so the safety profile is covered; the description usefully adds cost behavior and the explicit-mode billing gate. However it undercuts itself by asserting "this call never spends credits" and then two sentences later that a realtime count costs $0.04 — an agent may misjudge spend risk from the first claim alone. That internal tension is a transparency defect even though it does not contradict the annotations.

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?

Three short sentences, front-loaded with purpose and cost, with no filler or padding. The only structural flaw is that the "Free/never spends credits" claim sits before the $0.04 clarification, forcing the reader to reconcile them.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 23-parameter, zero-required, output-schema-bearing count tool, the description supplies the two things the schema cannot: ordering in the workflow and the spend model. The remaining ambiguity is the free-vs-$0.04 billing statement rather than any missing capability.

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% across 23 parameters, including a fully documented mode enum, so the schema carries the parameter burden and baseline 3 applies. The description only echoes the mode:"realtime" trigger already spelled out in the mode field's own description.

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?

"How many companies match an ICP, and what pulling them would cost" states a specific verb (count) and resource (companies) plus the secondary output (cost estimate). It also explicitly positions itself relative to search_companies, so an agent can tell the lightweight counting tool apart from the pulling tool without opening either schema.

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?

"The first step before search_companies" gives a clear sequencing rule, and the realtime sentence gives the condition under which paid behavior triggers (mode:"realtime" passed explicitly). It does not state when to skip counting altogether, but the when-to-use guidance is concrete and actionable.

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.