Skip to main content
Glama

Count Contact Segment

count_contact_segment
Read-only

Count matching contacts for segment filters without loading contact rows. Use this for "how many contacts" 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.
contactInfoFilterNoContact-level required info filter: "email" (default) = each returned contact must have valid email, "phone" = must have phone number, "both" = must have both, "either" = must have a valid email, a phone number, or both. Use companyContactFilter on company-segment tools when filtering companies by whether they have at least one matching contact.
organizationLevelsNoHierarchy level filter; orthogonal to mainResponsibilityAreaIds/jobFunctionIds. Combine with responsibility filters for e.g. Sales + Top Management.
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 contacts 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 contacts with an assignment created within the last N days (max 3650).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / contactInfoFilter / description
      Previous value: -"Contact-level required info filter: \"email\" (default) = each returned contact must have valid email, \"phone\" = must have phone number, \"both\" = must have both. Use companyContactFilter on company-segment tools when filtering companies by whether they have at least one matching contact."New value: +"Contact-level required info filter: \"email\" (default) = each returned contact must have valid email, \"phone\" = must have phone number, \"both\" = must have both, \"either\" = must have a valid email, a phone number, or both. Use companyContactFilter on company-segment tools when filtering companies by whether they have at least one matching contact."
    • changedInput schema / properties / contactInfoFilter / enum
      Previous value: -[
      -  "email",
      -  "phone",
      -  "both"
      -]New value: +[
      +  "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?

Adds substantial behavior beyond the readOnly/non-destructive annotations: it is free and consumes no balance, always applies the account exclusion list, requires an active customer list for exclude/limit modes, and does not paginate (always returns a total). These are real operational traits an agent needs.

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 purpose and expected question type, then layers constraints. It is dense and slightly repetitive with the schema (customerListMode is restated), but each sentence carries actionable guidance rather than filler.

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, nested-object tool with no output schema, the description covers the return shape ('always returns a total count', no pagination), billing cost, and key filter interactions. Remaining ambiguity (e.g. count upper bounds or caching) is minor given the rich schema.

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 schema already documents most fields, but the description adds cross-parameter semantics (webshopPlatforms only valid with webshopStatus 'identified'), the canonical-name constraint for taxonomy values, and the automatic exclusion-list behavior. It consolidates multi-field interactions usefully, though much overlaps the schema.

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' plus the resource 'matching contacts for segment filters', and immediately distinguishes the tool from the list variant with 'without loading contact rows'. An agent knows exactly what this does versus list_contact_segment.

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 a clear use case ('how many contacts questions') and routes taxonomy lookups to list_keyword_categories and search_keyword_subcategories. It does not explicitly contrast with count_company_segment or spell out when NOT to use this tool, so routing guidance 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.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources