Skip to main content
Glama

compare_groups

Compare a variable across groups defined by another variable in the ESRU-EMOVI survey. Compute mean, median, or distribution for each group.

Instructions

Compare a variable across groups defined by another variable.

Args: variable: The variable to compare (e.g., 'ingc_pc', 'educ'). group_var: The grouping variable (e.g., 'sexo', 'region', 'cohorte'). metric: Which metric to compute: 'mean', 'median', or 'distribution'. filter: Optional filter expression. dataset: Which dataset to use (default: entrevistado).

Returns a comparison table showing the metric for each group.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
variableYes
group_varYes
metricNomean
filterNo
datasetNoentrevistado

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations are provided, so the description must bear the burden of behavioral disclosure. It describes the return as a 'comparison table' but does not explicitly state that the tool is read-only or what side effects (if any) occur. The parameter explanations imply a query operation, but more explicit statements about behavior would increase transparency.

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?

The description is a well-structured docstring with Args and Returns sections. It is concise—each sentence adds value. The main purpose is stated in the first line, and parameter details follow logically. No unnecessary words.

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

Completeness4/5

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

Given the tool's complexity (5 parameters, 2 required) and the existence of an output schema, the description covers all parameters and the return type. It provides examples for variable names and defaults for metric and dataset. However, it lacks details on edge cases (e.g., what happens if variable is not found) and does not mention error conditions.

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

Parameters4/5

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

Schema description coverage is 0%, so the description must add meaning. It explains each parameter: ‘variable’ and ‘group_var’ are variable names (with examples), ‘metric’ choices ('mean', 'median', 'distribution'), ‘filter’ as an optional expression, and ‘dataset’ with a default. This adds significant context beyond the schema's minimal titles and types.

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

Purpose5/5

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

The description clearly states the tool's purpose: 'Compare a variable across groups defined by another variable.' The verb 'compare' and the resource 'variable across groups' are specific. The description distinguishes from sibling tools by its focus on comparison across groups, which is not explicitly covered in siblings like tabulate or list_variables.

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

Usage Guidelines2/5

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

The description provides no explicit guidance on when to use this tool versus alternatives (e.g., tabulate, income_comparison). It does not mention when not to use it or what prerequisites are needed. The user must infer usage from the tool name and parameters.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Lalitronico/emovi-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server