Skip to main content
Glama

Alerts by CNPJ

create_alerts_by_cnpj

Alerts for new procurements by the company CNPJ (requires the token edm_…): the activities (CNAE) become families of terms, and there is one alert per family, main first, up to max_familias. A CNAE outside the dictionary is listed in the response with a null family. Two modes. By termos: a space requires all groups; | accepts alternatives within a group. By cnpj: known activity families produce alerts, up to max_familias. Unmapped activities remain in the response without an alert. The cron checks every 30 minutes. Email requires an account session and EMAIL_ALERTAS=1. It uses explicit recipients or the verified account email.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ufNoState (UF) abbreviation (optional).
cnpjYesCNPJ with 14 digits, with or without punctuation.
nomeNoAlert name, up to 100 characters.
canalNopull, webhook or email (default pull).pull
destinoNoHTTPS webhook URL. Ignored for pull and email.
filtrosNoExtra filter: modalities, municipalities, exclusions, values, open proposals and CNAEs. PATCH replaces the whole filter; {} clears it.
max_familiasNo1 to 8 (default 8): how many families become alerts.
destinatariosNoEmail recipients: `para`, `cc` and `bcc` arrays. Up to 10 distinct addresses in total. An empty `para` list uses the account email. PATCH replaces all three lists. BCC is hidden from other recipients.
organizacao_idNoOrganization from `GET /api/me/empresas`. Membership and MFA are checked. Null removes the label. This does not share alert ownership.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / destinatarios
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Email recipients: `para`, `cc` and `bcc` arrays. Up to 10 distinct addresses in total. An empty `para` list uses the account email. PATCH replaces all three lists. BCC is hidden from other recipients.",
      +  "properties": {
      +    "bcc": {
      +      "items": {
      +        "format": "email",
      +        "maxLength": 254,
      +        "type": "string"
      +      },
      +      "maxItems": 10,
      +      "type": "array"
      +    },
      +    "cc": {
      +      "items": {
      +        "format": "email",
      +        "maxLength": 254,
      +        "type": "string"
      +      },
      +      "maxItems": 10,
      +      "type": "array"
      +    },
      +    "para": {
      +      "items": {
      +        "format": "email",
      +        "maxLength": 254,
      +        "type": "string"
      +      },
      +      "maxItems": 10,
      +      "type": "array"
      +    }
      +  },
      +  "type": "object"
      +}
    • changedInput schema / properties / destino / description
      Previous value: -"https URL (webhook); ignored for pull and email (email goes to the account e-mail)."New value: +"HTTPS webhook URL. Ignored for pull and email."
    • addedInput schema / properties / nome
      Added value: +{
      +  "description": "Alert name, up to 100 characters.",
      +  "maxLength": 100,
      +  "type": "string"
      +}
    • addedInput schema / properties / organizacao_id
      Added value: +{
      +  "description": "Organization from `GET /api/me/empresas`. Membership and MFA are checked. Null removes the label. This does not share alert ownership.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
  2. Added

TDQS

B3.4/5.0
Behavior4/5

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

Annotations already declare it as a mutating, non-idempotent, open-world write. The description adds real context beyond that: the required `edm_…` token, a 30-minute cron cadence, and the EMAIL_ALERTAS=1 / account-session requirement plus recipient fallback for email delivery. It omits rate limits and what the response body contains, keeping it short of a 5.

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

Conciseness3/5

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

The prose is dense and jargon-heavy, and the 'Two modes' section references a `termos` mode that has no corresponding parameter, which is confusing rather than useful. Much of the content earns its place, but it is not cleanly front-loaded or trimmed.

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 9-parameter mutation tool with nested objects and no output schema, the description covers auth, scheduling, email delivery prerequisites and the family/null-family return behavior adequately. It lacks any note on the response shape or error cases but is otherwise complete against what annotations and schema already provide.

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 carries the parameter burden and the baseline is 3. The description reinforces a few semantics (family priority 'main first', the `max_familias` cap, unmapped CNAEs returning a null family), but adds little detail about `filtros`, `destinatarios` or `organizacao_id` beyond what the schema already states.

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

Purpose4/5

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

The description names a specific resource (alerts for new procurements) and scope (by company CNPJ) and explains the family mechanism that generates one alert per CNAE family. It is clear about what it produces, but never uses an explicit creation verb and does not distinguish itself from the sibling `create_alert`, leaving the agent to infer the difference.

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?

No when-to-use / when-not-to-use guidance is given, and no alternative sibling (`create_alert`, `preview_alert`) is named. The 'Two modes' passage contrasts `termos` and `cnpj`, but `termos` is not even a parameter in this schema, so it does not function as actionable usage direction.

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.