Skip to main content
Glama

oportunidade_create

Cria uma oportunidade (card do Kanban). O negócio pode ser de uma pessoa OU de uma empresa: contato_id aceita um contato do tipo pessoa ou do tipo empresa. Fluxo recomendado: 1) funil_list para obter funil_id e etapa_id; 2) contato_list para tentar achar a pessoa ou a empresa; 3a) se achou, passe contato_id; 3b) se não achou, passe o objeto "contato" inline e ele será criado automaticamente. No inline, tipo "pessoa" (padrão) exige nome; tipo "empresa" exige nome_fantasia (o campo nome também é aceito como nome fantasia) e não precisa de uma pessoa. NÃO precisa título: a UI usa o nome do contato (ou da empresa) + numeração sequencial (#NN) gerada automaticamente.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "funil_id": "<funil_id>"
    },
    "name": "oportunidade_create"
  }
}

Input Schema

NameRequiredDescriptionDefault
gclidNoGoogle Click ID do anúncio que trouxe o lead (parâmetro ?gclid= da URL). Usado para atribuir a conversão no Google Ads.
moedaNo
valorNo
fbclidNoFacebook Click ID do anúncio Meta (?fbclid=).
gbraidNoIdentificador de clique do Google Ads em iOS/apps (?gbraid=).
wbraidNoIdentificador de clique do Google Ads web-to-app em iOS (?wbraid=).
contatoNoContato criado junto com o negócio, quando não há contato_id. Pode ser uma pessoa ou uma empresa.
etapa_idNo
funil_idYes
utm_termNoConjunto ou grupo de anúncios.
ad_networkNoRede Google Ads/ValueTrack: g, s, d, ytv, vp, gtv ou x.
contato_idNo
utm_mediumNoMeio de aquisição, por exemplo paid_social ou organic_social.
utm_sourceNoPlataforma ou fonte informada pelo sistema de origem, sem inferência.
observacoesNo
utm_contentNoAnúncio ou criativo.
utm_campaignNoNome da campanha.
previsao_fechamentoNo
usuario_responsavel_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • addedInput schema / properties / contato / description
      Added value: +"Contato criado junto com o negócio, quando não há contato_id. Pode ser uma pessoa ou uma empresa."
    • addedInput schema / properties / contato / properties / nome / description
      Added value: +"Nome da pessoa. Com tipo empresa, é usado como nome fantasia se nome_fantasia não vier."
    • addedInput schema / properties / contato / properties / nome_fantasia
      Added value: +{
      +  "description": "Nome fantasia da empresa (tipo empresa).",
      +  "type": "string"
      +}
    • addedInput schema / properties / contato / properties / razao_social
      Added value: +{
      +  "description": "Razão social da empresa (tipo empresa, opcional).",
      +  "type": "string"
      +}
    • addedInput schema / properties / contato / properties / tipo
      Added value: +{
      +  "description": "pessoa (padrão) ou empresa.",
      +  "enum": [
      +    "pessoa",
      +    "empresa"
      +  ],
      +  "type": "string"
      +}
    • removedInput schema / properties / contato / required
      Removed value: -[
      -  "nome"
      -]
  2. Added

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses that an inline contato is auto-created, that tipo empresa does not require a linked person, that título is auto-generated from the contact/company name plus a sequential #NN suffix, and the required fields per tipo. It does not cover permissions, duplicate detection, or side effects like UTM attribution at write time.

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?

Front-loaded purpose followed by a numbered flow that mirrors the decision the agent must make; nearly every clause carries operational content. Slightly dense in a single paragraph, but there is no filler.

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

Completeness4/5

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

For a 19-parameter mutation tool with a nested object, no annotations and no output schema, it covers the decisions that would otherwise cause wrong calls (which ID to pass, what is required per tipo, that título is unnecessary). It stops short of stating what the response contains (e.g. the created opportunity id) or defaults for non-required fields.

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

Parameters4/5

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

Schema coverage is 58% and the description compensates for the highest-risk ambiguity: contato_id vs the nested contato object, persona-vs-empresa rules, and the nome-as-nome_fantasia fallback. The remaining 19 parameters (click IDs, UTM fields, moeda/valor, previsao_fechamento) are left entirely to the schema, so it adds meaning but not across the whole surface.

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?

Opens with a specific verb and resource ("Cria uma oportunidade (card do Kanban)") and immediately narrows the business-entity model: the deal belongs to either a person or a company. An agent can tell exactly what is produced without opening the schema.

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

Usage Guidelines5/5

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

Gives an explicit ordered workflow: funil_list for funil_id/etapa_id, then contato_list to look up the person or company, then a clear branch (3a pass contato_id if found, 3b pass inline contato and it will be created). Both the prerequisite calls and the alternative path are named, leaving little to inference.

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.

Resources