# Changelog of Brazil Case Law & Legal Research MCP: STJ, STF Jurisprudência (`siteacs/brazil-case-law-mcp`) Actor

- **URL**: https://apify.com/siteacs/brazil-case-law-mcp/changelog.md
- **Full Actor documentation**: https://apify.com/siteacs/brazil-case-law-mcp.md

## Changelog

### 0.2.18 (2026-11-13)

- Start-up never sits silent: each call to the Apify platform before the first lookup (starting the Actor, reading
  the input, setting up the proxy, reading back the rows of a restarted run) has its own time limit and is tried
  again, and the log says how long each took. If the platform still does not answer, or start-up makes no progress
  for 2 minutes, the run stops with a status message that says where it waited, instead of waiting on. Price and
  output unchanged.

### 0.2.17 (2026-11-13)

- A batch run that Apify moves or restarts goes on from its dataset; the search is not saved or charged twice. Decisions are now saved just before the charge. Price and output unchanged.

### 0.2.16 (2026-11-12)

- Text only: the README says how an autonomous agent with no account pays (a prepaid token from agi.apify.com) and
  that the batch Actor takes direct agent payments.

### 0.2.15 (2026-11-12)

- Text only, no behaviour change: README opens with a short block for agents (input, output, price, MCP endpoint,
  Claude Desktop/Cursor config, the tool and its arguments), a Portuguese FAQ answer, a link to the batch Actor; input
  field descriptions state the format with an example.

### 0.2.14 (2026-11-12)

- CNPJ search precision: the registered name is sent with its company form, in each spelling the courts index
  (`S.A.`, `S/A`, `SA`, `S A`; `LTDA`), and every decision with a party list (all STF decisions, STJ acórdãos with full
  text) is kept only when a party entry starts with the company's name followed by the end, a company form, `-` or
  `EM RECUPERACAO`, or the CNPJ matched. CASSI, PREVI, Transpetro, Petros, "Vale do ..." or Rio Claro no longer come
  back. STJ decisions without a party list stay unverified.
- `EM RECUPERACAO JUDICIAL` / `EM LIQUIDACAO` are dropped from the registered name; short names keep their form (`OI
  S.A.`). The trade name is cut at " - ", loses office words (MATRIZ, SEDE, EST UNIF, ...), is skipped when it names a
  department or has digits, and goes to the STJ only where the row can be checked.
- Sole-trader rule narrowed: refused on the legal nature or a run of 8+ digits in the registered name, so 3M DO BRASIL,
  B3 S.A. or 99 TECNOLOGIA can be searched.
- STF reports which query matched each decision (named queries), so `matchedBy` says `cnpj-text` even when the CNPJ is
  only in the full text.

### 0.2.13 (2026-11-12)

- CNPJ search refuses every natural person: legal nature 213-5 and the whole "pessoas físicas" group 4 (produtor
  rural, leiloeiro, contribuinte individual, ...), a record without a 4-digit legal nature, and the MEI flag. Free.
- The registry lookup goes direct with a neutral User-Agent, one try per registry, and moves on when an answer has no
  name. CNPJ.ws is no longer used (its terms forbid commercial use).

### 0.2.11 (2026-11-12)

- New `cnpj` argument (pesquisa por CNPJ): the company's registered name is looked up in a free public CNPJ registry
  (BrasilAPI, then Minha Receita; CNPJ.ws until 0.2.11) and decisions that list the company as a party, or print the CNPJ, come
  back with `searchCnpj`, `searchCompanyName` and `matchedBy` on each decision, and no counts. Sole traders (MEI,
  empresário individual) are refused, free, and their names never shown; so are unknown CNPJs and calls while the
  registries are down. Not together with `party`. Prices unchanged.

### 0.2.9 (2026-11-11)

- Each recognised number form matches only its exact printed format. Numbers side by side (only spaces or punctuation
  between) count together: 9 or more digits in such a run are refused unless the run is exactly one CNJ number, CNPJ,
  STJ registration, R$ amount or statute number with its year. Put a word between numbers (`arts. 165, 458 e 535`).
- R$ amounts are recognised below R$ 100 million; larger ones are refused with their own message (write them in
  millions).
- Masking catches `123.456.789-09` and `123456789-09` wherever they stand, label or not.

### 0.2.7 (2026-11-11)

- The CPF check is an allowlist: an argument with 9 or more digits outside recognised number forms (CNJ, CNPJ, STJ
  registration, R$ amount, date, year, OAB, a number after a case class or statute word) is refused, free, however the
  digits are split or punctuated. Court wildcards next to a digit are still refused.
- Masking also catches 11 digits however split within 40 characters after the word "CPF".
- R$ amounts go to the STJ as phrases (unquoted, its search splits them at the comma).
- A bare `SA` or `ME` in the middle of a mixed-case name no longer cuts it (`José ME Silva`).
- The pricing event is titled "Search", so the Store reads "$20.00 / 1,000 searches". Prices unchanged.

### 0.2.5 (2026-11-11)

- The CPF refusal no longer lists separators: every argument is normalised the same way (invisible characters such as
  soft hyphens and zero-width spaces dropped), any 1-3 punctuation characters between digits count as a separator, and
  the wildcards `%` and `_` next to digits are refused too. Money amounts (`R$ 10.000,00`) are no longer taken for a CPF.
- Masking also catches a CPF right after a dot (`nº.123.456.789-09`) and one split by commas, underscores or invisible
  characters.
- STJ queries with a dotted number after a word (`Tema 1.199`, `HC 598.051`, `lei 8.112`) no longer fail with
  ORA-29902: the number is sent as a phrase.
- `party` with a company form mid-name (`Petróleo Brasileiro S.A. - Petrobras`) searches the part before it, which the
  STJ finds (it found nothing before).

### 0.2.4 (2026-11-11)

- Text only, plus one message: README, input and tool descriptions are shorter and say which fields `query` and `party`
  search at each court and what `parties` holds per court. The run's status message now reads
  "10 decisions returned; 123 match in total." instead of "10 decisions (123 match)." No input, output or guard changes.

### 0.2.3 (2026-11-11)

- CPF numbers are refused however they are written: any separators, spaces or Unicode dashes, the first nine digits
  alone, and court wildcards (`?`, `$`, `*`) next to digits. The check also runs on the query as sent to each court.
- CPF masking also catches spaced forms such as `123.456.789- 09`.
- SCON field syntax is refused with spaces before the suffix too; abbreviations such as `Ind.Com.Ltda.` are accepted.
- A `query` with unbalanced parentheses, a dangling operator, an empty group or a lone `-` is refused, free.
- `ou`, `e`, `não` and lower-case `or`, `and`, `not` work as operators at the STF as at the STJ.
- `party` drops a trailing company form (S.A., S/A, SA, Ltda, ME, EPP, EIRELI) and reads `-` as a space.
- A search with `party` returns no match counts: `totalMatches` and `hint` are `null`.
- STJ acórdãos whose full-text link opens the "Íntegra de Acórdãos" page now get their PDF, and party names wrapped
  onto two lines in the PDF are joined.

### 0.2 (2026-11-11)

- New `party` argument: only decisions where a company, public body, person or lawyer is listed as a party or
  lawyer. STF matches its "Partes" field and STJ its party index; accents and case are ignored. `query` is now
  optional when `party` is given.
- Each decision now has `parties`: the parties and lawyers as the court lists them (STF always; STJ acórdãos when the
  full text is fetched).
- Names may now appear in `query`; the earlier refusal of name-like queries is gone.
- CPF numbers are refused in every argument and masked (`***.***.***-**`) in every field of the answer.
- Court field syntax typed into an argument (`.TXT.`, `[PART]`, `inpath(...)`) is refused; `caseClass` takes letters
  and spaces only. STJ queries send OR as OU, which SCON parses more reliably.

### 0.1 (2026-11-11)

- First public version. One tool, `search_brazil_case_law`, served as an MCP server (Standby URL + `/mcp`, Streamable
  HTTP) and as a normal Actor run with the same arguments.
- Searches the official case-law services of the STJ and the STF: acórdãos and monocratic decisions, newest first,
  with filters for court, decision type, publication dates, reporting minister and case class.
- Compact output for LLMs: citation string, ementa cut at 1,500 characters, tese and tema, official links; optional
  full text of up to 5 decisions.
- Pay per event: $0.02 per search with results, $0.06 per search with full text; searches with no results are free.
