Repository navigation
v0.13.0
No new tools (83 in the default profile): new data behind existing selectors
(five international sources, the Consejo de la Judicatura dashboards) and a
hardening pass from a full code review and the live smoke run.
-
get_serie_internacionalgains fivefuentevalues:comtrade(UN
Comtrade public preview: bilateral trade in USD for one period per call,
capped at 500 rows, 429 retried automatically),imf(IMF SDMX: CPI,
exchange rates, balance of payments, fiscal and monetary flows; a short key
such asECUis a country prefix),who(WHO Global Health Observatory
indicators by sex),ilo(ILOSTAT labour statistics; short keys are padded
with wildcards) andunhcr(refugees and asylum seekers hosted in Ecuador,
by year and origin). All keyless and Ecuador by default;wdi,irenaand
xmare unchanged.imf/ilo/wholist their flows or indicators when
indicadoris empty. New clientshelpers/{comtrade,imf,who,ilo,unhcr}_client.py
plushelpers/intl_http.py(429/5xx retry) andhelpers/sdmx_json.py.
Hardening after the first cut:intl_httpretries connect/DNS/read errors
(not only timeouts), names the source in the final error, honours a
Retry-Afterhint (seconds or HTTP-date) only on a 429; the IMF client maps
an unknown flow (404) and a rejected key (400) to clear errors;sdmx_json
raises on an inconsistent series key or an observation outside the period
list; WDI pages through multi-page answers; UNHCR results carrytruncado
when the 10-page cap cuts the data. -
Consejo de la Judicatura — Estadística Judicial (
fuente="judicatura"in
list_catalogo,get_sut_indicador_schemaandquery_sut_indicador): ten
live Power BI dashboards of the Portal de Estadística Judicial (audiencias,
boletas, capacitaciones, destituciones, escritos, mediación, notarial,
productividad de jueces, remates judiciales, SUPA) through the SUT Power BI
client. Each indicator can carry its own Power BI cluster (base), schema
discovery readsAggregationfields ([suma]/[promedio]) and falls back
to scanning the report layout for newer report formats, and one-column
results decode correctly.medidasdeproteccion(key does not resolve) and
causas(empty page) are not included.fuentedefaults tosut, so
existing calls are unchanged.query_sut_indicadoralso escapes'as''
in the Power BI literal, clampslimiteto 20000, reportslimite/truncado,
and raises on a Power BI error body instead of returning zero rows. -
Previews and downloads (
csv_readerand the tools on top of it):- European decimals: a column of
1,234-style cells is no longer read as
European notation (that is a US thousands group, and the conversion shrank
values 1000x). A column needs one unambiguous cell such as7.760,2or
168,15; once it qualifies, only cells matching the pattern are converted,
1.000-style whole numbers included. - Spreadsheet and PDF parsers (openpyxl, xlrd, pyxlsb, odfpy, pypdf, and the
Centrosur/EEQ outage PDFs) run in a worker thread under a 60 s bound
(csv_reader.run_parser_off_loop), and the SSRF guard's DNS resolution is
off the event loop too, so a huge or malformed file no longer stalls every
other request. The outage-PDF parsers cap at 200 pages and turn pypdf
errors into a clear message; Centrosur extracts each page once and an
unlabelled page inherits the nearest preceding schedule. .xlsx,.odsand.xlsbfiles that would expand past 200 MB are
rejected;read_pdfpage ranges are clamped to the document; CSV/JSON
previews no longer turn into mojibake when the 5 MB cap cuts a multibyte
character (cp1252 is tried before latin-1);__MACOSXresource forks are
skipped when picking an archive member.download_bytestreatsContent-Lengthas advisory (an overstated or
malformed header no longer makesdownload_resourcerefuse a fully
received file); a truncated.xls, a corrupt.tar.gzand an unsafe URL
give the same actionable error as the other formats;list_zip_contents
ends cleanly on a short central directory and its ranged requests honour
ECUADOR_MCP_GEO_PROXY.preview_resource_dataclassifies on the URL path (a?token=query no
longer hides the extension);download_resourcewithformat="text"no
longer attaches the base64 file to the structured payload.investigate_datasetpicks the first resource whose format or extension
is previewable without any network call and sniffs Content-Type only for
the unlabelled ones, at most 25 and five at a time (150 mislabelled files
used to mean 150 serial HEAD requests). It anddetect_series_patternlet
download_bytesown the download session, so the project User-Agent and
the geo proxy apply to the file host.
- European decimals: a column of
-
Security and privacy:
log_toollogs only parameter names at INFO (values moved to DEBUG), so
RUCs, cédulas and free-text queries stay out of hosted logs;LOG_LEVEL
governs Uvicorn's loggers too.- The per-client rate limit drops idle client keys; behind a reverse proxy,
setFORWARDED_ALLOW_IPS(Uvicorn's own variable) so clients get separate
quotas (see docs/DEPLOYMENT.md). - SSRF guard: CGNAT (
100.64.0.0/10) and NAT64 targets are refused, and a
rejection answers with a generic message instead of the resolved private
IP. An emptyCKAN_INSECURE_TLSno longer disables TLS verification; the
unreachableverify=Falsefallbacks in the SRI and IESS certificate
clients are removed; CKANgroups/organizationfilters are quoted. get_aviso_aeronautico/get_aip_aerodromorefuse an ICAO designator
that is not exactly four letters or digits before building any URL;
list_sat_tsunamicaps itslimit;ECUADOR_MCP_DATA_DIRis resolved to
an absolute path; an empty*_API_URLoverride falls back to the default.
-
BCE:
get_bce_iem_table: a data row such asBanano | 1500 | 2300can no
longer be mistaken for the period header (years are bounded to 1900..next
year and only text, date or integer cells count); a sheet without a real
period header falls back to the layout preview.- When the "Últimas publicaciones" page or the historical archive cannot be
read,get_bce_iem_table/search_bce_iemserve the bulletin list without
caching it for 24 h and reportfuentes_fallidas;search_indicadores_bce
(índices), cuentas nacionales and precios/comercio exterior likewise report
paginas_fallidas, and the catalog snapshot is never cached after a failed
bundle. get_bce_indicador_diarioflagstruncado/observaciones_en_rangowhen a
date window is cut to 366 rows and rejects dates that are notYYYY-MM-DD.
-
Honest results instead of empty successes: scrapes that find no
sentinel structure (Contraloría, ARCSA, INEVAL, EEQ, SRI, CENACE) raise or
skip caching; ANDA raises when the CSRF token is missing instead of
reporting "no microdata"; ArcGIS error bodies raise instead of caching an
empty list andlist_risk_eventsreturns the newest events first;
list_instituciones/search_regulacionesreporthay_maswhen the page
cap was reached;get_cepalstat_indicadorraises on an ambiguous partial
country name;search_ecuadorgives each source a 20 s deadline; ten tools
that caught onlyValueErrornow wrap transport errors in the same Spanish
ToolErroras the rest. Also: HTML entities are unescaped in Centrosur,
CENACE and Energía Ecuador titles; SERCOP and IG-EPN default the year in
Ecuador time; INEC sessions send the project User-Agent and category
pagination tolerates a page past the end;find_cantones/find_parroquias
match an all-digit filter against the zero-padded code (so"1"is Azuay,
not every province containing a 1) and two blank rows left
parroquias_urbanas.json;ecuador://fuenteslists only the tools
registered in the running profile. -
Smoke-run follow-ups:
get_regulacion_info/get_institucion_info
accept gob.ec's one-element list answer for a single id again (the stricter
lookup had turned regulation 5051 into "not found");list_catalogofor
bce_diariosno longer crashes on an indicator row without a date; the
smoke classifier treats a 5xx as "known degradation" only for the listed
hosts and a Supercías connect timeout (both hosts drop datacenter
connections) as a known geo-block instead of a failure. -
Supercías financials build: retries the final
os.replacefor up to
ten seconds when a Windows reader holds the database open instead of
discarding the build; caps each export file at 1 GB, checks for 2 GB of free
space first and removes partial CSVs on failure.sgrevent locks and
bce_clientrevision observations are bounded. -
Server and packaging: every tool is annotated
-> CallToolResult, so
tools/list no longer advertises an empty{"type": "object"}output schema
(structured content unchanged); the compose healthcheck follows
MCP_SSL_CERTFILE; the Docker image pinsuv; the standalone scripts import
helpersfrom any working directory; Python 3.14 added to the classifiers;
.mcpbignoredropsweb/,glama.json,server.json,.env.exampleand
quality_reports/from the MCPB bundle; tests refresh module-level asyncio
locks per test. -
CI: every workflow declares
permissions: contents: readat the top
(publishing jobs keep their ownid-token/contents: write); third-party
actions are pinned to commit SHAs (Dependabot keeps them current); the
pypiandmcp-registryjobs run only on a published release, so
workflow_dispatchbuilds and tests without publishing;mcp-publisherand
@anthropic-ai/mcpbare pinned and themcp-publishertarball is checked
against its release SHA-256; the smoke test's geo tunnel fails with a clear
message unlessGEO_SSH_KNOWN_HOSTSis set and always uses
StrictHostKeyChecking=yes. -
Docs: README's compose instructions set
MCP_AUTH_TOKEN(or copy
.env.example) first, sincedocker-compose.ymldefaults to
MCP_REQUIRE_AUTH=1and an empty token crash-looped the container;
docs/DEPLOYMENT.md gains the canonical environment-variable table covering
everything the code reads, README links to it and.env.examplelists the
same variables; CONTRIBUTING.md carries the project scope, layout, commands,
conventions and release steps (docs/ROADMAP.md and docs/RESEARCH.md cite it
instead of the gitignored AGENTS.md);docs/TOOLS.mdstates the real count
(83 public tools plus 2 maintenance tools) and lists
get_certificado_cumplimiento_patronal; the server instructions mention the
explorar_temaprompt; the SRI RUC tool argument docs are in English. -
Site: the Atlas renders with Jinja2 autoescape on; Spanish copy uses the
masculine "tool" and Spanish number formatting, English copy American
spelling and translated institution names; Google Fonts load through
<link>; canonical, hreflang andog:urltags; skip link, labelled search
input and visible search focus ring; smooth scrolling respects
prefers-reduced-motion; the sitemap no longer carries a build-time
<lastmod>;web/README.mddescribes the real Pages setup (gh-pages
branch) and CSS sources.