Skip to main content
Glama

Exporta las estadísticas en CSV

export_stats
Read-onlyIdempotent

Exporta las estadísticas en CSV. El mismo CSV que «Exportar» del panel (KPIs, serie diaria y desgloses), dentro de data.csv.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "site_id": "<site_id>"
    },
    "name": "export_stats"
  }
}

Input Schema

NameRequiredDescriptionDefault
osNoSistema operativo.
toNoÚltimo día (YYYY-MM-DD, inclusivo). Sin `period` implica `period=custom`; con otro periodo es 400.
cityNoCiudad (nombre en inglés).
fromNoPrimer día (YYYY-MM-DD, inclusivo). Sin `period` implica `period=custom`; con otro periodo es 400.
pageNoSolo vistas de esa ruta (por ejemplo `/precios`).
zoneNoSolo las visitas de una zona de ciudades de la web (id de zona, el `value` de `breakdown?dimension=zones`). Una zona desconocida da un resultado vacío.
entryNoSolo visitas cuya página de entrada es esa ruta.
eventNoSolo ese evento personalizado (no puede empezar por `_`).
metroNoSolo las visitas de un área metropolitana del catálogo global (`cbsa-<n>` o `fua-<n>`, el `value` de `breakdown?dimension=metros`). Un área desconocida da un resultado vacío.
deviceNo`desktop`, `mobile`, `tablet` u `other`.
periodNoPeriodo, en días naturales de la zona horaria de la web. Con `custom` hay que enviar `from` y `to`.30d
regionNoRegión (nombre en inglés).
sourceNoFuente de tráfico (`google`, `newsletter`...).
browserNoNavegador.
compareNoCon `1` añade el periodo anterior de la misma duración.0
countryNoPaís (código ISO 3166-1 alfa-2).
site_idYesId de la web (campo `id` de `/v1/sites`).
utm_mediumNoValor de utm_medium.
utm_sourceNoValor de utm_source.
utm_campaignNoValor de utm_campaign.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so safety behavior is covered. The description adds useful context about CSV contents and the `data.csv` filename, but does not explain how the CSV is delivered, whether there are size or rate limits, or what authorization is required.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences, front-loaded with the export action and format, then the contents and filename. There is no redundant or filler wording.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

This is a relatively complex tool with 20 parameters and no output schema. The description explains what the CSV contains and its filename, but it leaves the return mechanism ambiguous and does not summarize the filtering dimensions that the many parameters provide.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the 20 input parameters are already well documented in the schema. The description adds no parameter-level meaning or filtering guidance, which is acceptable at baseline but not above it.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states a specific verb and resource: exporting statistics as CSV, including what the CSV contains (KPIs, daily series, breakdowns) and its filename. It distinguishes the CSV export from JSON-oriented stats siblings only implicitly through the format, without naming any sibling.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase about being the same CSV as the panel's «Exportar» implies when to use it, but there is no explicit guidance on when to choose this over get_stats_overview, get_stats_breakdown, or get_stats_timeseries, nor any when-not-to-use conditions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources