Skip to main content
Glama
product-analytics-synthetic-population

product-analytics-synthetic-population

perguntar_populacao

Ask an LLM-voiced synthetic population how each behavioral segment would react to a question or scenario, with optional closed answer options, per-segment sample size, and cost returned.

Instructions

Dá voz aos gêmeos estatísticos: um LLM responde no lugar de alguns gêmeos de cada segmento.

populacao: o populacao_sintetica.csv gravado por gerar_populacao. contexto: a situação (ex.: "a página de produto passa a mostrar frete grátis acima de R$ 150"). opcoes: respostas fechadas (ex.: ["usaria", "talvez", "não usaria"]); sem opções, a resposta é livre. gemeos_por_segmento: 1 a 20 (padrão 5). Roda na API key da Anthropic de quem usa: se não houver, a ferramenta devolve um link local para colar a chave (nunca peça a chave no chat). Custa centavos por pergunta; o resultado vem com o custo e um aviso: a reação vem do LLM e não foi validada contra pessoas reais.

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": {
      "populacao": "<populacao>",
      "pergunta": "<pergunta>"
    },
    "name": "perguntar_populacao"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeloNoclaude-opus-5-5
opcoesNo
contextoNo
perguntaYes
populacaoYes
segmentosNo
gemeos_por_segmentoNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does substantial work: it discloses that the call runs on the caller's own Anthropic API key, that a missing key yields a local link to paste one (and that the key must never be requested in chat), that each question costs cents, and that results include cost plus an explicit 'LLM-generated, not validated against real people' disclaimer. Not covered are latency, rate limits, or what a partial/segment-level failure looks like.

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 concept lands in the first line, parameter notes follow in compact labelled fragments, and operational caveats (key, cost, disclaimer) close it out. The prose is dense but every sentence carries information; only the mid-sentence parenthetical about asking for the key breaks the otherwise clean front-loading.

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?

For a 7-parameter, no-annotation, no-output-schema tool, the description covers authentication, cost, and the epistemic caveat well, which are the highest-risk facts. It is incomplete on the `segmentos` filter, the `modelo` selection, and the actual shape of the returned answers beyond 'comes with cost and a warning'.

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 coverage is 0% across 7 parameters, so the description must compensate and it only partly does. It explains `populacao`, `contexto`, `opcoes` (with an example) and `gemeos_por_segmento` (range 1-20, default 5), but leaves `segmentos` and `modelo` entirely undefined despite both being meaningful controls, and `pergunta` — a required field — is only mentioned obliquely via 'custa centavos por pergunta'.

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 concrete verb and mechanism: an LLM answers survey-style questions in the place of statistical twins drawn from a synthetic population. It also ties `populacao` back to `gerar_populacao`, which separates it from the generation sibling. It stops short of explicitly contrasting itself with the export/inspection siblings, but the function is unmistakable.

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?

Usage is implied rather than prescribed: `populacao` must be the CSV produced by `gerar_populacao`, establishing a workflow prerequisite. There is no explicit 'use this when X, use sibling Y when Z', and no guidance on when a free-form vs. closed question is appropriate beyond the `opcoes` mechanics.

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