Skip to main content
Glama

Count companies

count_companies
Read-only

Use this when the user wants to know how many companies match a search before paying to list them. Send exactly one of query, filters, savedSearchId or savedSearchName, as a company search takes them. A new count runs in the background: while the answer's status is pending, call again with the same arguments every few seconds until the status is ready and the total is there. Free. It returns a number, never the companies.

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
queryNoWhich companies to find, in plain language. It is turned into filters, which the page answers with as `filters`.
filtersNoFilters by name. Each filter's allowed values are listed with the company filters and are case-sensitive; company names and headquarters places take a suggested value.
savedSearchIdNoRun a saved company search by its id.
savedSearchNameNoRun a saved company search by its title. A title several saved searches share answers 409 `saved_search_name_ambiguous`.

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

A4.6/5.0
Behavior5/5

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

Adds substantial behavior beyond the readOnly/openWorld annotations: the call is free, the count runs asynchronously in the background, and the agent must re-call with identical arguments while status is 'pending' until it is 'ready'. That polling contract is essential and not captured anywhere in structured fields.

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-loaded with the use case, then the argument rule, then the async polling contract, then cost. Four sentences with little waste, though 'as a company search takes them' is slightly awkward phrasing.

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?

Covers everything needed for a tool with no output schema: it explains the return value ('a number, never the companies'), the cost, and the full async retry loop. An agent has enough to invoke and drive it to completion.

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 baseline is 3, and the description earns above that by stating the mutual-exclusivity rule absent from the schema (required: 0) — 'Send exactly one of query, filters, savedSearchId or savedSearchName'. It does not restate per-parameter details, which is fine given 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 and resource ('count how many companies match a search') and explicitly contrasts with the listing tool: 'It returns a number, never the companies.' An agent can distinguish this from search_companies 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?

Gives a clear triggering condition ('when the user wants to know how many companies match a search before paying to list them') and implies the alternative is the paid listing call. It stops short of naming a sibling tool explicitly, so routing relies on inference.

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