query_contacts_at_company
Resolve a company name to the canonical entity and return all contacts linked via works_at. Uses exact-normalized then fuzzy matching, is read-only, and never creates a company when no match exists.
Instructions
Answer "who do we have connected at company X": resolve company_name to the canonical company entity (exact-normalized match first, then a conservative fuzzy pass — the same resolution order used when a contact's organization field auto-links to a company at store time) and return every contact linked to it via a live works_at edge. Read-only: never creates a company entity — when no company matches, returns company: null and an empty contacts list. Optional owner_user_id scopes the search to a specific partner's network (must equal the authenticated user's id today; no cross-tenant admission yet); omit to search the authenticated user's own graph.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of linked contacts to return. Applied after the full works_at edge set is resolved, so `total_contacts` on the response reflects the true pre-limit count. | |
| company_name | Yes | Free-text company name to resolve, e.g. "Northgate" or "North Gate". Matched exact-normalized first, then fuzzy (see COMPANY_FUZZY_MATCH_THRESHOLD in src/services/company_resolution.ts). | |
| owner_user_id | No | Optional user_id override scoping the query to a specific partner's network (which partner's contacts/company graph to search), matching the `user_id` override pattern on /list_relationships. Must equal the authenticated user's id today (the server has no cross-tenant admission yet); supplying a different value is rejected. When omitted, the authenticated user's own graph is searched. |