Electricity market (Coordinador Eléctrico)
Marginal cost per bus, real and daily generation, demand, power plants, lines and transmission limits of Chile's national grid.
get_chile_electricity_market
Use it over MCP
- Connect the server
https://mcp.betterllama.com/mcpin your client (setup per client). - Ask your agent, for example:
- «Yesterday's marginal cost at the Quillota 220 bus»
- «Real generation of solar plants yesterday»
- Or call the tool
get_chile_electricity_marketwith these arguments:
{
"dataset": "costo_marginal_online",
"maxItems": 24
}No. During the beta a Better Llama credential is used. Its quota is 60 queries per hour, so the server limits it to one call per minute and caches answers for an hour. If you need more, create your free credential at portal.api.coordinador.cl and send it in the X-CEN-Key header. Optional header: X-CEN-Key.
Beta: free and with no sign-up while we test the service.
Direct HTTP call (JSON-RPC)
Without an MCP client, POST to the same server:
curl -s https://mcp.betterllama.com/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "get_chile_electricity_market", "arguments": {"dataset": "costo_marginal_online", "maxItems": 24}}}'import json, requests
# Call a Better Llama MCP tool over HTTP (JSON-RPC)
URL = "https://mcp.betterllama.com/mcp"
HEADERS = {"Accept": "application/json, text/event-stream"}
def call(tool, arguments):
body = {"jsonrpc": "2.0", "id": 1, "method": "tools/call",
"params": {"name": tool, "arguments": arguments}}
r = requests.post(URL, json=body, headers=HEADERS, timeout=120)
r.raise_for_status()
result = r.json()["result"]
data = json.loads(result["content"][0]["text"])
if result.get("isError"):
raise RuntimeError(data["error"])
return data
data = call("get_chile_electricity_market", {"dataset": "costo_marginal_online", "maxItems": 24})
for row in data["results"]:
print(row)
print(data["attribution"])The answer text is JSON with results, count, warnings, attribution and source.
Example response
Real results returned by the source (2026-11-18), shortened:
{
"results": [
{
"dataset": "demanda_neta",
"datasetTitle": "Demanda neta horaria del sistema",
"date": "2026-11-16",
"localDateTime": "2026-11-16 00:00",
"dateTimeUtc": "2026-11-16T03:00:00.000Z",
"hour": 1,
"name": "Sistema Eléctrico Nacional",
"value": 4282.6227,
"unit": "MWh",
"grossGenerationMwh": 9130.5779,
"variableRenewableMwh": 2836.9648,
"ownConsumptionMwh": 2010.9904,
"ownConsumptionPct": 31.9529,
"retrievedAt": "2026-11-18T13:21:24.488Z"
},
{
"dataset": "demanda_neta",
"datasetTitle": "Demanda neta horaria del sistema",
"date": "2026-11-16",
"localDateTime": "2026-11-16 01:00",
"dateTimeUtc": "2026-11-16T04:00:00.000Z",
"hour": 2,
"name": "Sistema Eléctrico Nacional",
"value": 3896.0839,
"unit": "MWh",
"grossGenerationMwh": 8713.6739,
"variableRenewableMwh": 2934.9214,
"ownConsumptionMwh": 1882.6686,
"ownConsumptionPct": 32.5792,
"retrievedAt": "2026-11-18T13:21:24.488Z"
}
],
"attribution": "Fuente: Coordinador Eléctrico Nacional, Sistema de Información Pública — https://www.coordinador.cl"
}Parameters
| Argument | Description | Type |
|---|---|---|
dataset | Dataset — What to query in the Public Information System (SIP). Values: costo_marginal_online, costo_marginal_real, generacion_real, generacion_diaria, demanda_neta, demanda_real_estimada, centrales, lineas_transmision, limitaciones_transmision, instrucciones_sscc, energia_no_suministrada; Default: "costo_marginal_online" | string |
startDate | Start date — YYYY-MM-DD. Default: yesterday (Chile time). Does not apply to the power plant and line catalogs. | string |
endDate | End date — YYYY-MM-DD (inclusive). Defaults to startDate. Max. 31 days per call. | string |
filter | Text filter — Optional. Text (case-insensitive) that must appear in the name: bus for marginal costs (e.g. «crucero 220», «QUILLOTA»), plant or technology for generation, facility or company for limitations. Applied after downloading each page (the API does not filter by bus). | string |
maxItems | Maximum number of results to return (1-500). Default 50. Default: 50; Max: 500 | integer |
Source and attribution
Fuente: Coordinador Eléctrico Nacional, Sistema de Información Pública — https://www.coordinador.cl Source site: portal.api.coordinador.cl.
FAQ
Which grid data does it return?
National Electric System data from the Coordinador Eléctrico Nacional SIP API: marginal cost per bus (preliminary every 15 minutes and final), real generation per plant, daily generation by technology, demand, plant and line catalogs, transmission limitations, ancillary-service instructions and unserved energy.
Do I need an API key?
No. During the beta a Better Llama credential is used. Its quota is 60 queries per hour, so the server limits it to one call per minute and caches answers for an hour. If you need more, create your free credential at portal.api.coordinador.cl and send it in the X-CEN-Key header.
Which dates can I query?
startDate and endDate as YYYY-MM-DD in Chile time, up to 31 days per call; yesterday by default. Final marginal cost is published weeks later, so use costo_marginal_online for recent days. One day of marginal cost is about 145,000 rows: use filter (for example one bus) and maxItems.
How much does it cost?
Free during the beta, with no sign-up and a limit of 60 requests per minute per IP. If paid plans come later, we will announce them on betterllama.com first.