search_contatti
Search contacts by name, email, or company in the VTENext CRM system to find and retrieve contact information quickly.
Instructions
Cerca contatti per nome, email o azienda
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | Yes | Testo da cercare | |
| limit | No |
Implementation Reference
- index.js:126-141 (handler)The definition and handler implementation for the 'search_contatti' tool, which queries the 'Contacts' table using a SQL-like string.
server.tool( 'search_contatti', 'Cerca contatti per nome, email o azienda', { q: z.string().describe('Testo da cercare'), limit: z.number().optional().default(10), }, async ({ q, limit }) => { const results = await client.query( `SELECT id, firstname, lastname, email, phone, account_id FROM Contacts WHERE firstname LIKE '%${q}%' OR lastname LIKE '%${q}%' OR email LIKE '%${q}%' LIMIT ${limit};` ); return { content: [{ type: 'text', text: JSON.stringify(results, null, 2) }], }; } );