Tool
Dam Levels Data, Ontology and MCP Server
Eleven years of Tunisia's daily dam bulletins (2014–2025) as an audited open dataset, a linked ontology and a read-only MCP server.
Tunisia's 36 large dams on 10 October
Map: use the arrow keys to move between dams.
649.3 million m³ stored
27.4% of capacity
18 dams below a quarter full
36 dams printed that day · 10 October 2025
- 10%
- 25%
- 50%
- 75%
- 100%
- capacity unknown
- no value printed
- transfer between dams
National totals, 2014–2025
| Year | Storage (Mm³) | Fill | Dams | < 25% |
|---|---|---|---|---|
| 2014 | 1,178.6 | 55.8% | 26 | 8 |
| 2015 | 1,139.3 | 54.2% | 26 | 8 |
| 2016 | 659.7 | 33.0% | 26 | 16 |
| 2017 | 585.8 | 28.2% | 30 | 15 |
| 2018 | 895.6 | 41.3% | 32 | 9 |
| 2019 | 1,392.8 | 61.8% | 33 | 7 |
| 2020 | 965.8 | 42.6% | 34 | 10 |
| 2021 | 669.2 | 28.7% | 36 | 23 |
| 2022 | 735.5 | 31.4% | 36 | 20 |
| 2023 | 579.0 | 24.8% | 36 | 22 |
| 2024 | 501.4 | 21.2% | 36 | 24 |
| 2025 | 649.3 | 27.4% | 36 | 18 |
Values per dam: hover over the map or move through it with the keyboard. All daily data: the data/ folder of the DamLevels-Data repository (storage.csv, CC BY 4.0)
What it is
DamLevels-Data reconstructs the daily state of Tunisia’s 36 large dams from the bulletins Situation des barrages that the Direction Générale des Barrages et des Grands Travaux Hydrauliques (DGBGTH) publishes through the Observatoire National de l’Agriculture (ONAGRI) (onagri.nat.tn). The bulletins are public but only exist as three-page PDFs whose layout changed over the years. The archive covers 2 July 2014 to 10 October 2025: 3,985 bulletin dates, 11,927 PDF pages and 129,390 daily storage values, each traced to the file, page, column and printed characters it was read from. On 10 October 2025, the last date of the archive, the 36 dams held 649.3 million m³, 27.4% of their capacity, and 18 of them were less than a quarter full; on the same day in 2019, the 33 dams then printed held 1,392.8 million m³.
It ships as an open package — tables, provenance, quality indicators, GIS layers and the DamLevels Ontology (DLO 0.3) — and as a read-only MCP server through which an AI assistant can answer questions from the archive. This is an independent, unofficial project, not affiliated with or endorsed by the DGBGTH, ONAGRI or the Ministry of Agriculture.
From a PDF bulletin to an AI assistant
The work follows the five-star open data model, from a document on the web towards linked data, and adds one step on top: an MCP server that AI assistants can query.
From a PDF bulletin to an MCP server, in six steps
-
★
A public source, locked in a PDF
3,985 daily DGBGTH bulletins published by ONAGRI, 2 July 2014 to 10 October 2025.
-
★★
Read, never retyped
Deterministic engines read 11,927 pages without OCR. Every value keeps its passport.
-
★★★
An open, audited package
129,390 daily values for 36 dams, in CSV and Parquet, checked five complementary ways.
-
★★★★
An identifier for every thing
Dams, observations and pages have stable identifiers in a reserved namespace; the release has a DOI.
-
★★★★★
Linked by an ontology
84 printed columns, 33 concepts, 16 time rules (DLO 0.3), built on the W3C/OGC vocabularies SOSA, OWL-Time, QUDT and PROV: each value knows what it measures, where and for which day.
-
MCP
Answerable by an AI assistant
The MCP server answers from the archive, never fills a gap and cites the source page.
How it works
Deterministic engines read the PDF text layer and the drawn table lines —
no OCR, no manual retyping — so the same file always gives the same
values. Dam names, printed in French and Arabic with varying spellings, are
mapped to stable identifiers (dam_id). Missing values stay missing: nothing
is interpolated, forward-filled or set to zero. The ontology writes down what
each printed column really means and which day it describes: flows printed on
the bulletin of day D cover day D−1, and one of the two “release of the day”
columns is in fact the release one year earlier.
The MCP server exposes ten read-only tools — find_dam, list_dams,
get_storage, get_fill, national_storage, compare_years, get_source,
get_transfers, describe_variable and dataset_info. It refuses dates
outside the record and malformed input with an explicit error rather than an
empty answer, uses the capacity in force on each date, marks Page 3 transfers
as PROBABLE, returns every candidate when a name or a term is ambiguous, and
attaches its coverage, the source attribution and its caveats to every answer.
Use cases
- Hydrology and climate research — compare a dam’s storage on the same calendar day across eleven years, with missing days reported as missing.
- Journalism — check a figure quoted in the press against the bulletin it came from, down to the page, the column and the printed characters.
- Public policy — follow the national reserve: 649 million m³, 27% of capacity, on 10 October 2025, with 18 of 36 dams below a quarter full.
Demo — illustrative example
Illustrative example — real response captured 2026-10-12
Prompt: “How full was Sidi Salem on 10 October 2025, and where does that number come from?”
{
"dam": { "dam_id": "sidisalem", "name_fr": "Sidi Salem" },
"date": "2025-10-10",
"storage_mm3": 137.196,
"capacity": { "status": "KNOWN", "capacity_mm3": 580.35 },
"fill_pct": 23.6, "printed_fill_pct": 23.6,
"source": {
"source_file": "10-10-2025_1.pdf", "page": "1",
"printed_text": "137,196",
"bulletin_url": "https://www.onagri.nat.tn/uploads/barrages/BARRAGES-10-10-2025.pdf"
}
}Trimmed from the get_fill and get_source
responses. Source: DGBGTH bulletin of 10 October 2025, page 1, published by
ONAGRI. The fill uses the capacity in force that day and matches the fill
printed in the bulletin. Asking for a date after 10 October 2025 returns
OUTSIDE_RECORD — the archive is closed, and nothing is
estimated.
Status and roadmap
DamLevels-Data is open source and self-hosted: the MCP server runs as a local stdio process from a clone of the repository, with no hosted endpoint. Release 1.1.2 is archived on Zenodo. The GitHub repository is the single source for the data, the installation and the code. Planned next steps: register the ontology namespace and publish the full instance graph, link dams and catchments to external datasets, publish the watershed climate layer (rainfall, meteorology, soil moisture), and resolve with the publisher the open questions on Page 3 transfers.
Technical report
Technical report TD-TR-2026-04 documents each stage, from the PDF bulletin to linked data and the MCP server, with its evidence and its limitations, under a CC BY 4.0 license.
Download the technical report (PDF)Citable archival version of record: Nasfi, M. H., Boulaares, S., & Gasmi, T. (2026). DamLevels-Data: From PDF Bulletins to Linked, AI-Queryable Open Data on Tunisia’s Large Dams, 2014–2025. Technical report TD-TR-2026-04. tanitdata, Tunis. https://doi.org/10.5281/zenodo.23305079
Data and software (release 1.1.2): Nasfi, M. H., Boulaares, S., & Gasmi, T. (2026). DamLevels-Data: daily storage of Tunisia’s 36 large dams, 2014–2025. Zenodo. https://doi.org/10.5281/zenodo.23304326
Source code and data: github.com/tanitdata/DamLevels-Data
This tool is built and maintained under the studio's research and engineering protocol. How we work
FAQ
- What is the Model Context Protocol?
- The Model Context Protocol is an open standard that lets AI assistants call external tools. The DamLevels MCP server is one such tool: connect it to your AI client (Claude Desktop, Claude Code, or any MCP-compatible client) and ask about Tunisia's dams in English, French or Arabic.
- Who is this for?
- Researchers, journalists, students and public bodies who need Tunisian dam storage with its date and its source: hydrologists comparing years, journalists checking a figure, analysts following the national reserve.
- Do I need the MCP server to use the data?
- No. The tables are plain CSV and Parquet files in the repository, documented by a data dictionary and a Frictionless descriptor; they open in Excel, pandas, R or QGIS. The MCP server is an additional way to query them in natural language.
- Do I need an account or an API key?
- No. The server runs locally over stdio and reads the tables of the repository; there is no key and no network connection at query time.
- How fresh is the data?
- It is a closed historical archive: 2 July 2014 to 10 October 2025. No later bulletin is included, and the server refuses dates outside the record rather than estimating them.
- Is the data freely reusable?
- The source values are DGBGTH's, published by ONAGRI, and reused under the Licence Nationale de Données Publiques Ouvertes (LNDPO) with attribution. The project tables, documentation and ontology are CC BY 4.0; the catchment GIS layers derived from FABDEM and MERIT Hydro are CC BY-NC-SA 4.0 (non-commercial); the code is MIT. This is an independent, unofficial project.
- How was the data checked?
- Five complementary checks, each with its own denominator: Page 1 against Page 2 (128,995 of 128,996 storage pairs equal), dams against the printed national total (3,965 of 3,967 bulletins), running counters against daily values, printed fill against storage and capacity (84,470 of 84,471 rows), and a sample of 2,392 cells re-read from the original PDFs (all correct). Errors in the source itself are documented, never repaired.
- How can I contribute?
- The code and data are published on GitHub. Open an issue or a pull request to report a problem or suggest an improvement.


