List companies
list_companiesEach row: id (the company id query_companies uses, and the company_profile_id on
query_people and query_search_results rows), display_name, domain, spine (industry,
location, employee_count, description and the other firmographics), and:
people_countandpeople_preview: the people the user knows at the company, across the account, not only the ones an agent found. To list them with their outreach, call list_people withcompany_idand noagent_id.signals: {count, latest, monitored}: how many signals the company has, the newest one, and whether a monitor watches it. Withagent_id, these are this agent's (from its searches and its monitoring); without it, every agent's search finds in the account plus the user's own monitors.signal_entries, only withinclude_signals: every one of those signals, newest first.
With agent_id, each row also has:
listsandsources: the search lists and discovery tools that surfaced the company, empty for one the agent only monitors.columnsholds the researched [label, value] pairs.verdict,verdict_reasonandrejected_on: the curation recorded on the company's search rows, as the Verdict column shows it. 'rejected' when every row is rejected, 'qualified' when any row is qualified, else 'unclear' (screened but too thin to judge) when any row is, else null, with the reason from the latest row carrying it. On agroup_by='list'bucket page, or under a "run" filter whose runs all saved to one list, it's the verdict on that list's row.rejected_onis {lists, reason}: the lists whose own verdict is 'rejected' while the company'sverdictisn't, with the latest rejected row's reason; itslistsis empty otherwise and on those two reads. A company rejected on every row that the agent doesn't monitor is left out unless a "verdict" filter asks for 'rejected', a "run" filter is set orinclude_rejectedis set, the same as the user's default view.criteria, only withinclude_criteria: why the agent matched the company, as its opened row shows it. Per list it's in, {list_name, evaluations}; each evaluation is acriterionwith thereasoning, a verdict (satisfied'yes', 'no' or 'unclear', or a numericscorewhere 7 and up is met) and http(s)references.
Criteria run a few KB per company and signal entries usually under one, so ask for either on a
narrow read (a q, one bucket, or a small limit) or from run_code.
The "list" and "source" groupings, the "list", "source", "verdict", "run" and researched-column
filters, sort='latest_find', include_criteria and include_rejected read one agent, so
they need agent_id.
To count companies per group, pass group_by alone. To list one group's companies, pass
group_by plus a bucket key taken from those counts. Otherwise you get every company, in the
order sort picks. Page until next_cursor is null by passing it back as cursor. A direct
call returns 25 rows by default; for a wide pull, call this from run_code with limit up to 200
(nothing truncates there) and print only the fields you need.
A dict. A group_by without a bucket returns group_counts, a list of {key, count}
with the largest group first and the '' group last, and total, the matching companies
each counted once. With group_by="list", each group also carries criteria: the search
criteria a Websets list screens its companies against, '' for any other list. Every other
call returns results (rows shaped as above) and next_cursor, plus total (every matching company) when group_by is omitted. With
agent_id, every call also returns filtered_out_count: how many companies this same call
matches once a "verdict" filter on 'rejected' is added to filters, with the same q and
group_by and no bucket, each company counted once. Only under the same search, filters
and grouping as the user's Companies table does it equal the number that table shows as
"didn't match".
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": "list_companies"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | No | A substring matched against name and domain. | |
| sort | No | "name" (default) for A to Z; "latest_signal" for newest signal first, with the companies that have none after them A to Z; or "latest_find" for the companies this agent's searches found most recently first, with the ones it only monitors last. | name |
| limit | No | Rows per page (default 25, max 200). | |
| bucket | No | One key from `group_counts` for the same `group_by`; returns that group's companies. Needs `group_by`. | |
| cursor | No | The `next_cursor` from the previous page; omit for the first page. | |
| filters | No | Clauses that must all match. For "list" or "source", use {"column_key": <dimension>, "operator": "is_any_of", "values": [keys]} with keys as group_counts returns them ('' matches no value). For "verdict", use the same shape with any of 'rejected' (the companies the user's default view filters out, labelled "Didn't match" in their table), 'qualified' and 'unclear'; it matches each company's `verdict`, or with group_by="list" its verdict on each list, and 'rejected' brings the rejected companies in without `include_rejected`. For "run", use the same shape with run ids from `query_search_runs` as strings; it matches the companies those search runs found, rejected ones included. When those runs all saved to one list and group_by isn't "list", a "verdict" filter reads that list alone. For a researched column, use "col:<label>" as the column_key with "is_any_of" values or "contains" text; it matches a company with a search row whose value matches. For "name", "industry", "location" or "domain", use {"column_key": <column>, "operator": "contains", "text": <substring>}; for "employee_count" or "founded_year", {"column_key": <column>, "operator": "between", "min": <low>, "max": <high>}, either bound optional. | |
| agent_id | No | The agent whose Companies tab to read. Omit it to read every company in the account. | |
| group_by | No | The dimension to count or to pick a bucket from. "list" and "source" keys are list names and discovery tools, and a company with several counts in each; "industry" and "location" key on the company's own value. A '' key is the group with no value (for "list" and "source", the companies the agent only monitors). | |
| on_behalf_of | No | A teammate's email, or an agency client's from list_agency_clients, to run this call in that account: their agents, settings, connected accounts, and credits. Omit it to act on your own account. | |
| include_signals | No | Also return each row's `signal_entries`. Default False. | |
| include_criteria | No | Also return each row's `criteria`. Default False. | |
| include_rejected | No | Also return (and count) the companies left out as rejected. Default False. |