Skip to main content
Glama

Count Company Segment

count_company_segment
Read-only

Count matching companies for segment filters without loading company/contact rows. Use this for "how many companies" questions. Free to call; does not consume account balance. Supports webshopStatus, webshopPlatforms, and targetMarket filters. webshopPlatforms is only valid when webshopStatus is "identified" or omitted. Supports company keyword taxonomy filtering through keywordCategoryFilter. Use list_keyword_categories for broad main categories and search_keyword_subcategories for specific business activities. Pass only canonical returned name values; never pass localized labels or raw keywords. Your account exclusion list always applies automatically and cannot be disabled. Optional customerListMode: "exclude" removes companies on your customer list (net-new prospecting), "limit" returns only customer-list companies, "ignore" or omitted ignores the customer list. Exclude/limit require an active customer list managed in the web app (Company lists). Does not support pagination and always returns a total count.

Input Schema

NameRequiredDescriptionDefault
companyIdNoOptional company ID filter. Restricts results to one company when provided.
countryIdYesCountry ID. Use list_countries to discover valid values. Note: IDs are negative integers as stored in the database (e.g. Finland = -2460, Sweden = -7520, Estonia = -2330).
profitMaxNoIn thousands of euros (EUR thousands). Maximum annual profit; negative values are allowed and represent net loss.
profitMinNoIn thousands of euros (EUR thousands). Minimum annual profit; negative values are allowed and represent net loss.
businessIdNoOptional company business ID filter. Normalizes dashes/spaces when matching (e.g. "1234567-8").
regionNameNoRegion/province name (case-insensitive substring match). Use the local-language name as shown in company records, e.g. "Uusimaa", "Stockholm".
turnoverMaxNoIn thousands of euros (EUR thousands). Maximum annual turnover. Example: 5000 = EUR 5M turnover.
turnoverMinNoIn thousands of euros (EUR thousands). Minimum annual turnover. Example: 5000 = EUR 5M turnover.
personnelMaxNoMaximum number of employees (headcount) as reported in company records.
personnelMinNoMinimum number of employees (headcount) as reported in company records.
targetMarketNoTarget market classification: "b2b" = B2B only (1), "b2c" = B2C only (2), "both" = both B2B and B2C (12), "unknown" = crawled but unknown (0), "not_crawled" = not yet crawled (NULL). Omitted includes every state.
industryCodesNoIndustry codes (NACE/TOL) for filtering companies and contacts. Codes match by prefix: a full code like "62010" matches one industry, while a shorter prefix like "62" matches every industry whose code starts with it. Call list_industries first to discover valid codes, then pass the returned id values here. IDs from list_industries are string-typed numeric codes, not integers — pass them as strings.
webshopStatusNoWebshop classification filter: "identified" = a webshop was found, "not_identified" = crawled and no webshop found, "not_crawled" = not yet crawled. Omitted includes all states including 0 and NULL.
foundedYearMaxNoLatest founding year to include (e.g. 2020).
foundedYearMinNoEarliest founding year to include (e.g. 2010).
jobFunctionIdsNoJob function IDs for multi-select filters. Use list_job_functions to discover valid values. Finer-grained than mainResponsibilityAreaIds.
customerListModeNoOptional customer-list mode: "exclude" removes companies on your customer list (net-new prospecting), "limit" returns only customer-list companies that match the other filters, "ignore" or omitted ignores the customer list. "exclude"/"limit" require an active customer list managed in the web app under Company lists; fails with CUSTOMER_LIST_REQUIRED otherwise. The account exclusion list always applies regardless of this setting.
industryGroupIdsNoIndustry group IDs for multi-select filters. Use list_industry_groups to discover valid values.
webshopPlatformsNoWebshop platform names (e.g. "shopify", "woocommerce"). Must be combined with webshopStatus "identified" or omitted; combining with "not_identified" or "not_crawled" is invalid. Values are normalized to lowercase/trimmed. Up to 20 values, each up to 50 characters.
organizationLevelsNoHierarchy level filter; orthogonal to mainResponsibilityAreaIds/jobFunctionIds. Combine with responsibility filters for e.g. Sales + Top Management.
companyContactFilterNoCompany-level contact-availability filter: "all" = include companies regardless of contact availability, "email" = at least one contact with valid email, "phone" = at least one contact with mobile phone, "both" = at least one contact with both valid email and phone, "either" = at least one contact with a valid email, a phone number, or both. Defaults to "email". Compare with contactInfoFilter on contact tools, which filters each returned contact directly.
keywordCategoryFilterNoCompany keyword taxonomy filter. Use level "main" only with canonical name values returned by list_keyword_categories and level "sub" only with canonical name values returned by search_keyword_subcategories. Copy the returned name, not a localized labels value. any matches at least one item, all requires every item, and none excludes every item; non-empty buckets combine with AND. This filters classified company categories and subcategories, not raw keyword text.
newContactsWithinDaysNoReturns companies that have at least one contact created within the last N days (max 3650).
mainResponsibilityAreaIdsNoBroad functional responsibility area IDs (e.g. IT, Marketing). Use list_main_responsibility_areas to discover valid values. IDs are negative integers as stored in the database (e.g. Sales = -70, IT = -40, Marketing = -60, HR = -30, Finances = -50, Managing Director = -20). Combine with jobFunctionIds or organizationLevels to narrow further.
newResponsibilityAssignmentsWithinDaysNoReturns companies that have at least one contact with such an assignment (max 3650).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / companyContactFilter / description
      Previous value: -"Company-level contact-availability filter: \"all\" = include companies regardless of contact availability, \"email\" = at least one contact with valid email, \"phone\" = at least one contact with mobile phone, \"both\" = at least one contact with both valid email and phone. Defaults to \"email\". Compare with contactInfoFilter on contact tools, which filters each returned contact directly."New value: +"Company-level contact-availability filter: \"all\" = include companies regardless of contact availability, \"email\" = at least one contact with valid email, \"phone\" = at least one contact with mobile phone, \"both\" = at least one contact with both valid email and phone, \"either\" = at least one contact with a valid email, a phone number, or both. Defaults to \"email\". Compare with contactInfoFilter on contact tools, which filters each returned contact directly."
    • changedInput schema / properties / companyContactFilter / enum
      Previous value: -[
      -  "all",
      -  "email",
      -  "phone",
      -  "both"
      -]New value: +[
      +  "all",
      +  "email",
      +  "phone",
      +  "both",
      +  "either"
      +]
  2. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Goes well beyond the readOnly/destructive annotations: it discloses billing behavior ('free to call; does not consume account balance'), the always-on non-disableable exclusion list, the CUSTOMER_LIST_REQUIRED precondition, and the pagination/return behavior ('does not support pagination and always returns a total count'). This is exactly the operational context an agent needs before calling.

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 core distinction and billing note, then handles filter rules and customerListMode. Dense and mostly waste-free, though the customerListMode explanation partially restates the schema and could be tightened.

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 25-parameter tool with nested objects and no output schema, it covers the high-risk constraints (no pagination, returns only a count, billing, exclusion-list behavior, taxonomy name rules). Remaining filter parameters are left to the fully-populated schema, which is reasonable.

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 baseline is 3, but the description adds interaction semantics the schema states thinly: the webshopStatus/webshopPlatforms dependency and the canonical-vs-localized taxonomy constraint for keywordCategoryFilter ('pass only canonical returned name values; never pass localized labels or raw keywords'). It does not walk the many other filters, but the schema does.

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 (count matching companies for segment filters) and immediately differentiates from the listing siblings via 'without loading company/contact rows.' An agent can tell this is the count-only path versus list_company_segment without opening a 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?

Gives explicit when-to-use ('how many companies' questions) and conditional validity rules (webshopPlatforms only valid with webshopStatus 'identified' or omitted; customerListMode exclude/limit require an active list). It never names list_company_segment as the alternative it is contrasted against, leaving the routing to the reader.

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