Saltar al contenido

Referencia de tools

Energética expone 14 herramientas. Arrancá con describe_data: en una llamada trae las tablas, sus períodos, la herramienta que conviene para cada una, advertencias y el último mes completo de producción. Esta referencia se genera del registro de herramientas del servidor, así que siempre coincide con lo que publica.

Todas responden igual: un texto con una línea de meta, las unidades, notas y las filas en CSV, y structuredContent con columns (con su unidad), rows y meta (returned, truncated, max_rows, sources, sql, definitions, notes); las fichas suman sections. Todas aceptan max_rows (default 200, con techo según el tier).

Los filtros de entidad (empresa, area_concesion, yacimiento, formacion, cuenca, provincia) toman el nombre exacto; uno parecido se resuelve y lo dice en meta.notes, y uno ambiguo falla con unknown_entity y los candidatos. Varios nombres se combinan con |.

describe_data

Data catalog. Start here. Every table and view: description, period, rows, tool to use, warnings, and the last complete production month. With tablas, also their columns. Example: {tablas: ['pozos']}.

ParámetroTipoNotas
tablasstring[]Tables or views whose columns you need

resolve_entity

Find companies, areas, fields and wells. Free text → exact names for filters (companies, areas, fields, formations, basins, provinces, wells), with context and last month with production. Example: {texto: 'palmar', tipo: 'yacimiento'}.

ParámetroTipoNotas
textostringRequired. Name or part of it
tipoenumValues: empresa | area | yacimiento | formacion | cuenca | provincia | pozo

query_production

Monthly hydrocarbon production. Oil, gas and water production (2006–present) by entity and period, grouped by up to 3 dimensions: volumes, BOE, producing/reporting wells, daily rate, GOR, water cut. Example: {area_concesion: "LOMA CAMPANA", fecha_desde: "2025", agrupar_por: ["anio"]}.

ParámetroTipoNotas
cuencastring
provinciastring
empresastring
area_concesionstring
yacimientostring
formacionstring
tipo_recursoenumValues: CONVENCIONAL | NO CONVENCIONAL | SIN RESERVORIO | NO DISCRIMINADO
subtipo_recursoenumValues: SHALE | TIGHT
tipo_pozostringe.g. Petrolífero, Gasífero
idpozonumber[]
fecha_desdestring
fecha_hastastringInclusive
agrupar_porenum[]Up to 3 dimensions; default [mes] Values: mes | anio | empresa | cuenca | provincia | area_concesion | yacimiento | formacion | tipo_recurso | subtipo_recurso | tipo_pozo | idpozo
metricasenum[]Default petroleo, gas, agua (+ pozos_productores by mes); caudal_diario = volume / calendar days Values: petroleo | gas | agua | boe | gor | water_cut | pozos_productores | pozos_informantes | caudal_diario

query_wells

Wells search. Wells in the registry (~86,000): location, type, current status and operator, cumulative production, first and last month with production, IP30. Example: {provincia: 'Neuquén', subtipo_recurso: 'SHALE', tipo_estado: 'activos'}.

ParámetroTipoNotas
empresastring
cuencastring
provinciastring
area_concesionstring
yacimientostring
formacionstring
tipo_recursoenumValues: CONVENCIONAL | NO CONVENCIONAL | SIN RESERVORIO | NO DISCRIMINADO
subtipo_recursoenumValues: SHALE | TIGHT
tipo_pozostringe.g. Petrolífero, Gasífero
tipo_estadostringExact registry status (e.g. Abandonado, Parado Transitoriamente) or 'activos'
con_produccionboolean
primera_produccion_desdestringFirst month with oil or gas > 0 (or the registry fecha_primera_prod with segun_padron)
primera_produccion_hastastring
segun_padronboolean
ordenenumValues: acumulado | ip30 | primera_produccion

get_well

Well profile. One well by idpozo or sigla: registry data, IP30/90/180, cumulative volumes, recent GOR and water cut, last 36 months of production, fracture jobs and trajectory. Example: {sigla: 'YPF.Nq.LCa-1001(h)'}.

ParámetroTipoNotas
idpozonumber
siglastringWell code; close codes are resolved

get_area

Concession area profile. One concession area: 12-month production and year-on-year change, operators and shares, wells by type and state, top wells and the last 24 months. Example: {area_concesion: 'LOMA CAMPANA'}.

ParámetroTipoNotas
area_concesionstringRequired. Area name; close names are resolved

get_company

Company profile. One operator: 12-month production, national share, year-on-year change, areas, basins, wells, investments, reserves and, if listed, share price and SEC financials. Example: {empresa: 'VISTA ENERGY ARGENTINA SAU'}.

ParámetroTipoNotas
empresastringRequired. Company name; close names are resolved

rank_entities

Rankings. Top N wells, areas, companies, fields, basins or formations by production, BOE, GOR, water cut, growth, new wells or IP30/90/180 (raw, per meter, per stage). Example: {entidad: 'pozo', metrica: 'ip30', subtipo_recurso: 'SHALE', tipo_pozo: 'Petrolífero', fecha_desde: '2025', fecha_hasta: '2025'}.

ParámetroTipoNotas
entidadenumRequired. Values: pozo | area | empresa | yacimiento | cuenca | formacion
metricaenumRequired. ip*: wells of a first-production cohort (or their average per entity); others over the period Values: ip30 | ip90 | ip180 | ip30_por_metro | ip30_por_etapa | petroleo | gas | agua | boe | gor | water_cut | crecimiento_interanual | pozos_nuevos
cuencastring
provinciastring
empresastring
area_concesionstring
yacimientostring
formacionstring
subtipo_recursoenumValues: SHALE | TIGHT
tipo_pozostringe.g. Petrolífero, Gasífero
fecha_desdestringDefault: 12 months to fecha_hasta
fecha_hastastringInclusive; default the last complete month
nintegerDefault 10
ordenenumValues: desc | asc

query_completions

Fracture jobs (completions). Fracture jobs by year, company (the one that reported the job), area, formation or well: wells, stages, stages per well, lateral length, proppant, water. Example: {formacion: 'vaca muerta', fecha_desde: '2025', agrupar_por: ['empresa']}.

ParámetroTipoNotas
empresastring
area_concesionstring
formacionstring
cuencastring
subtipo_reservorioenumValues: SHALE | TIGHT
fecha_desdestringCompletion (end of fracture) from
fecha_hastastring
agrupar_porenum[]Default anio Values: anio | empresa | area_concesion | formacion | subtipo_reservorio | idpozo

query_reserves

Hydrocarbon reserves. P1/P2/P3 oil and gas reserves at Dec 31 by year, basin, company and resource type (end of useful life); oil and gas in separate columns. Default: latest year. Example: {anio: [2024], agrupar_por: ['cuenca'], categorias: ['P1']}.

ParámetroTipoNotas
aniointeger[]Years; default the latest
cuencastring
empresastring
tipo_recursoenumValues: CONVENCIONAL | NO CONVENCIONAL | SIN RESERVORIO | NO DISCRIMINADO
categoriasenum[]Default P1, P2, P3 Values: P1 | P2 | P3
agrupar_porenum[]Default anio Values: anio | cuenca | empresa | tipo_recurso

query_investments

Upstream investments. Upstream oil & gas investments in Argentina by company, basin, year and concept, in millions of USD (drilling, workovers, pipelines, facilities, seismic…). Example: {cuenca: 'NEUQUINA', anio_desde: 2023, concepto: 'perforacion'}.

ParámetroTipoNotas
empresastring
cuencastring
anio_desdenumberYear of the sworn statement (DDJJ)
anio_hastanumber
conceptostringInvestment concept, partial match ignoring accents (e.g. 'perforacion', 'reparacion de pozos', 'gasoductos', 'sismica')

query_prices

Energy prices and exchange rates. International and local energy prices: WTI, Brent, Henry Hub (daily, USD), Argentine crude price used for royalties by province (monthly, USD/bbl) and ARS/USD exchange rates (daily). Most recent first. Example: {serie: 'BRENT', fecha_desde: '2024', frecuencia: 'mensual'}.

ParámetroTipoNotas
serieenumRequired. Values: WTI | BRENT | HENRY_HUB | CRUDO_LOCAL | USD_OFICIAL | USD_MAYORISTA | USD_BLUE | USD_MEP | USD_CCL
provinciaenumOnly CRUDO_LOCAL; omit for every province Values: NEUQUEN | CHUBUT | MENDOZA | SANTA CRUZ | SALTA | RIO NEGRO | LA PAMPA | TIERRA DEL FUEGO | FORMOSA | JUJUY | ESTADO NACIONAL
fecha_desdestring
fecha_hastastringInclusive
frecuenciaenumAverage; CRUDO_LOCAL is monthly Values: diario | mensual | anual

query_trade

Hydrocarbon trade balance. Argentina hydrocarbon exports and imports by month: crude oil (HS 2709), refined products (HS 2710) and natural gas (HS 2711), FOB USD and kg. Example: {anio: 2025, flow: 'export', producto: 'crude'}.

ParámetroTipoNotas
anionumber
flowenumTrade flow direction Values: export | import
productoenumProduct category Values: crude | refined | gas

SQL abierto

execute_sql

Abierto durante la beta, con un límite de 200 consultas por día por IP. Run read-only DuckDB SQL (a single SELECT or WITH) over the catalog tables and views. Prefer the curated tools when they fit; call describe_data first for tables and columns. Column names and values are in Spanish. Example: {sql: "SELECT anio, SUM(prod_petroleo_m3) FROM agg_produccion_mensual WHERE formacion = 'vaca muerta' GROUP BY 1 ORDER BY 1"}.

  • Una sola sentencia SELECT (con o sin WITH): rechaza DDL/DML y cualquier otra sentencia
  • Sin funciones de tabla ni acceso a archivos, red o extensiones (read_csv, http_get, ATTACH, COPY…)
  • Restringido a las tablas y vistas del catálogo, en cualquier lugar de la consulta
  • Timeout de 30 segundos por query (se interrumpe de verdad)
  • Devuelve hasta max_rows filas y avisa si recortó

Respuestas de error

Los errores devuelven isError: true y, en structuredContent.error, un code, un mensaje y una pista para corregir:

  • invalid_argument — un valor que no existe (con los válidos) o una combinación sin sentido.
  • unknown_entity — un nombre ambiguo o inexistente, con los candidatos.
  • unknown_table / unknown_column — con sugerencias del catálogo («¿quisiste decir…?»).
  • system_catalog — sqlite_master, PRAGMA, DESCRIBE: usá describe_data.
  • sql_error — el mensaje de DuckDB, saneado.
  • timeout / too_heavy — la consulta excedió los 30 s o la memoria: filtrá o agregá.
  • busy / unavailable — la base está ocupada o no disponible: reintentá en retry_after_s.
  • Rate limit — excedido el cupo diario por IP (200/día curadas, 200/día execute_sql).

Retiradas en el contrato 3.0.0: get_schema y get_data_freshness (las reemplaza describe_data).