Skip to main content
Glama

Métricas da campanha

campaign_metrics
Read-only

Série temporal de uma campanha entre "de" e "ate": cliques, cliques_entrada, entradas, saídas, permanência (entradas − saídas acumulado) e churn (saídas/entradas) por dia (até 93 dias) ou por hora (até 7 dias). "cliques" soma o clique em oferta de quem já está no canal ou grupo: nunca divida entradas por ele. A conversão do link é totais.taxa_entrada (entradas/cliques_entrada; null sem clique ou com mais entradas que cliques). Use para gráficos, comparação de períodos e perguntas como "quantas pessoas entraram ontem?".

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": {
      "id_ou_slug": "<id_ou_slug>",
      "de": "<de>",
      "ate": "<ate>"
    },
    "name": "campaign_metrics"
  }
}

Input Schema

NameRequiredDescriptionDefault
deYesInício do período. Data ISO (AAAA-MM-DD ou com hora e fuso) ou epoch em segundos.
ateYesFim do período. Data ISO (AAAA-MM-DD ou com hora e fuso) ou epoch em segundos.
id_ou_slugYesID da campanha (cmp_…) ou o slug do link personalizado.
granularidadeNo"dia" (padrão; até 93 dias) ou "hora" (até 7 dias).dia

Output Schema

NameRequiredDescriptionDefault
deNoISO 8601 com o fuso de Brasília (-03:00).
ateNoISO 8601 com o fuso de Brasília (-03:00).
serieNoUm ponto por dia ou hora (periodo em UTC).
totaisNo
successNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare this a safe, closed-world read, so the description's job is to add operational context; it does so by disclosing the granularity windows (93 days daily, 7 days hourly) and the null behavior of totais.taxa_entrada. The metric semantics (permanência as cumulative entradas minus saídas, churn as saídas/entradas) further clarify what the numbers mean. It does not discuss pagination or payload size, which a time series can hit.

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

Conciseness4/5

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

The core purpose and metric list are front-loaded in the first sentence, and later sentences add computation rules and use cases rather than filler. It is dense and slightly run-on, but nearly every clause carries actionable content.

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

Completeness5/5

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

With an output schema present, the description need not explain return shape, yet it still defines each metric's derivation and the null case, which is exactly the context needed to interpret results. Combined with required-parameter coverage and the granularity windows, an agent can call this correctly without further lookup.

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 schema already documents de, ate, id_ou_slug and granularidade; the description's granularity limits largely restate the enum descriptions. What it adds is metric-level meaning and the warning about dividing by 'cliques', which is interpretation guidance rather than parameter semantics. Baseline 3 is appropriate.

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 states a specific verb and resource ('Série temporal de uma campanha') and enumerates exactly which metrics come back (cliques, cliques_entrada, entradas, saídas, permanência, churn), so an agent knows precisely what the tool returns. It never names which sibling to use instead, leaving it to the reader to infer the boundary with tools such as get_campaign or activity_stats.

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

Usage Guidelines4/5

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

It gives clear positive guidance: use for charts, period comparisons and questions like 'quantas pessoas entraram ontem?'. It also carries a hard usage caveat ('nunca divida entradas por ele' for 'cliques'), which steers correct downstream computation. It stops short of naming alternatives or stating when not to use it.

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