Skip to main content
Glama

Leads

get_leads
Read-only

[DEMO SINTÉTICA] Leads/prospectos capturados desde formularios del sitio y campañas: total del período, conteo por estado en el pipeline (nuevo/contactado/calificado/cerrado/perdido) y, por lead, nombre, fuente de captación, estado y fecha. No incluye email, teléfono ni notas. Sirve para "leads", "prospectos", "formularios", "contactos nuevos", "pipeline de ventas". Solo disponible si la cuenta tiene CRM habilitado.

Input Schema

NameRequiredDescriptionDefault
statusNoFiltrar por estado: nuevo, contactado, calificado, cerrado, perdido
date_rangeNoPeríodo a consultar. Ejemplos: "últimos 30 días", "enero 2025", "2025-01-01 a 2025-01-31", "este mes", "mes pasado". Por defecto: últimos 30 días.

Output Schema

NameRequiredDescriptionDefault
dataYes
demoNoSolo aparece en demo; todos sus datos son ficticios.
noticeNoAviso obligatorio de datos sintéticos cuando demo es true.
sample_periodNoPeríodo fijo de los ejemplos sintéticos; no cambia al solicitar otro rango.
requested_periodNoRango solicitado a la demo; no es el período real de sus ejemplos.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / properties / data / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "description": "CRM habilitado: contactos del período.",
      -    "properties": {
      -      "byStatus": {
      -        "additionalProperties": {
      -          "description": "Leads devueltos en ese estado.",
      -          "type": "number"
      -        },
      -        "description": "Conteo por estado de las filas devueltas (hasta 100), no del total completo.",
      -        "type": "object"
      -      },
      -      "leads": {
      -        "description": "Hasta 100 leads, de más reciente a más antiguo.",
      -        "items": {
      -          "additionalProperties": false,
      -          "description": "Lead de la cuenta autenticada.",
      -          "properties": {
      -            "created_at": {
      -              "description": "Fecha y hora de captación.",
      -              "type": [
      -                "string",
      -                "null"
      -              ]
      -            },
      -            "email": {
      -              "description": "Email del prospecto.",
      -              "type": [
      -                "string",
      -                "null"
      -              ]
      -            },
      -            "name": {
      -              "description": "Nombre del prospecto.",
      -              "type": [
      -                "string",
      -                "null"
      -              ]
      -            },
      -            "notes": {
      -              "description": "Notas del contacto.",
      -              "type": [
      -                "string",
      -                "null"
      -              ]
      -            },
      -            "phone": {
      -              "description": "Teléfono del prospecto.",
      -              "type": [
      -                "string",
      -                "null"
      -              ]
      -            },
      -            "source": {
      -              "description": "Fuente de captación.",
      -              "type": [
      -                "string",
      -                "null"
      -              ]
      -            },
      -            "status": {
      -              "description": "Estado almacenado en CRM.",
      -              "type": [
      -                "string",
      -                "null"
      -              ]
      -            }
      -          },
      -          "required": [
      -            "name",
      -            "email",
      -            "phone",
      -            "source",
      -            "status",
      -            "created_at",
      -            "notes"
      -          ],
      -          "type": "object"
      -        },
      -        "type": "array"
      -      },
      -      "period": {
      -        "additionalProperties": false,
      -        "description": "Rango consultado, desde from hasta to inclusive.",
      -        "properties": {
      -          "from": {
      -            "description": "Fecha YYYY-MM-DD.",
      -            "format": "date",
      -            "type": "string"
      -          },
      -          "to": {
      -            "description": "Fecha YYYY-MM-DD.",
      -            "format": "date",
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "from",
      -          "to"
      -        ],
      -        "type": "object"
      -      },
      -      "total": {
      -        "description": "Total de leads del período y filtro, no limitado a 100.",
      -        "type": "number"
      -      }
      -    },
      -    "required": [
      -      "period",
      -      "total",
      -      "byStatus",
      -      "leads"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "description": "CRM no disponible; no interpretar como cero leads.",
      -    "properties": {
      -      "error": {
      -        "description": "Motivo por el que la consulta no está disponible, por ejemplo CRM no habilitado.",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "error"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "description": "CRM habilitado: contactos del período.",
      +    "properties": {
      +      "byStatus": {
      +        "additionalProperties": {
      +          "description": "Leads devueltos en ese estado.",
      +          "type": "number"
      +        },
      +        "description": "Conteo por estado de las filas devueltas (hasta 100), no del total completo.",
      +        "type": "object"
      +      },
      +      "leads": {
      +        "description": "Hasta 100 leads, de más reciente a más antiguo.",
      +        "items": {
      +          "additionalProperties": false,
      +          "description": "Lead de la cuenta autenticada, sin datos de contacto.",
      +          "properties": {
      +            "created_at": {
      +              "description": "Fecha y hora de captación.",
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            },
      +            "name": {
      +              "description": "Nombre del prospecto.",
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            },
      +            "source": {
      +              "description": "Fuente de captación.",
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            },
      +            "status": {
      +              "description": "Estado almacenado en CRM.",
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            }
      +          },
      +          "required": [
      +            "name",
      +            "source",
      +            "status",
      +            "created_at"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "period": {
      +        "additionalProperties": false,
      +        "description": "Rango consultado, desde from hasta to inclusive.",
      +        "properties": {
      +          "from": {
      +            "description": "Fecha YYYY-MM-DD.",
      +            "format": "date",
      +            "type": "string"
      +          },
      +          "to": {
      +            "description": "Fecha YYYY-MM-DD.",
      +            "format": "date",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "from",
      +          "to"
      +        ],
      +        "type": "object"
      +      },
      +      "total": {
      +        "description": "Total de leads del período y filtro, no limitado a 100.",
      +        "type": "number"
      +      }
      +    },
      +    "required": [
      +      "period",
      +      "total",
      +      "byStatus",
      +      "leads"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "description": "CRM no disponible; no interpretar como cero leads.",
      +    "properties": {
      +      "error": {
      +        "description": "Motivo por el que la consulta no está disponible, por ejemplo CRM no habilitado.",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "error"
      +    ],
      +    "type": "object"
      +  }
      +]
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": false,
      +  "description": "Estadísticas de la cuenta autenticada en data. Si demo es true, son ejemplos sintéticos; sample_period es su período y requested_period solo el rango solicitado.",
      +  "properties": {
      +    "data": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": false,
      +          "description": "CRM habilitado: contactos del período.",
      +          "properties": {
      +            "byStatus": {
      +              "additionalProperties": {
      +                "description": "Leads devueltos en ese estado.",
      +                "type": "number"
      +              },
      +              "description": "Conteo por estado de las filas devueltas (hasta 100), no del total completo.",
      +              "type": "object"
      +            },
      +            "leads": {
      +              "description": "Hasta 100 leads, de más reciente a más antiguo.",
      +              "items": {
      +                "additionalProperties": false,
      +                "description": "Lead de la cuenta autenticada.",
      +                "properties": {
      +                  "created_at": {
      +                    "description": "Fecha y hora de captación.",
      +                    "type": [
      +                      "string",
      +                      "null"
      +                    ]
      +                  },
      +                  "email": {
      +                    "description": "Email del prospecto.",
      +                    "type": [
      +                      "string",
      +                      "null"
      +                    ]
      +                  },
      +                  "name": {
      +                    "description": "Nombre del prospecto.",
      +                    "type": [
      +                      "string",
      +                      "null"
      +                    ]
      +                  },
      +                  "notes": {
      +                    "description": "Notas del contacto.",
      +                    "type": [
      +                      "string",
      +                      "null"
      +                    ]
      +                  },
      +                  "phone": {
      +                    "description": "Teléfono del prospecto.",
      +                    "type": [
      +                      "string",
      +                      "null"
      +                    ]
      +                  },
      +                  "source": {
      +                    "description": "Fuente de captación.",
      +                    "type": [
      +                      "string",
      +                      "null"
      +                    ]
      +                  },
      +                  "status": {
      +                    "description": "Estado almacenado en CRM.",
      +                    "type": [
      +                      "string",
      +                      "null"
      +                    ]
      +                  }
      +                },
      +                "required": [
      +                  "name",
      +                  "email",
      +                  "phone",
      +                  "source",
      +                  "status",
      +                  "created_at",
      +                  "notes"
      +                ],
      +                "type": "object"
      +              },
      +              "type": "array"
      +            },
      +            "period": {
      +              "additionalProperties": false,
      +              "description": "Rango consultado, desde from hasta to inclusive.",
      +              "properties": {
      +                "from": {
      +                  "description": "Fecha YYYY-MM-DD.",
      +                  "format": "date",
      +                  "type": "string"
      +                },
      +                "to": {
      +                  "description": "Fecha YYYY-MM-DD.",
      +                  "format": "date",
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "from",
      +                "to"
      +              ],
      +              "type": "object"
      +            },
      +            "total": {
      +              "description": "Total de leads del período y filtro, no limitado a 100.",
      +              "type": "number"
      +            }
      +          },
      +          "required": [
      +            "period",
      +            "total",
      +            "byStatus",
      +            "leads"
      +          ],
      +          "type": "object"
      +        },
      +        {
      +          "additionalProperties": false,
      +          "description": "CRM no disponible; no interpretar como cero leads.",
      +          "properties": {
      +            "error": {
      +              "description": "Motivo por el que la consulta no está disponible, por ejemplo CRM no habilitado.",
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "error"
      +          ],
      +          "type": "object"
      +        }
      +      ]
      +    },
      +    "demo": {
      +      "const": true,
      +      "description": "Solo aparece en demo; todos sus datos son ficticios.",
      +      "type": "boolean"
      +    },
      +    "notice": {
      +      "description": "Aviso obligatorio de datos sintéticos cuando demo es true.",
      +      "type": "string"
      +    },
      +    "requested_period": {
      +      "additionalProperties": false,
      +      "description": "Rango solicitado a la demo; no es el período real de sus ejemplos.",
      +      "properties": {
      +        "from": {
      +          "description": "Fecha YYYY-MM-DD.",
      +          "format": "date",
      +          "type": "string"
      +        },
      +        "to": {
      +          "description": "Fecha YYYY-MM-DD.",
      +          "format": "date",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "from",
      +        "to"
      +      ],
      +      "type": "object"
      +    },
      +    "sample_period": {
      +      "additionalProperties": false,
      +      "description": "Período fijo de los ejemplos sintéticos; no cambia al solicitar otro rango.",
      +      "properties": {
      +        "from": {
      +          "description": "Fecha YYYY-MM-DD.",
      +          "format": "date",
      +          "type": "string"
      +        },
      +        "to": {
      +          "description": "Fecha YYYY-MM-DD.",
      +          "format": "date",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "from",
      +        "to"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "data"
      +  ],
      +  "type": "object"
      +}
  3. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare read-only, non-destructive, closed-world behavior. The description adds valuable context beyond annotations: CRM availability gating, included aggregate breakdowns, included per-lead fields, and excluded fields such as email, phone, and notes.

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 dense but front-loaded with the resource and return contents, followed by trigger terms and an availability condition. It is mostly efficient, though the single long first sentence could be easier to scan.

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

Completeness5/5

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

Given that annotations cover safety semantics and an output schema exists, the description provides enough context to call the tool correctly: what is returned, what is excluded, and the account-level CRM prerequisite. No critical ambiguity remains for a read-only leads summary.

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%, and both parameters are already documented in the schema, including status values and date-range examples/default. The description does not add syntax or usage detail for the parameters beyond what the schema provides, so baseline 3 is appropriate.

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

Purpose5/5

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

The description clearly states a specific retrieval resource (leads/prospectos captured from forms and campaigns) and enumerates the returned aggregates and per-lead fields. It also explicitly excludes sensitive fields, making the scope distinguishable from broader analytics or sales tools.

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

Usage Guidelines4/5

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

It gives useful trigger terms ("leads", "prospectos", "formularios", "contactos nuevos", "pipeline de ventas") and a prerequisite: CRM must be enabled. However, it does not explicitly name when to prefer this over a sibling tool or give when-not-to-use guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.