search_opportunita
Search for opportunities by name in VTENext CRM to identify potential business deals using text queries.
Instructions
Cerca opportunità per nome
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | Yes | Testo da cercare nel nome dell'opportunità | |
| limit | No |
Implementation Reference
- index.js:60-75 (handler)Implementation of the 'search_opportunita' MCP tool, which performs a query against the VTENext Potentials module.
server.tool( 'search_opportunita', 'Cerca opportunità per nome', { q: z.string().describe('Testo da cercare nel nome dell\'opportunità'), limit: z.number().optional().default(10), }, async ({ q, limit }) => { const results = await client.query( `SELECT id, potentialname, sales_stage, amount, closingdate FROM Potentials WHERE potentialname LIKE '%${q}%' LIMIT ${limit};` ); return { content: [{ type: 'text', text: JSON.stringify(results, null, 2) }], }; } );