Skip to main content
Glama

list_opportunita

List and filter sales opportunities in VTENext CRM by status, search terms, or result limits to manage pipeline visibility.

Instructions

Elenca le opportunità con filtri opzionali

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoNumero massimo di risultati
statoNoStato (es. Prospecting, Qualification, Closed Won)
searchNoTesto da cercare nel nome opportunità

Implementation Reference

  • index.js:23-44 (handler)
    Tool definition and implementation of 'list_opportunita', which accepts optional filters (limit, stato, search) and executes a VTQL query to fetch potentials.
    server.tool(
      'list_opportunita',
      'Elenca le opportunità con filtri opzionali',
      {
        limit: z.number().optional().default(20).describe('Numero massimo di risultati'),
        stato: z.string().optional().describe('Stato (es. Prospecting, Qualification, Closed Won)'),
        search: z.string().optional().describe('Testo da cercare nel nome opportunità'),
      },
      async ({ limit, stato, search }) => {
        let query = `SELECT id, potentialname, sales_stage, amount, closingdate, assigned_user_id FROM Potentials`;
        const conditions = [];
        if (stato) conditions.push(`sales_stage = '${stato}'`);
        if (search) conditions.push(`potentialname LIKE '%${search}%'`);
        if (conditions.length) query += ' WHERE ' + conditions.join(' AND ');
        query += ` LIMIT ${limit};`;
    
        const results = await client.query(query);
        return {
          content: [{ type: 'text', text: JSON.stringify(results, null, 2) }],
        };
      }
    );
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool lists opportunities with optional filters but does not mention whether it's read-only, safe, or has any side effects. For a list operation, this omission is significant as it fails to clarify permissions, rate limits, or output format, leaving the agent with incomplete behavioral understanding.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence in Italian that directly states the tool's function. It is front-loaded with the core action ('Elenca le opportunità') and includes key detail ('con filtri opzionali'). There is no wasted verbiage, making it appropriately concise for its purpose, though it could be more structured with additional context.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description is incomplete for a tool with three parameters and multiple siblings. It lacks details on behavioral traits, output format, and differentiation from similar tools. For a list operation in a CRM-like context, more information on scope, pagination, or error handling would be needed to ensure the agent can use it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents the three parameters (limit, stato, search). The description adds no additional meaning beyond implying filtering capabilities, which is already covered by the schema. With high schema coverage, the baseline score of 3 is appropriate, as the description does not compensate but also does not detract from parameter understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Elenca le opportunità con filtri opzionali' clearly states the verb ('Elenca' - list) and resource ('opportunità' - opportunities), making the basic purpose understandable. However, it does not distinguish this tool from sibling tools like 'search_opportunita' or 'get_opportunita', leaving ambiguity about when to use each. The description is not tautological but lacks specificity for differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'search_opportunita' or 'get_opportunita'. It mentions optional filters but does not specify contexts, prerequisites, or exclusions. Without explicit when/when-not instructions or named alternatives, usage is implied but unclear, leading to potential misuse among siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Castaldo-Solutions/mcp-vtenext'

If you have feedback or need assistance with the MCP directory API, please join our Discord server