aggregate_licitacoes_por_periodoAggregate Brazilian public procurement bid counts (and optional value sums) over a time series — answers "how did volumes evolve month by month" without paginating tens of thousands of records.
Each bucket is computed by issuing a single PNCP `list` call per (bucket × modality) and reading `totalRegistros` from the response. With default modalities (Pregão Eletrônico + Dispensa + Inexigibilidade) and granularidade=mes, a 12-month range = 36 calls.
When `esfera` filter or value metrics are requested, the tool paginates the bucket internally (up to 50 pages = 2500 records per bucket) and aggregates client-side. Be conservative with date range × granularity in that mode.
Maximum total date range: 1830 days (~5 years). Each bucket call respects the PNCP 365-day-per-call limit.
Modality codes:
1 = Leilão - Eletrônico
2 = Diálogo Competitivo
3 = Concurso
4 = Concorrência - Eletrônica
5 = Concorrência - Presencial
6 = Pregão - Eletrônico
7 = Pregão - Presencial
8 = Dispensa de Licitação
9 = Inexigibilidade
10 = Manifestação de Interesse
11 = Pré-qualificação
12 = Credenciamento
13 = Leilão - Presencial
Default modalities: [6, 8, 9] (Pregão Eletrônico, Dispensa, Inexigibilidade).Input schema{
"type": "object",
"required": [
"dataInicial",
"dataFinal"
],
"properties": {
"dataInicial": {
"type": "string",
"description": "Start date YYYYMMDD."
},
"dataFinal": {
"type": "string",
"description": "End date YYYYMMDD."
},
"granularidade": {
"type": "string",
"enum": [
"dia",
"semana",
"mes",
"ano"
],
"default": "mes",
"description": "Time bucket size for the series."
},
"modalidades": {
"type": "array",
"items": {
"type": "integer",
"enum": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13
]
},
"description": "List of modality codes. Default: [6, 8, 9]."
},
"uf": {
"type": "string",
"description": "Two-letter state code."
},
"codigoMunicipioIbge": {
"type": "string",
"description": "IBGE municipality code."
},
"cnpjOrgao": {
"type": "string",
"description": "Procuring agency CNPJ."
},
"esfera": {
"type": "string",
"enum": [
"federal",
"estadual",
"municipal",
"distrital"
],
"description": "Filter by sphere ('federal', 'estadual', 'municipal', 'distrital'). Forces paginated aggregation — be conservative with range × granularity."
},
"metricas": {
"type": "array",
"items": {
"type": "string",
"enum": [
"count",
"valorEstimadoTotal",
"valorHomologadoTotal"
]
},
"default": [
"count"
],
"description": "Metrics to include in each bucket. 'count' is free (single page hit). 'valorEstimadoTotal' and 'valorHomologadoTotal' force paginated aggregation."
}
}
} | — | | — |
compare_periodosCompare two date ranges side-by-side over the same filters — answers questions like "did Jun/2024 (electoral year) differ from Jun/2025 in bid volumes?".
Wraps two `aggregate_licitacoes_por_periodo` calls and returns each period's total metrics plus absolute and percentage deltas. Use granularidade-style buckets implicitly = "ano" for the comparison (one bucket per period, summed).
When `esfera` filter or value metrics are requested, the underlying tool paginates internally — be conservative with range size.Input schema{
"type": "object",
"required": [
"periodoA",
"periodoB"
],
"properties": {
"periodoA": {
"type": "object",
"required": [
"label",
"dataInicial",
"dataFinal"
],
"properties": {
"label": {
"type": "string",
"description": "Friendly label, e.g. \"Jun/2024\""
},
"dataInicial": {
"type": "string",
"description": "YYYYMMDD"
},
"dataFinal": {
"type": "string",
"description": "YYYYMMDD"
}
}
},
"periodoB": {
"type": "object",
"required": [
"label",
"dataInicial",
"dataFinal"
],
"properties": {
"label": {
"type": "string",
"description": "Friendly label, e.g. \"Jun/2025\""
},
"dataInicial": {
"type": "string",
"description": "YYYYMMDD"
},
"dataFinal": {
"type": "string",
"description": "YYYYMMDD"
}
}
},
"modalidades": {
"type": "array",
"items": {
"type": "integer",
"enum": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13
]
},
"description": "Modality codes. Default: [6, 8, 9]."
},
"uf": {
"type": "string",
"description": "Two-letter state code."
},
"codigoMunicipioIbge": {
"type": "string"
},
"cnpjOrgao": {
"type": "string",
"description": "Procuring agency CNPJ."
},
"esfera": {
"type": "string",
"enum": [
"federal",
"estadual",
"municipal",
"distrital"
],
"description": "Filter by sphere."
},
"metricas": {
"type": "array",
"items": {
"type": "string",
"enum": [
"count",
"valorEstimadoTotal",
"valorHomologadoTotal"
]
},
"default": [
"count"
]
}
}
} | — | | — |
get_ata_rpGet the full details of an Ata de Registro de Preço, optionally including its items (with available balance and supplier info) and attached files. Use orgaoCnpj/anoCompra/sequencialCompra (the parent procurement) and sequencialAta (the ARP within that procurement).Input schema{
"type": "object",
"properties": {
"orgaoCnpj": {
"type": "string",
"description": "Procuring agency CNPJ"
},
"anoCompra": {
"type": "integer",
"description": "Year of the parent procurement"
},
"sequencialCompra": {
"type": "integer",
"description": "Sequential of the parent procurement"
},
"sequencialAta": {
"type": "integer",
"description": "Sequential of the ARP"
},
"includeItens": {
"type": "boolean",
"default": true
},
"includeArquivos": {
"type": "boolean",
"default": false
}
},
"required": [
"orgaoCnpj",
"anoCompra",
"sequencialCompra",
"sequencialAta"
]
} | — | | — |
get_cnpj_dataGet a Brazilian company's public registration data: legal name, trade name, primary CNAE, secondary CNAEs, address, partners (QSA), capital, juridical nature, Simples/MEI status. Source: BrasilAPI by default (free aggregator over Receita Federal Open Data). Set CNPJ_PROVIDER=minhareceita to switch.Input schema{
"type": "object",
"properties": {
"cnpj": {
"type": "string",
"description": "CNPJ in any format — punctuation is stripped. 14 digits expected."
}
},
"required": [
"cnpj"
]
} | — | | — |
get_contratoGet the full details of a public contract on PNCP. Provide either numeroControlePNCP or orgaoCnpj/ano/sequencial.Input schema{
"type": "object",
"properties": {
"numeroControlePNCP": {
"type": "string"
},
"orgaoCnpj": {
"type": "string"
},
"ano": {
"type": "integer"
},
"sequencial": {
"type": "integer"
}
}
} | — | | — |
get_fornecedor_contratosList public contracts where a given CNPJ appears as the supplier (fornecedor). Useful for analyzing a competitor or a potential partner. Defaults to the last 365 days.Input schema{
"type": "object",
"properties": {
"cnpj": {
"type": "string",
"description": "Supplier CNPJ (14 digits)"
},
"diasAtras": {
"type": "integer",
"minimum": 1,
"maximum": 3650,
"default": 365,
"description": "How many days back to search."
},
"pagina": {
"type": "integer",
"minimum": 1,
"default": 1
},
"tamanhoPagina": {
"type": "integer",
"minimum": 10,
"maximum": 50,
"default": 50
}
},
"required": [
"cnpj"
]
} | — | | — |
get_licitacaoGet the full details of a single licitação (procurement bid) on PNCP. Provide either numeroControlePNCP (the full PNCP control number string) or all three of orgaoCnpj, ano, sequencial.Input schema{
"type": "object",
"properties": {
"numeroControlePNCP": {
"type": "string",
"description": "PNCP control number, format like 00000000000000-1-000001/2024"
},
"orgaoCnpj": {
"type": "string",
"description": "Procuring agency CNPJ (14 digits)"
},
"ano": {
"type": "integer",
"description": "Year of the bid (e.g. 2024)"
},
"sequencial": {
"type": "integer",
"description": "Sequential number of the bid"
}
}
} | — | | — |
get_orgaoGet a public agency's profile from PNCP: legal name, branch of government (poder), federal/state/municipal level (esfera), legal nature, address.Input schema{
"type": "object",
"properties": {
"cnpj": {
"type": "string",
"description": "Agency CNPJ (14 digits)"
}
},
"required": [
"cnpj"
]
} | — | | — |
list_contrato_instrumentosList billing instruments (NFes, faturas) attached to a contract. Reveals real execution: when payments were due, NFe keys, etc.Input schema{
"type": "object",
"properties": {
"numeroControlePNCP": {
"type": "string"
},
"orgaoCnpj": {
"type": "string"
},
"ano": {
"type": "integer"
},
"sequencial": {
"type": "integer"
}
}
} | — | | — |
list_contrato_termosList the additive terms (termos aditivos) of a contract — extensions, value increases/reductions, term changes. Useful to understand contract evolution.Input schema{
"type": "object",
"properties": {
"numeroControlePNCP": {
"type": "string"
},
"orgaoCnpj": {
"type": "string"
},
"ano": {
"type": "integer"
},
"sequencial": {
"type": "integer"
}
}
} | — | | — |
list_licitacao_arquivosList the files (edital PDFs, attachments, terms of reference) attached to a licitação on PNCP. Returns metadata and direct URLs — does not download the file content.Input schema{
"type": "object",
"properties": {
"numeroControlePNCP": {
"type": "string"
},
"orgaoCnpj": {
"type": "string"
},
"ano": {
"type": "integer"
},
"sequencial": {
"type": "integer"
}
}
} | — | | — |
list_licitacao_itensList the items (lots) of a licitação on PNCP. Each item has description, quantity, unit, estimated unit value and category. Provide either numeroControlePNCP, or orgaoCnpj/ano/sequencial.Input schema{
"type": "object",
"properties": {
"numeroControlePNCP": {
"type": "string"
},
"orgaoCnpj": {
"type": "string"
},
"ano": {
"type": "integer"
},
"sequencial": {
"type": "integer"
}
}
} | — | | — |
list_licitacao_resultadosList the bidding results (winners, runners-up, prices, suppliers) for a specific item of a licitação. You must specify which item — use list_licitacao_itens first to discover item numbers.Input schema{
"type": "object",
"properties": {
"numeroControlePNCP": {
"type": "string"
},
"orgaoCnpj": {
"type": "string"
},
"ano": {
"type": "integer"
},
"sequencial": {
"type": "integer"
},
"numeroItem": {
"type": "integer",
"minimum": 1,
"description": "The item number (numeroItem) to retrieve results for."
}
},
"required": [
"numeroItem"
]
} | — | | — |
list_pca_itensList the planned items of a specific PCA: descriptions, estimated quantities, unit values, expected delivery dates, and CATSER/CATMAT classification. Optionally filter client-side by keyword on description.Input schema{
"type": "object",
"properties": {
"orgaoCnpj": {
"type": "string"
},
"anoPca": {
"type": "integer"
},
"sequencialPca": {
"type": "integer"
},
"palavraChave": {
"type": "string",
"description": "Filter on descricaoItem"
}
},
"required": [
"orgaoCnpj",
"anoPca",
"sequencialPca"
]
} | — | | — |
search_atas_rpSearch Atas de Registro de Preço (price-registry agreements) on PNCP. ARPs are pre-negotiated agreements that any compatible agency can use within the validity period — finding ones still in vigor with available balance is a key business opportunity. Defaults: last 90 days, only active (somenteVigentes=true). Maximum date range per query: 365 days (PNCP limit); wider windows return HTTP 422.Input schema{
"type": "object",
"properties": {
"dataInicial": {
"type": "string",
"description": "Start date YYYYMMDD"
},
"dataFinal": {
"type": "string",
"description": "End date YYYYMMDD"
},
"cnpjOrgao": {
"type": "string",
"description": "Filter by procuring agency CNPJ"
},
"esfera": {
"type": "string",
"enum": [
"federal",
"estadual",
"municipal",
"distrital"
],
"description": "Filter by government sphere: 'federal', 'estadual', 'municipal', or 'distrital'."
},
"somenteVigentes": {
"type": "boolean",
"default": true,
"description": "Only include ARPs whose vigência has not expired and that are not cancelled."
},
"palavraChave": {
"type": "string",
"description": "Keyword filter on objetoContratacao"
},
"pagina": {
"type": "integer",
"minimum": 1,
"default": 1
},
"tamanhoPagina": {
"type": "integer",
"minimum": 10,
"maximum": 50,
"default": 20
}
}
} | — | | — |
search_contratosSearch public procurement contracts (contratos) on PNCP. Useful for analyzing market history, supplier behavior, and agency spending patterns. Defaults to last 30 days when no date range is provided. Maximum date range per query: 365 days (PNCP limit); wider windows return HTTP 422. For multi-year searches, issue multiple calls.Input schema{
"type": "object",
"properties": {
"dataInicial": {
"type": "string",
"description": "Start date YYYYMMDD"
},
"dataFinal": {
"type": "string",
"description": "End date YYYYMMDD"
},
"cnpjOrgao": {
"type": "string",
"description": "Filter by procuring agency CNPJ"
},
"cnpjFornecedor": {
"type": "string",
"description": "Filter by supplier CNPJ"
},
"esfera": {
"type": "string",
"enum": [
"federal",
"estadual",
"municipal",
"distrital"
],
"description": "Filter by government sphere: 'federal', 'estadual', 'municipal', or 'distrital'. Applied client-side."
},
"palavraChave": {
"type": "string",
"description": "Keyword filter on objetoContrato (client-side)."
},
"valorMinimo": {
"type": "number"
},
"valorMaximo": {
"type": "number"
},
"pagina": {
"type": "integer",
"minimum": 1,
"default": 1
},
"tamanhoPagina": {
"type": "integer",
"minimum": 10,
"maximum": 50,
"default": 20
}
}
} | — | | — |
search_licitacoesSearch Brazilian public procurement bids (licitações) on PNCP.
PNCP requires a date range and at least one modality code per query. If you do not specify, defaults are: last 7 days and modalities [6, 8, 9] (Pregão Eletrônico, Dispensa, Inexigibilidade — most common).
Maximum date range per query: 365 days (PNCP limit). Wider windows return HTTP 422. For multi-year searches, issue multiple calls with date windows of <= 365 days each.
Modality codes:
1 = Leilão - Eletrônico
2 = Diálogo Competitivo
3 = Concurso
4 = Concorrência - Eletrônica
5 = Concorrência - Presencial
6 = Pregão - Eletrônico
7 = Pregão - Presencial
8 = Dispensa de Licitação
9 = Inexigibilidade
10 = Manifestação de Interesse
11 = Pré-qualificação
12 = Credenciamento
13 = Leilão - Presencial
Filters palavraChave, valorMinimo, valorMaximo are applied client-side over the page returned by PNCP.Input schema{
"type": "object",
"properties": {
"dataInicial": {
"type": "string",
"description": "Start date in YYYYMMDD format. Default: 7 days ago."
},
"dataFinal": {
"type": "string",
"description": "End date in YYYYMMDD format. Default: today."
},
"modalidades": {
"type": "array",
"items": {
"type": "integer",
"enum": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13
]
},
"description": "List of modality codes. Default: [6, 8, 9]."
},
"uf": {
"type": "string",
"description": "Two-letter state code (e.g. SP, RJ)."
},
"codigoMunicipioIbge": {
"type": "string",
"description": "IBGE municipality code (7 digits)."
},
"cnpjOrgao": {
"type": "string",
"description": "Filter by procuring agency CNPJ (14 digits, no punctuation)."
},
"esfera": {
"type": "string",
"enum": [
"federal",
"estadual",
"municipal",
"distrital"
],
"description": "Filter by government sphere: 'federal', 'estadual', 'municipal', or 'distrital'. Useful when analyzing impact of policies that affect a specific sphere (e.g., municipal elections). Applied client-side over the agency's esferaId field."
},
"palavraChave": {
"type": "string",
"description": "Keyword to filter on objetoCompra (case-insensitive substring match)."
},
"valorMinimo": {
"type": "number",
"description": "Minimum estimated value in BRL."
},
"valorMaximo": {
"type": "number",
"description": "Maximum estimated value in BRL."
},
"pagina": {
"type": "integer",
"minimum": 1,
"default": 1
},
"tamanhoPagina": {
"type": "integer",
"minimum": 10,
"maximum": 50,
"default": 20
}
}
} | — | | — |
search_pcaSearch recently published/updated Plano de Contratação Anual (PCA) entries — what public agencies INTEND to buy. Returns PCA entries (one per agency unit) with their items embedded. Filter by classification: 'material' or 'servico'. Defaults: last 30 days, classification 'material'. Per Lei 14.133. Maximum date range per query: 365 days (PNCP limit).Input schema{
"type": "object",
"properties": {
"dataInicio": {
"type": "string",
"description": "Start date YYYYMMDD. Default: 30 days ago."
},
"dataFim": {
"type": "string",
"description": "End date YYYYMMDD. Default: today."
},
"classificacao": {
"type": "string",
"enum": [
"material",
"servico"
],
"default": "material",
"description": "Top-level classification: material (codigoClassificacaoSuperior=01) or servico (=02)."
},
"pagina": {
"type": "integer",
"minimum": 1,
"default": 1
},
"tamanhoPagina": {
"type": "integer",
"minimum": 10,
"maximum": 50,
"default": 20
}
}
} | — | | — |