Skip to main content
Glama

Dilligence — certidões de empresas

Abrir diligência

create_diligence

Abre uma diligência para os CNPJs (cnpjs) e pessoas físicas (people, com CPF e nome completo) com a lista de documentos que o usuário quer. certidoes: ids de list_catalog, que pedimos aos órgãos. documents: qualquer outro documento (contrato social, balanço, alvará...), que fica com alguém para enviar. Só monta a lista: os pedidos aos órgãos começam quando você chama fetch_certidoes (ou passe fetch=true se o usuário já pediu para buscar). Se o usuário tem um checklist, passe por match_documents antes e confirme a lista com ele. Sem certidoes nem documents, entram todas as certidões do catálogo. 1 crédito por certidão emitida (cobrado só quando sai); documentos enviados não cobram.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "create_diligence"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNo
cnpjsNo
fetchNoJá pede as certidões aos órgãos
peopleNoPessoas físicas (CPF), ex. quem vende um imóvel: só as certidões que emitimos para CPF (TST, TRT, TRF, protesto SP, TJSP cível com RG, Receita/PGFN com nascimento)
templateNoModelo de list_templates (ma, credito, fornecedor, licitacao, imovel): monta a lista ajustada à sede de cada empresa; certidoes e documents somam a ela
certidoesNoids de list_catalog
documentsNoTítulos de documentos fora do catálogo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / people
      Added value: +{
      +  "description": "Pessoas físicas (CPF), ex. quem vende um imóvel: só as certidões que emitimos para CPF (TST, TRT, TRF, protesto SP, TJSP cível com RG, Receita/PGFN com nascimento)",
      +  "items": {
      +    "properties": {
      +      "cpf": {
      +        "type": "string"
      +      },
      +      "nascimento": {
      +        "description": "dd/mm/aaaa; a Receita pede",
      +        "type": "string"
      +      },
      +      "nome": {
      +        "description": "Nome completo",
      +        "type": "string"
      +      },
      +      "rg": {
      +        "description": "RG; o TJSP pede para a certidão cível",
      +        "type": "string"
      +      },
      +      "uf": {
      +        "description": "UF onde mora (TRT e TRF da região); padrão SP",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "cpf",
      +      "nome"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "cnpjs"
      -]New value: +[]
  2. Changed2 schema fields changed
    • removedInput schema / properties / people
      Removed value: -{
      -  "description": "Pessoas físicas (CPF), ex. quem vende um imóvel: só as certidões que emitimos para CPF (TST, TRT, TRF, protesto SP, TJSP cível com RG, Receita/PGFN com nascimento)",
      -  "items": {
      -    "properties": {
      -      "cpf": {
      -        "type": "string"
      -      },
      -      "nascimento": {
      -        "description": "dd/mm/aaaa; a Receita pede",
      -        "type": "string"
      -      },
      -      "nome": {
      -        "description": "Nome completo",
      -        "type": "string"
      -      },
      -      "rg": {
      -        "description": "RG; o TJSP pede para a certidão cível",
      -        "type": "string"
      -      },
      -      "uf": {
      -        "description": "UF onde mora (TRT e TRF da região); padrão SP",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "cpf",
      -      "nome"
      -    ],
      -    "type": "object"
      -  },
      -  "type": "array"
      -}
    • changedInput schema / required
      Previous value: -[]New value: +[
      +  "cnpjs"
      +]
  3. Changed2 schema fields changed
    • addedInput schema / properties / people
      Added value: +{
      +  "description": "Pessoas físicas (CPF), ex. quem vende um imóvel: só as certidões que emitimos para CPF (TST, TRT, TRF, protesto SP, TJSP cível com RG, Receita/PGFN com nascimento)",
      +  "items": {
      +    "properties": {
      +      "cpf": {
      +        "type": "string"
      +      },
      +      "nascimento": {
      +        "description": "dd/mm/aaaa; a Receita pede",
      +        "type": "string"
      +      },
      +      "nome": {
      +        "description": "Nome completo",
      +        "type": "string"
      +      },
      +      "rg": {
      +        "description": "RG; o TJSP pede para a certidão cível",
      +        "type": "string"
      +      },
      +      "uf": {
      +        "description": "UF onde mora (TRT e TRF da região); padrão SP",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "cpf",
      +      "nome"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "cnpjs"
      -]New value: +[]
  4. Changed2 schema fields changed
    • removedInput schema / properties / people
      Removed value: -{
      -  "description": "Pessoas físicas (CPF), ex. quem vende um imóvel: só as certidões que emitimos para CPF (TST, TRT, TRF, protesto SP, TJSP cível com RG, Receita/PGFN com nascimento)",
      -  "items": {
      -    "properties": {
      -      "cpf": {
      -        "type": "string"
      -      },
      -      "nascimento": {
      -        "description": "dd/mm/aaaa; a Receita pede",
      -        "type": "string"
      -      },
      -      "nome": {
      -        "description": "Nome completo",
      -        "type": "string"
      -      },
      -      "rg": {
      -        "description": "RG; o TJSP pede para a certidão cível",
      -        "type": "string"
      -      },
      -      "uf": {
      -        "description": "UF onde mora (TRT e TRF da região); padrão SP",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "cpf",
      -      "nome"
      -    ],
      -    "type": "object"
      -  },
      -  "type": "array"
      -}
    • changedInput schema / required
      Previous value: -[]New value: +[
      +  "cnpjs"
      +]
  5. Changed2 schema fields changed
    • addedInput schema / properties / people
      Added value: +{
      +  "description": "Pessoas físicas (CPF), ex. quem vende um imóvel: só as certidões que emitimos para CPF (TST, TRT, TRF, protesto SP, TJSP cível com RG, Receita/PGFN com nascimento)",
      +  "items": {
      +    "properties": {
      +      "cpf": {
      +        "type": "string"
      +      },
      +      "nascimento": {
      +        "description": "dd/mm/aaaa; a Receita pede",
      +        "type": "string"
      +      },
      +      "nome": {
      +        "description": "Nome completo",
      +        "type": "string"
      +      },
      +      "rg": {
      +        "description": "RG; o TJSP pede para a certidão cível",
      +        "type": "string"
      +      },
      +      "uf": {
      +        "description": "UF onde mora (TRT e TRF da região); padrão SP",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "cpf",
      +      "nome"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "cnpjs"
      -]New value: +[]
  6. First observed

TDQS

A4.7/5.0
Behavior5/5

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

The annotations only declare the generic profile (not read-only, open-world, non-idempotent, not destructive). The description goes well beyond that by disclosing the billing model ('1 crédito por certidão emitida (cobrado só quando sai); documentos enviados não cobram') and the deferred side effect that nothing is requested from agencies until fetch. The catalog-expansion default is a behavior an agent could otherwise trigger blindly and incur cost from.

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?

Information-dense and front-loaded: the core action comes first, then the sequencing constraint, then the fallback default, then billing. No sentence is filler, though the single dense paragraph mixes workflow, defaults and pricing in a way that would read faster as separated clauses.

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 7-parameter creation tool with no output schema and no required fields, the description covers the workflow, cost, defaults and sibling coordination well. What is missing is what happens with an empty call (all params optional) and what the tool returns (e.g., a diligence id to pass to fetch_certidoes or get_diligence).

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?

The description adds operational meaning to several params: certidoes are ids from list_catalog that get requested from agencies, documents are titles outside the catalog that depend on someone uploading, and people are restricted to the certificate types available for CPF. Schema coverage is 71% and already documents fetch, people sub-fields and template, but the top-level 'name' parameter is left undefined in both schema and description, which is the remaining gap.

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?

States a specific verb and resource ('Abre uma diligência') plus the exact scope: CNPJs, people with CPF/name, and a document list. It also draws the boundary against siblings in the same breath ('Só monta a lista'), so an agent knows this is list-building, not issuance, without opening any 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?

Explicitly names the follow-up tool and the condition that triggers it ('os pedidos aos órgãos começam quando você chama fetch_certidoes (ou passe fetch=true se o usuário já pediu para buscar)'). It also gives a pre-step ('passe por match_documents antes e confirme a lista com ele') and a default when no explicit selection is made ('Sem certidoes nem documents, entram todas as certidões do catálogo').

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.