search_companies
Find company records in Copper CRM by searching with a company name. Returns matching results with pagination options for efficient browsing.
Instructions
Search Copper companies by name. Returns matching company records.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Company name to search | |
| page_size | No | Results per page (default 20, max 200) | |
| page_number | No | Page number (default 1) |
Implementation Reference
- server.js:200-216 (handler)The handler logic for the 'search_companies' tool.
async ({ name, page_size, page_number }) => { const body = {}; if (name) body.name = name; body.page_size = page_size || 20; body.page_number = page_number || 1; const results = await copperFetch("/companies/search", { method: "POST", body }); const companies = results.map((c) => ({ id: c.id, name: c.name, email_domain: c.email_domain, phone_numbers: c.phone_numbers, websites: c.websites, address: c.address, })); return jsonResult(companies); } - server.js:192-199 (registration)Registration of the 'search_companies' tool with its schema definition.
server.tool( "search_companies", "Search Copper companies by name. Returns matching company records.", { name: z.string().optional().describe("Company name to search"), page_size: z.number().optional().describe("Results per page (default 20, max 200)"), page_number: z.number().optional().describe("Page number (default 1)"), },