LegalTech Logo

LegalTech

← Back to blog

Published on by Miguel Gonzalez Herrera

The Portuguese Ministry of Justice’s DGSI databases are the case-law source Portuguese lawyers use most. They hold the rulings (acórdãos) of the Supreme Court of Justice (STJ), the Supreme Administrative Court (STA), the five courts of appeal (Relações of Porto, Lisbon, Coimbra, Guimarães and Évora), the two Central Administrative Courts and the Tribunal dos Conflitos. Almost every ruling carries a headnote (sumário) and subject descriptors. In this guide you will connect the legaltech/dgsi connector to Claude or ChatGPT so you can search them from the chat, even when you ask in English.

✅ Why this instead of just asking the AI: if you ask Claude or ChatGPT about case law from memory, it may give you a convincing answer with made-up decisions. With the connector, the AI doesn’t answer from memory: it goes to the official source, searches it and brings back real decisions with their links so you can check them.

⚖️ What does the legaltech/dgsi connector cover?

The legaltech/dgsi connector queries the DGSI databases and returns:

For constitutional case law after 1998, use the legaltech/tribunal-constitucional-pt connector.

🔌 How to add Apify to Claude (5 minutes, first time only)

You don’t need to know how to code. You will copy one address and paste it into Claude’s settings. You do it once; after that you just ask your questions.

1. Create your free Apify account. Apify is the service that searches the official source for you. Sign up (you can use your Google account) and stay logged in in your browser. The free plan is enough to try it.

Create a free Apify account

2. Open Claude’s connectors.

3. Click “Add custom connector”. On the phone it is under the + in the top-right corner.

4. Fill in the form and click “Add”. There are only two fields:

https://mcp.apify.com/?tools=actors,docs,runs,storage,tasks,legaltech/dgsi

Leave the other fields (the “OAuth” ones) empty.

5. Click “Connect”. An Apify window opens: click Allow and you will be back in Claude with the connector ready.

6. Try it. Open a new chat and paste the first prompt from the example below. The first time, Claude will ask for permission to use Apify: click Allow.

💡 Already have Apify in Claude? Don’t install it again: start your question with “Use the connector legaltech/dgsi” and Claude will run it.

If you get stuck, the installation guide has a screenshot of every step. Using ChatGPT? The steps are different: follow the ChatGPT guide.

🧪 Worked example: culpable insolvency at the Supreme Court

Classifying an insolvency as culpable (insolvência culposa, arts. 185–191 of the Insolvency Code, CIRE) decides whether the directors are personally liable and disqualified. Let’s look at recent STJ case law:

Use the connector legaltech/dgsi and find Supreme Court of Justice rulings on culpable insolvency since 2023

Claude translates the query into Portuguese and builds the search:

{
  "searchTerms": ["insolvência AND culposa"],
  "databases": ["jstj"],
  "dateFrom": "2023-01-01",
  "sortOrder": "relevance",
  "maxResults": 4
}

Result of a real run:

CaseDateReporting judgeOutcomeIssue
6215/22.3T8VNF-G.G1.S117 Sep 2024Luís Espírito SantoAppeal allowedThe judge may open the classification proceedings on the insolvency administrator’s request made in his report (arts. 155 and 188 CIRE)
1937/21.9T8CBR-A.C1.S116 Nov 2023Ana ResendeAppeal dismissedThe presumptions in art. 186(2) are irrebuttable; once the insolvency is classed as culpable, the duty to compensate arises
822/15.8T8VNG-C.P2.S115 Feb 2023Ana ResendeAppeal dismissedRequirements of culpable insolvency; taking out loans is not enough on its own, so the insolvency is fortuitous
958/23.1T8VIS-B.C1.S17 Oct 2025Luís Espírito SantoAppeal partly allowedGift of a property to the company of the director’s daughter just before insolvency

The last one is the most telling. According to the headnote, the director gave away a property owned by the company to another company run by his daughter, who was also a registered director of the insolvent company, on the eve of the insolvency. The STJ holds that this falls under art. 186(2)(d) CIRE. His repeated refusal to cooperate with the insolvency administrator (art. 83) falls under art. 186(2)(i). The result: a 3-year disqualification for him, 2 years for her, and a duty to compensate the creditors. Her liability is capped at the value of the donated property.

Compare ruling 822/15.8T8VNG: there the court held the insolvency fortuitous, because simply taking out loans did not prove causation.

You can carry on:

💡 More prompt ideas

✅ Good practice

If you have questions or get stuck, write to us at legaltechnologybootcamp@gmail.com.

Written by Miguel Gonzalez Herrera

← Back to blog
Sources from: