Skip to main content
Glama

Count companies

count_companies
Read-only

FREE — Use when your user asks how big a market is or how many companies fit a description. how many companies match (market size), e.g. { filters: { countries: ["IT"], naics: ["315"] } }; with by (needs a key) broken down by one dimension (countries, states, industries, naics, employees, revenue …). Exact values from search_options (for: companies). Loading the companies into a list is load_companies (priced in options).

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": {
      "filters": "<filters>"
    },
    "name": "count_companies"
  }
}

Input Schema

NameRequiredDescriptionDefault
byNoOne dimension to break the total down by: regions, countries, states, industries, sub_industries, naics, employees, reported_employees, revenue, company_types, categories, growth, departments
filtersYesCompany filters. Copy the exact values of each from search_options { for: "companies", category: "<the filter's name>" }
languageNoLanguage of `tell_your_user` (default en)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed24 schema fields changed
    • addedInput schema / properties / filters / properties / categories / maxItems
      Added value: +8
    • addedInput schema / properties / filters / properties / company_types / maxItems
      Added value: +8
    • addedInput schema / properties / filters / properties / countries / maxItems
      Added value: +60
    • addedInput schema / properties / filters / properties / departments / maxItems
      Added value: +12
    • addedInput schema / properties / filters / properties / employees / maxItems
      Added value: +8
    • addedInput schema / properties / filters / properties / exclude / properties / categories / maxItems
      Added value: +8
    • addedInput schema / properties / filters / properties / exclude / properties / company_types / maxItems
      Added value: +8
    • addedInput schema / properties / filters / properties / exclude / properties / countries / maxItems
      Added value: +60
    • addedInput schema / properties / filters / properties / exclude / properties / employees / maxItems
      Added value: +8
    • addedInput schema / properties / filters / properties / exclude / properties / industries / maxItems
      Added value: +20
    • addedInput schema / properties / filters / properties / exclude / properties / naics / maxItems
      Added value: +60
    • addedInput schema / properties / filters / properties / exclude / properties / regions / maxItems
      Added value: +10
    • addedInput schema / properties / filters / properties / exclude / properties / reported_employees / maxItems
      Added value: +8
    • addedInput schema / properties / filters / properties / exclude / properties / revenue / maxItems
      Added value: +7
    • addedInput schema / properties / filters / properties / exclude / properties / states / maxItems
      Added value: +60
    • addedInput schema / properties / filters / properties / growth / maxItems
      Added value: +1
    • addedInput schema / properties / filters / properties / industries / maxItems
      Added value: +20
    • addedInput schema / properties / filters / properties / keywords / maxItems
      Added value: +20
    • addedInput schema / properties / filters / properties / naics / maxItems
      Added value: +60
    • addedInput schema / properties / filters / properties / regions / maxItems
      Added value: +10
    • addedInput schema / properties / filters / properties / reported_employees / maxItems
      Added value: +8
    • addedInput schema / properties / filters / properties / revenue / maxItems
      Added value: +7
    • addedInput schema / properties / filters / properties / states / maxItems
      Added value: +60
    • addedInput schema / properties / filters / properties / technologies / maxItems
      Added value: +20
  2. Changed74 schema fields changed
    • removedInput schema / properties / by / maxLength
      Removed value: -30
    • changedInput schema / properties / filters / description
      Previous value: -"Company filters — exact values from search_options (for: companies)"New value: +"Company filters. Copy the exact values of each from search_options { for: \"companies\", category: \"<the filter's name>\" }"
    • changedInput schema / properties / filters / properties / categories / description
      Previous value: -"Business models, e.g. b2b, saas, e-commerce — exact values: search_options { for: \"companies\", category: \"<this name>\" }"New value: +"Business models, e.g. b2b, saas, e-commerce"
    • removedInput schema / properties / filters / properties / categories / items / maxLength
      Removed value: -120
    • removedInput schema / properties / filters / properties / categories / maxItems
      Removed value: -8
    • changedInput schema / properties / filters / properties / company_types / description
      Previous value: -"Company types, e.g. private, public, nonprofit — exact values: search_options { for: \"companies\", category: \"<this name>\" }"New value: +"Company types, e.g. private, public, nonprofit"
    • removedInput schema / properties / filters / properties / company_types / items / maxLength
      Removed value: -120
    • removedInput schema / properties / filters / properties / company_types / maxItems
      Removed value: -8
    • changedInput schema / properties / filters / properties / countries / description
      Previous value: -"Countries as ISO codes, e.g. US, DE — exact values: search_options { for: \"companies\", category: \"<this name>\" }"New value: +"Countries as ISO codes, e.g. US, DE"
    • removedInput schema / properties / filters / properties / countries / items / maxLength
      Removed value: -120
    • removedInput schema / properties / filters / properties / countries / maxItems
      Removed value: -60
    • changedInput schema / properties / filters / properties / departments / description
      Previous value: -"Has a team of at least 5 in each of these departments — exact values: search_options { for: \"companies\", category: \"<this name>\" }"New value: +"Has a team of at least 5 in each of these departments"
    • removedInput schema / properties / filters / properties / departments / items / maxLength
      Removed value: -120
    • removedInput schema / properties / filters / properties / departments / maxItems
      Removed value: -12
    • changedInput schema / properties / filters / properties / employees / description
      Previous value: -"Head count classes (estimated), e.g. 51-200 — exact values: search_options { for: \"companies\", category: \"<this name>\" }"New value: +"Head count classes (estimated), e.g. 51-200"
    • removedInput schema / properties / filters / properties / employees / items / maxLength
      Removed value: -120
    • removedInput schema / properties / filters / properties / employees / maxItems
      Removed value: -8
    • changedInput schema / properties / filters / properties / exclude / description
      Previous value: -"Values a company must NOT have, same keys"New value: +"Values a company must NOT have — the same keys as the pick filters above"
    • removedInput schema / properties / filters / properties / exclude / properties / categories / description
      Removed value: -"Business models, e.g. b2b, saas, e-commerce — exact values: search_options { for: \"companies\", category: \"<this name>\" }"
    • removedInput schema / properties / filters / properties / exclude / properties / categories / items / maxLength
      Removed value: -120
    • removedInput schema / properties / filters / properties / exclude / properties / categories / maxItems
      Removed value: -8
    • removedInput schema / properties / filters / properties / exclude / properties / company_types / description
      Removed value: -"Company types, e.g. private, public, nonprofit — exact values: search_options { for: \"companies\", category: \"<this name>\" }"
    • removedInput schema / properties / filters / properties / exclude / properties / company_types / items / maxLength
      Removed value: -120
    • removedInput schema / properties / filters / properties / exclude / properties / company_types / maxItems
      Removed value: -8
    • removedInput schema / properties / filters / properties / exclude / properties / countries / description
      Removed value: -"Countries as ISO codes, e.g. US, DE — exact values: search_options { for: \"companies\", category: \"<this name>\" }"
    • removedInput schema / properties / filters / properties / exclude / properties / countries / items / maxLength
      Removed value: -120
    • removedInput schema / properties / filters / properties / exclude / properties / countries / maxItems
      Removed value: -60
    • removedInput schema / properties / filters / properties / exclude / properties / employees / description
      Removed value: -"Head count classes (estimated), e.g. 51-200 — exact values: search_options { for: \"companies\", category: \"<this name>\" }"
    • removedInput schema / properties / filters / properties / exclude / properties / employees / items / maxLength
      Removed value: -120
    • removedInput schema / properties / filters / properties / exclude / properties / employees / maxItems
      Removed value: -8
    • removedInput schema / properties / filters / properties / exclude / properties / industries / description
      Removed value: -"Industries: \"Wider\" or \"Wider/Part\" names — exact values: search_options { for: \"companies\", category: \"<this name>\" }"
    • removedInput schema / properties / filters / properties / exclude / properties / industries / items / maxLength
      Removed value: -120
    • removedInput schema / properties / filters / properties / exclude / properties / industries / maxItems
      Removed value: -20
    • removedInput schema / properties / filters / properties / exclude / properties / naics / description
      Removed value: -"NAICS 2022 codes, any level (2–6 digits) — exact values: search_options { for: \"companies\", category: \"<this name>\" }"
    • removedInput schema / properties / filters / properties / exclude / properties / naics / items / maxLength
      Removed value: -120
    • removedInput schema / properties / filters / properties / exclude / properties / naics / maxItems
      Removed value: -60
    • removedInput schema / properties / filters / properties / exclude / properties / regions / description
      Removed value: -"World regions (ids) — exact values: search_options { for: \"companies\", category: \"<this name>\" }"
    • removedInput schema / properties / filters / properties / exclude / properties / regions / items / maxLength
      Removed value: -120
    • removedInput schema / properties / filters / properties / exclude / properties / regions / maxItems
      Removed value: -10
    • removedInput schema / properties / filters / properties / exclude / properties / reported_employees / description
      Removed value: -"Head count classes as the company reports them — exact values: search_options { for: \"companies\", category: \"<this name>\" }"
    • removedInput schema / properties / filters / properties / exclude / properties / reported_employees / items / maxLength
      Removed value: -120
    • removedInput schema / properties / filters / properties / exclude / properties / reported_employees / maxItems
      Removed value: -8
    • removedInput schema / properties / filters / properties / exclude / properties / revenue / description
      Removed value: -"Annual revenue classes (USD), e.g. 10m-50m — exact values: search_options { for: \"companies\", category: \"<this name>\" }"
    • removedInput schema / properties / filters / properties / exclude / properties / revenue / items / maxLength
      Removed value: -120
    • removedInput schema / properties / filters / properties / exclude / properties / revenue / maxItems
      Removed value: -7
    • removedInput schema / properties / filters / properties / exclude / properties / states / description
      Removed value: -"States / regions of ONE country (ids; needs exactly one country) — exact values: search_options { for: \"companies\", category: \"<this name>\" }"
    • removedInput schema / properties / filters / properties / exclude / properties / states / items / maxLength
      Removed value: -120
    • removedInput schema / properties / filters / properties / exclude / properties / states / maxItems
      Removed value: -60
    • changedInput schema / properties / filters / properties / growth / description
      Previous value: -"Head count change over 12 months (one value: shrinking, stable, growing, fast) — exact values: search_options { for: \"companies\", category: \"<this name>\" }"New value: +"Head count change over 12 months (one value: shrinking, stable, growing, fast)"
    • removedInput schema / properties / filters / properties / growth / items / maxLength
      Removed value: -120
    • removedInput schema / properties / filters / properties / growth / maxItems
      Removed value: -1
    • changedInput schema / properties / filters / properties / industries / description
      Previous value: -"Industries: \"Wider\" or \"Wider/Part\" names — exact values: search_options { for: \"companies\", category: \"<this name>\" }"New value: +"Industries: \"Wider\" or \"Wider/Part\" names"
    • removedInput schema / properties / filters / properties / industries / items / maxLength
      Removed value: -120
    • removedInput schema / properties / filters / properties / industries / maxItems
      Removed value: -20
    • removedInput schema / properties / filters / properties / keywords / items / maxLength
      Removed value: -100
    • removedInput schema / properties / filters / properties / keywords / maxItems
      Removed value: -20
    • changedInput schema / properties / filters / properties / naics / description
      Previous value: -"NAICS 2022 codes, any level (2–6 digits) — exact values: search_options { for: \"companies\", category: \"<this name>\" }"New value: +"NAICS 2022 codes, any level (2–6 digits)"
    • removedInput schema / properties / filters / properties / naics / items / maxLength
      Removed value: -120
    • removedInput schema / properties / filters / properties / naics / maxItems
      Removed value: -60
    • removedInput schema / properties / filters / properties / name_contains / maxLength
      Removed value: -250
    • changedInput schema / properties / filters / properties / regions / description
      Previous value: -"World regions (ids) — exact values: search_options { for: \"companies\", category: \"<this name>\" }"New value: +"World regions (ids)"
    • removedInput schema / properties / filters / properties / regions / items / maxLength
      Removed value: -120
    • removedInput schema / properties / filters / properties / regions / maxItems
      Removed value: -10
    • changedInput schema / properties / filters / properties / reported_employees / description
      Previous value: -"Head count classes as the company reports them — exact values: search_options { for: \"companies\", category: \"<this name>\" }"New value: +"Head count classes as the company reports them"
    • removedInput schema / properties / filters / properties / reported_employees / items / maxLength
      Removed value: -120
    • removedInput schema / properties / filters / properties / reported_employees / maxItems
      Removed value: -8
    • changedInput schema / properties / filters / properties / revenue / description
      Previous value: -"Annual revenue classes (USD), e.g. 10m-50m — exact values: search_options { for: \"companies\", category: \"<this name>\" }"New value: +"Annual revenue classes (USD), e.g. 10m-50m"
    • removedInput schema / properties / filters / properties / revenue / items / maxLength
      Removed value: -120
    • removedInput schema / properties / filters / properties / revenue / maxItems
      Removed value: -7
    • changedInput schema / properties / filters / properties / states / description
      Previous value: -"States / regions of ONE country (ids; needs exactly one country) — exact values: search_options { for: \"companies\", category: \"<this name>\" }"New value: +"States / regions of ONE country (ids; needs exactly one country)"
    • removedInput schema / properties / filters / properties / states / items / maxLength
      Removed value: -120
    • removedInput schema / properties / filters / properties / states / maxItems
      Removed value: -60
    • removedInput schema / properties / filters / properties / technologies / items / maxLength
      Removed value: -100
    • removedInput schema / properties / filters / properties / technologies / maxItems
      Removed value: -20
  3. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, openWorldHint=true and destructiveHint=false, so safety is covered. The description adds genuinely new context: this call is free while loading companies into a list is priced in `options`, and exact filter values must come from search_options. It does not describe the returned count object, but the operation is simple enough that this is minor.

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 free/cost signal and the usage trigger, then the example, then the alternative tool — a sensible order with no filler. The middle is written as comma-spliced fragments ('how many companies match ...; with `by` ...') that read awkwardly, but no sentence is wasted.

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?

Covers intent, cost, breakdown behavior, value sourcing, and the sibling alternative for a three-parameter read-only counting tool with no output schema. What an agent needs to call it correctly is present; only the shape of the returned count/breakdown is unaddressed, which is acceptable given no output schema exists.

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%, so filters and the `by` enum are already fully documented, which sets the baseline at 3. The description adds a concrete example filter payload and the note that `by` 'needs a key', which hints at a relationship between the breakdown dimension and the filter keys, but that relationship is left ambiguous rather than explained.

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 (count) and resource (companies matching a filter set), and explicitly frames the user question it answers ('how big a market is'). The final sentence distinguishes it from load_companies, so an agent can choose 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 Guidelines5/5

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

Gives an explicit trigger ('when your user asks how big a market is or how many companies fit a description'), names the alternative for the other intent (load_companies), and points to search_options for the values needed to build filters. When-to-use and when-not-to-use are both covered.

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.