Skip to main content
Glama

Count companies matching a name/filter (IE only)

count_companies
Read-onlyIdempotent

Retrieve the total number of companies matching a search without fetching candidates. Use to decide if a query is too broad before paginating large result sets. Supports the same filters as search_companies. Note: performance is comparable to a full search, so prefer search_companies with limit=1 for faster pagination decisions.

Instructions

Return the total number of companies that would match a search, without fetching the candidates themselves. Useful before paginating very large result sets to decide whether to narrow the query.

⚠️ Performance note: this is NOT cheaper than search_companies — CRO's /companycount endpoint runs the same underlying query and takes ~2s on average (similar to a full search). Only use it when the raw count is what you actually need (e.g. 'how many Coffee business names exist in Ireland?'). For 'is this query narrow enough to paginate?', it's faster to call search_companies with limit=1 — you'll get the first hit AND a sense of recall in one round-trip.

── IE (Ireland CRO) ── Maps to the /companycount endpoint. Supports the same filters as search_companies (query, match_type, bus_ind, include_business_names, address, alpha). Returns a plain integer. Pricing: free.

Other jurisdictions return 501 — Companies House/Brreg/ABR don't expose a count-only endpoint.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
jurisdictionYesISO 3166-1 alpha-2 country code (uppercase). All registries are official government sources. Currently supported: AU, BE, CA, CA-BC, CA-NT, CH, CY, CZ, DE, ES, FI, FR, GB, HK, IE, IM, IS, IT, KR, KY, LI, MC, MX, MY, NL, NO, NZ, PL, RU, TW. Per-country capability, ID format, examples, status mapping, and caveats: call `list_jurisdictions({jurisdiction:'<code>'})`. To find which countries support a specific tool: `list_jurisdictions({supports_tool:'<tool>'})`.
queryNoCompany name or keyword. May be empty when combined with address/alpha filters.
match_typeNo
bus_indNo
include_business_namesNo
addressNo
alphaNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
queried_atYesISO-8601 + Europe/London timezone stamp for when the registry was queried.
jurisdictionNo
countNo
Behavior5/5

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

Annotations declare readOnlyHint=true, destructiveHint=false, idempotentHint=true, openWorldHint=true. The description adds critical behavioral context beyond annotations: it warns that the endpoint is NOT cheaper than search_companies, that it runs the same underlying query, and that other jurisdictions return 501. This fully leverages the description to disclose behavior.

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?

The description is well-structured with sections for jurisdiction-specific notes and performance notes, and uses Markdown for readability. Every sentence adds value, but it is slightly longer than necessary; some detail about the 501 return could be shortened. Still, overall efficient.

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?

Given the tool's complexity (7 parameters, 1 required, output schema exists), and the sibling context, the description is complete. It explains the tool's purpose, performance, jurisdiction support, and relationship to search_companies. No gaps identified.

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 description coverage is 29% (only jurisdiction and query have descriptions). The description does not add meaning for most parameters beyond what the schema provides, but it does mention that it supports the same filters as search_companies, which is helpful context. Baseline 3 due to low coverage, but the mention of shared filter semantics raises it to 4.

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?

The description starts by clearly stating what the tool does: 'Return the total number of companies that would match a search, without fetching the candidates themselves.' This is a specific verb + resource combination, and it distinguishes the tool from siblings like search_companies by emphasizing that it only returns a count.

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?

The description explicitly tells when to use this tool ('when the raw count is what you actually need') and when not to use it ('for 'is this query narrow enough to paginate?', it's faster to call search_companies with limit=1'). It also provides an alternative and explains performance trade-offs.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sophymarine/openregistry'

If you have feedback or need assistance with the MCP directory API, please join our Discord server