emovi-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@emovi-mcp¿Cuál es la distribución educativa por sexo?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
emovi-mcp
Servidor MCP para la encuesta ESRU-EMOVI 2023 de movilidad social en México.
MCP server for the ESRU-EMOVI 2023 social mobility survey (Mexico).
¿Qué es esto?
emovi-mcp permite que asistentes de IA (Claude, ChatGPT, etc.) consulten la encuesta de movilidad social más completa de México mediante lenguaje natural. Expone cómputos estadísticos ponderados, matrices de transición intergeneracional y exploración de variables como herramientas MCP.
Related MCP server: MoSPI MCP Server
Sobre la ESRU-EMOVI 2023
La encuesta ESRU-EMOVI 2023, levantada por el Centro de Estudios Espinosa Yglesias (CEEY), es representativa a nivel nacional sobre movilidad social en México. Cubre 17,843 entrevistados de 25 a 64 años, con factores de expansión que representan ~60 millones de personas.
Bases de datos incluidas:
Base de datos | Descripción | Registros | Variables |
| Datos del entrevistado principal | 17,843 | ~296 |
| Roster del hogar | 55,477 | ~56 |
| Ingreso imputado 2017 (comparación temporal) | 17,665 | ~2 |
| Módulo de inclusión financiera | 5,976 | ~109 |
Instalación
# Clonar el repositorio
git clone https://github.com/Lalitronico/emovi-mcp.git
cd emovi-mcp
# Crear entorno virtual
python -m venv .venv
source .venv/bin/activate # Linux/Mac
.venv\Scripts\activate # Windows
# Instalar en modo editable con dependencias de desarrollo
pip install -e ".[dev]"
# Opcional: soporte de visualización
pip install -e ".[dev,viz]"O instalar directamente desde PyPI:
pip install emovi-mcp
# Con soporte de visualización
pip install emovi-mcp[viz]Prerrequisitos
Python >= 3.10
Archivos .dta de la ESRU-EMOVI 2023 (obtener del CEEY)
Configuración
Establecer la variable de entorno EMOVI_DATA_DIR apuntando al directorio con los archivos .dta:
# Linux/Mac
export EMOVI_DATA_DIR="/ruta/a/Esru Emovi 2023/_extracted/3 BASES DE DATOS/Data"
# Windows (PowerShell)
$env:EMOVI_DATA_DIR = "C:\ruta\a\Esru Emovi 2023\_extracted\3 BASES DE DATOS\Data"
# Windows (cmd)
set EMOVI_DATA_DIR=C:\ruta\a\Esru Emovi 2023\_extracted\3 BASES DE DATOS\DataUso con Claude Desktop
Agregar lo siguiente al archivo claude_desktop_config.json:
Windows: %APPDATA%\Claude\claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"emovi-mcp": {
"command": "C:/ruta/a/emovi-mcp/.venv/Scripts/python.exe",
"args": ["-m", "emovi_mcp"],
"env": {
"EMOVI_DATA_DIR": "C:/ruta/a/3 BASES DE DATOS/Data"
}
}
}
}En macOS/Linux, reemplazar Scripts/python.exe por bin/python.
Herramientas
El servidor expone 11 herramientas MCP:
Herramienta | Descripción |
| Panorama de la encuesta: bases de datos, tamaño muestral, diseño, dimensiones |
| Explorar variables por base, sección o palabra clave |
| Información completa de una variable: etiqueta, valores, sección, base |
| Tabulación cruzada ponderada (fila x columna con factores de expansión) |
| Matriz de movilidad intergeneracional con índices formales (Shorrocks, Prais, razón de momios) y errores estándar opcionales vía linealización de Taylor |
| Estadísticas descriptivas: media, mediana, desviación estándar, cuantiles (ponderados) |
| Comparar una variable entre grupos (media, mediana o distribución) |
| Extraer registros con filtros opcionales (máximo 100 filas) |
| Análisis de inclusión financiera: ahorro, crédito, banca, alfabetización, discriminación |
| Comparación temporal de ingreso 2017 vs 2023 con clasificación por línea de pobreza |
| Generar heatmaps, diagramas Sankey o gráficas de barras para matrices de movilidad (requiere |
Ejemplos de consultas
Una vez conectado, puedes preguntar al asistente de IA cosas como:
"¿Cuál es la distribución educativa por sexo?" → Usa
tabulate(row_var="educ", col_var="sexo")"Muéstrame la matriz de movilidad educativa intergeneracional" → Usa
transition_matrix(dimension="education")"¿Cuál es el ingreso promedio por región?" → Usa
weighted_stats(variable="ingc_pc", by="region_14")"Compara la movilidad educativa entre hombres y mujeres" → Usa
transition_matrix(dimension="education", by="sexo")"¿Qué variables hay sobre educación?" → Usa
list_variables(search="educ")
Diccionario de variables
El proyecto incluye un diccionario preconstruido con 792 variables extraídas de la documentación oficial del CEEY y los metadatos de los archivos .dta. Soporta búsqueda por nombre, descripción, base de datos y sección.
Para reconstruir el diccionario desde los datos fuente:
python scripts/build_dictionary.pyEsto requiere el archivo Diccionario ESRU EMOVI 2023.xlsx en el directorio de datos.
Ejecutar pruebas
pytestLas 96 pruebas cubren estadísticas ponderadas, matrices de transición, índices de movilidad, errores estándar por linealización de Taylor, inclusión financiera, comparación temporal de ingreso, visualización y funcionalidad del diccionario de variables, todo con datos sintéticos (no se requieren microdatos reales).
Notas técnicas
Todas las estadísticas son ponderadas usando la variable de expansión
factor(ofac_incpara el módulo de inclusión financiera)pyreadstat carga los .dta con
apply_value_formats=Falsepara evitar crashes por etiquetas duplicadas de municipiospadres_eduse construye comomax(educp, educm)siguiendo la metodología del .do del CEEYÍndice de riqueza usa PCA sobre indicadores binarios de activos del hogar (Filmer & Pritchett, 2001), como alternativa al enfoque MCA del CEEY
Errores estándar usan linealización de Taylor para estimadores de razón bajo muestreo estratificado por conglomerados (UPM/estrato)
Índices de movilidad: Shorrocks M, probabilidad de escape de Prais, correlación intergeneracional de Pearson r, razón de momios de esquina
Transporte STDIO: El servidor se comunica por entrada/salida estándar, compatible con Claude Desktop y otros clientes MCP
Estructura del proyecto
emovi-mcp/
├── pyproject.toml
├── README.md
├── LICENSE
├── CONTRIBUTING.md
├── .github/workflows/
│ ├── ci.yml # CI: pytest en Python 3.10/3.11/3.12
│ └── publish.yml # Publicar en PyPI al crear release
├── scripts/
│ └── build_dictionary.py # Constructor del diccionario
├── src/emovi_mcp/
│ ├── __init__.py
│ ├── __main__.py # python -m emovi_mcp
│ ├── main.py # Punto de entrada del servidor FastMCP
│ ├── config.py # Entorno, mapeos, constantes
│ ├── data_loader.py # Cargador lazy de .dta con caché
│ ├── dictionary.py # Diccionario de variables (JSON)
│ ├── stats_engine.py # Matrices de transición, descriptivas
│ ├── data/
│ │ └── dictionary.json # 792 variables
│ ├── helpers/
│ │ ├── formatting.py # Formateadores Markdown para salida LLM
│ │ ├── labels.py # Resolución de etiquetas de valor
│ │ ├── mobility_indices.py # Shorrocks, Prais, razón de momios
│ │ ├── survey_variance.py # Linealización de Taylor para SE/CI
│ │ ├── validation.py # Validación de columnas y filtros
│ │ ├── visualization.py # Heatmaps, Sankey, gráficas de barras
│ │ └── weights.py # Media, mediana, cuantil, frecuencia ponderados
│ └── tools/
│ ├── __init__.py # Registro de herramientas (11 tools)
│ ├── compare.py # compare_groups
│ ├── describe.py # describe_survey
│ ├── financial.py # financial_inclusion_summary
│ ├── mobility.py # transition_matrix
│ ├── stats.py # weighted_stats
│ ├── subset.py # filter_data
│ ├── tabulate.py # tabulate
│ ├── temporal.py # income_comparison
│ ├── variables.py # list_variables, variable_detail
│ └── visualize.py # visualize_mobility
└── tests/
├── conftest.py # Fixtures compartidos (datos sintéticos)
├── test_dictionary.py
├── test_financial.py
├── test_mobility.py
├── test_mobility_indices.py
├── test_stats_engine.py
├── test_survey_variance.py
├── test_temporal.py
├── test_visualization.py
└── test_wealth_index.pyLicencia
MIT
Agradecimientos
Datos de la encuesta: Centro de Estudios Espinosa Yglesias (CEEY) — ESRU-EMOVI 2023.
Available Tools
11 toolscompare_groupsA
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.
| Name | Required | Description | Default |
|---|---|---|---|
| variable | Yes | ||
| group_var | Yes | ||
| metric | No | mean | |
| filter | No | ||
| dataset | No | entrevistado |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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.
describe_surveyA
Get an overview of the ESRU-EMOVI 2023 social mobility survey.
Returns information about available datasets, survey design, mobility dimensions, and key variables.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It correctly implies a read-only, non-destructive operation by stating it 'returns information'. It adds context beyond the input schema (which has no parameters) by describing the output content.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with the tool's purpose, and contains no extraneous information. Every sentence adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no parameters and a clear output description, the tool definition is complete. However, without seeing the output schema, we assume the description adequately covers what is returned. The complexity is low.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There are no parameters, so the baseline is 4. The description does not need to add param info; it sufficiently describes what the tool does without needing parameter details.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it provides an overview of a specific survey (ESRU-EMOVI 2023) and lists the types of information returned (datasets, design, dimensions, variables). This distinguishes it from sibling tools like list_variables and variable_detail, which are more specific.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use the tool (when an overview is needed) but does not explicitly state when not to use it or provide alternatives. It lacks explicit guidance on choosing this tool over siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
filter_dataA
Extract a subset of raw data for specific variables.
Args: variables: List of variable names to include (e.g., ["sexo", "educ", "ingc_pc"]). filter: Optional filter expression (e.g., "sexo == 2 and cohorte == 1"). limit: Maximum number of rows to return (default: 20, max: 100). dataset: Which dataset to use (default: entrevistado).
Returns a markdown table with the requested data. Use this to inspect raw values or extract data for custom analysis.
| Name | Required | Description | Default |
|---|---|---|---|
| variables | Yes | ||
| filter | No | ||
| limit | No | ||
| dataset | No | entrevistado |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It mentions returning a markdown table and specifies default and maximum limit, adding transparency. However, it does not disclose potential side effects, performance, or authentication requirements, which would enhance completeness.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise (under 100 words) and well-structured: a clear one-sentence purpose followed by parameter explanations. Every sentence adds value without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (4 parameters, output schema as markdown table) and lack of annotations, the description is complete. It covers all parameters, return format, usage context, and includes examples for filter expressions.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description compensates fully by explaining each parameter: variables (with example), filter (with example), limit (default and max), and dataset (default). It adds meaning beyond the schema's basic type and required status.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Extract a subset of raw data for specific variables,' specifying a precise verb and resource. It distinguishes itself from siblings like compare_groups or tabulate by focusing on raw data extraction.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly says 'Use this to inspect raw values or extract data for custom analysis,' providing clear context on when to use the tool. It does not list alternatives but implies its role without exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
financial_inclusion_summaryA
Analyze financial inclusion from the ESRU-EMOVI 2023 inclusion module.
Args: dimension: Financial inclusion dimension to analyze. - "savings": Formal and informal savings behavior - "credit": Access to credit and debt - "banking": Banking services and financial products - "literacy": Financial education and knowledge - "discrimination": Discrimination in financial services filter: Optional filter expression (e.g., "sexo == 1"). by: Optional grouping variable (e.g., "sexo", "entidad").
Returns markdown summary with weighted proportions for each variable in the selected dimension.
| Name | Required | Description | Default |
|---|---|---|---|
| dimension | No | banking | |
| filter | No | ||
| by | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It discloses that the tool returns 'markdown summary with weighted proportions for each variable in the selected dimension,' indicating a read-only, non-destructive operation. It does not mention potential side effects or auth needs, but the output format is clearly stated.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is mostly concise, front-loading the main purpose and adding parameter details efficiently. The list of dimensions is slightly lengthy but necessary for clarity. No superfluous content, but could be slightly more compact.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the output schema exists, the description appropriately explains the return format ('markdown summary with weighted proportions'). It covers all relevant aspects: source, parameters, and output, with no gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, but the description fully compensates by listing all dimension options with explanations and providing examples for filter and by parameters. This adds significant meaning beyond the bare schema, enabling correct invocation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Analyze financial inclusion from the ESRU-EMOVI 2023 inclusion module.' It provides a specific verb ('Analyze'), resource ('financial inclusion... module'), and scope, distinguishing it from siblings like weighted_stats or describe_survey which have broader or different focuses.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies use for financial inclusion analysis but does not explicitly state when to use this tool versus alternatives like weighted_stats or tabulate. It lacks guidance on exclusions or prerequisites, relying on the user to infer from the domain-specific dimensions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
income_comparisonA
Compare income between 2017 and 2023 for matched respondents.
Merges the 2017 income module with the 2023 respondent data on folio.
Args: metric: What to compute. - "change": Income change statistics (absolute and relative). - "poverty": Poverty transition rates using CEEY poverty lines. - "summary": Full summary with both income change and poverty. filter: Optional filter expression (e.g., "sexo == 1", "rururb == 1"). by: Optional grouping variable (e.g., "sexo", "rururb", "cohorte").
Returns markdown summary with weighted statistics on temporal income dynamics.
| Name | Required | Description | Default |
|---|---|---|---|
| metric | No | change | |
| filter | No | ||
| by | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It discloses that the tool merges 2017 income data with 2023 respondent data on folio, returns a markdown summary with weighted statistics, and explains the three metric options. This provides reasonable transparency though it omits potential side effects or permissions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured, starting with a clear purpose sentence followed by bulleted parameter details. It is concise yet informative, though slightly verbose in listing examples that could be shortened.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity and minimal schema, the description covers the core functionality, parameters, and output format. It mentions matched respondents and weighted statistics, but does not elaborate on prerequisites or exact output columns, which may be covered by the output schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description bears the load. It defines the three metric options (change, poverty, summary) with brief explanations and gives example filter and by expressions. This adds meaningful context beyond the schema, though the exact syntax for filter is not fully specified.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool compares income between 2017 and 2023 for matched respondents, using a specific verb and resource, and it distinguishes itself from sibling tools which focus on different analyses (e.g., compare_groups, transition_matrix).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains what the tool does and the parameters but lacks explicit guidance on when to use it versus alternatives, such as compare_groups or weighted_stats. No exclusion criteria or contextual comparison is provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_variablesA
List available variables in the survey.
Args: dataset: Which dataset to list variables from. Options: entrevistado, hogar, inclusion_financiera. section: Filter by questionnaire section (optional). search: Search term to filter by variable name or description (optional).
Returns a list of variables with their labels.
| Name | Required | Description | Default |
|---|---|---|---|
| dataset | No | entrevistado | |
| section | No | ||
| search | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must carry the burden. It only states it 'returns a list of variables with their labels' but does not disclose read-only nature, potential side effects, or any behavioral traits. This is insufficient for a 0-annotation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise with a clear first line stating purpose, followed by a structured Args section. Every sentence adds value, no fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has an output schema, so return details are not required. The description covers key aspects: purpose, parameters, and return type. However, it lacks usage context (e.g., when to choose this over 'variable_detail') making it slightly incomplete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0% but the description compensates by detailing the 'dataset' options ('entrevistado, hogar, inclusion_financiera') and explaining that 'section' and 'search' are optional filters. This adds meaning beyond the schema's type and default information.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'List available variables in the survey' with specific verb and resource. It distinguishes from siblings like 'variable_detail' which handles individual variables, and 'describe_survey' which is broader.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains what the tool does and lists arguments, but provides no guidance on when to use it versus alternatives or when not to use it. It does not give explicit context for selection among sibling tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
tabulateA
Compute a weighted crosstab between two variables.
Args: row_var: Variable for rows (e.g., 'educ', 'region'). col_var: Variable for columns (e.g., 'sexo', 'cohorte'). filter: Optional filter expression (e.g., "sexo == 1", "cohorte == 3"). normalize: How to normalize: 'row' (default), 'col', 'all', or 'none'. dataset: Which dataset to use (default: entrevistado).
Returns a markdown table with weighted proportions.
| Name | Required | Description | Default |
|---|---|---|---|
| row_var | Yes | ||
| col_var | Yes | ||
| filter | No | ||
| normalize | No | row | |
| dataset | No | entrevistado |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. It explains parameters, defaults, and return type, but does not mention side effects or weighting details (e.g., weights variable). Acceptable but not thoroughly transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise, well-structured with Args/Returns sections, and every sentence adds value. No unnecessary words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers all parameters, defaults, and the return format. Given the tool's analytical nature and presence of an output schema (table), it is sufficiently complete, though limited behavior on edge cases could be added.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0% (no descriptions in schema), but the description explains each parameter with examples and defaults, adding significant meaning beyond the bare schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states 'Compute a weighted crosstab between two variables' and notes it returns a markdown table with weighted proportions, providing a clear purpose. However, it does not differentiate from siblings like compare_groups or transition_matrix.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit when-to-use or when-not-to-use guidance is given. The description does not mention alternatives or context for choosing this tool over sibling tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
transition_matrixA
Compute an intergenerational mobility transition matrix.
This is the core analysis tool for social mobility research.
Args: dimension: Type of mobility to analyze. - "education": Educational mobility (4x4 matrix). Origin = max(father, mother) education; Destination = respondent education. - "occupation": Occupational class mobility. Origin = father's class; Destination = respondent's class. - "wealth": Wealth quintile mobility (5x5 matrix). Based on PCA wealth index from household assets (origin vs current). filter: Optional filter expression. Examples: "sexo == 2" (women only), "cohorte == 1" (ages 25-34), "region_14 == 5" (Southern region of origin). by: Optional grouping variable to produce separate matrices. Examples: "sexo" (by gender), "region_14" (by region of origin), "cohorte" (by age cohort). origin_category: Optional origin quintile/category to filter. Example: 1 for Q1 (poorest) in wealth, or 1 for "Primaria o menos" in education. Returns only the destination distribution for that origin. include_se: If True, compute Taylor-linearized standard errors and 95% confidence intervals for each matrix cell.
Returns markdown transition matrix with row percentages (origin -> destination), summary statistics, formal mobility indices, and optionally standard errors.
| Name | Required | Description | Default |
|---|---|---|---|
| dimension | No | education | |
| filter | No | ||
| by | No | ||
| origin_category | No | ||
| include_se | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must disclose behavior fully. It explains the tool computes a matrix, returns markdown with row percentages, summary statistics, and optionally standard errors. It does not mention side effects, but as a read-only computation this is acceptable. However, it could note that it does not modify data.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is structured with bullet points and a clear args list, but it is somewhat verbose. The first sentence is redundant with the title, and the docstring format includes parameter repeated from the schema. It could be trimmed without losing clarity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 5 parameters, 0% schema coverage, and no annotations, the description is thorough. It covers all parameters with examples, explains the output (markdown matrix with indices and standard errors), and mentions return values without relying on an output schema. This is sufficient for correct agent invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate, and it does excellently. For each parameter it provides detailed explanations and examples (e.g., dimensions with matrix sizes, filter strings, grouping variables). This adds immense value beyond the bare schema, which only lists names and types.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description explicitly states the tool computes an intergenerational mobility transition matrix, using specific verbs like 'compute' and 'analyze'. It also clarifies it is the 'core analysis tool for social mobility research', distinguishing it from sibling tools like 'visualize_mobility'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description positions the tool as the primary analysis tool for mobility research, providing clear examples for parameters like 'filter' and 'by'. However, it does not specify when not to use this tool versus alternatives like 'tabulate' or 'visualize_mobility', leaving some ambiguity.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
variable_detailA
Get detailed information about a specific variable.
Args: variable: The variable name (e.g., 'educ', 'ingc_pc', 'sexo').
Returns the variable label, value labels, dataset, and section.
| Name | Required | Description | Default |
|---|---|---|---|
| variable | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must convey behavioral traits. It does not mention that the tool is read-only, safe, or any side effects. The description only lists what is returned, omitting critical transparency details.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise with two sentences plus a parameter doc string. The main purpose is stated upfront, with no extraneous information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the existence of an output schema, the description adequately summarizes return fields (label, value labels, dataset, section). However, it lacks information on error handling or behavior when a variable is not found, which would enhance completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so the description must compensate. It explains the variable parameter with examples and implies string input. This adds significant meaning beyond the schema, though it could specify case sensitivity or exact matching.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it provides detailed information about a specific variable, using a verb ('get') and resource ('variable'). It gives examples of variable names, distinguishing it from siblings like list_variables which only lists names.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies use when needing details on a single variable but does not explicitly state when to use this tool over alternatives like list_variables. No 'when not to use' or exclusion criteria are provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
visualize_mobilityA
Generate a visualization of mobility transition matrix.
Args: dimension: Mobility dimension — "education", "occupation", or "wealth" chart_type: Type of chart — "heatmap", "sankey", or "prais_bar" filter: Optional filter expression (e.g., "sexo == 1") by: Optional grouping variable
| Name | Required | Description | Default |
|---|---|---|---|
| dimension | No | wealth | |
| chart_type | No | heatmap | |
| filter | No | ||
| by | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so the description carries full burden. It states it generates a visualization but does not disclose what form the output takes (e.g., image, interactive plot), side effects, or any behavioral details beyond generation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Extremely concise: one sentence for purpose, then a focused list for parameters. No redundant information, all sentences earn their place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the presence of an output schema (unseen) and simple parameters, the description is mostly complete. However, it could mention if a precomputed transition matrix is required or hint at output format.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, but the description compensates with clear explanations for each parameter, including allowed values for 'dimension' and 'chart_type' and optional nature of 'filter' and 'by'.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description starts with a clear verb and resource: 'Generate a visualization of mobility transition matrix.' It is specific and distinguishes from siblings like 'transition_matrix' which likely computes the matrix.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives like 'transition_matrix' or 'tabulate'. The description does not specify prerequisites or 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.
weighted_statsB
Compute weighted descriptive statistics for a variable.
Args: variable: The numeric variable to analyze (e.g., 'ingc_pc', 'educ'). filter: Optional filter expression (e.g., "sexo == 1"). by: Optional grouping variable (e.g., "region", "sexo", "cohorte"). dataset: Which dataset to use (default: entrevistado).
Returns weighted mean, median, std, percentiles (25th, 75th), min, max, and sample sizes. If 'by' is specified, returns stats per group.
| Name | Required | Description | Default |
|---|---|---|---|
| variable | Yes | ||
| filter | No | ||
| by | No | ||
| dataset | No | entrevistado |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It discloses the input parameters and return statistics but does not mention how missing data is handled, whether the variable must exist, any assumptions about weighting (e.g., survey weights), or performance implications. Behavioral details are minimal.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description uses a docstring format with 'Args:' and 'Returns' sections, which is structured but somewhat verbose. It frontloads the purpose, then lists parameters. Some redundancy exists as parameter details are already in the input schema. Could be more concise by removing the 'Args:' label.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers all parameters and return values, and an output schema exists for return details. However, it lacks discussion of edge cases (e.g., missing data, invalid variable), error handling, or details on how weights are applied. For a statistical tool with 4 parameters, it is adequate but not comprehensive.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It adds examples for 'variable' and 'by' and explains the default for 'dataset'. However, it does not specify valid values for 'filter' or 'dataset', nor the syntax for filter expressions. It adds moderate meaning beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states that the tool computes weighted descriptive statistics for a variable, listing specific statistics and grouping capability. It distinguishes itself from sibling tools like 'tabulate' or 'compare_groups' by focusing on weighted statistics with numpy-style functions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains when to use this tool (to compute weighted stats with optional filtering and grouping). However, it does not specify when NOT to use it or mention alternative tools (e.g., 'tabulate' for frequencies, 'compare_groups' for comparisons). No prerequisites or exclusions are provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
11 tool updates
v0.2.0- First observed
compare_groups - First observed
describe_survey - First observed
filter_data - First observed
financial_inclusion_summary - First observed
income_comparison - First observed
list_variables - First observed
tabulate - First observed
transition_matrix - First observed
variable_detail - First observed
visualize_mobility - First observed
weighted_stats
TDQS
Each tool has a clearly distinct purpose: compare_groups, tabulate, and weighted_stats all handle different analyses; transition_matrix is unique; list_variables and variable_detail are complementary but not overlapping. No two tools could be confused.
All names use snake_case with a mostly verb_noun pattern (e.g., compare_groups, describe_survey). A few names like financial_inclusion_summary break the pattern but style remains consistent.
11 tools cover data exploration, filtering, statistics, specialized analyses, and visualization. The scope is well-matched to the survey domain without unnecessary excess or deficiency.
Core workflows (variable exploration, cross-tabulation, mobility analysis, visualizations) are covered. Missing advanced modeling or export options, but the set handles essential research tasks.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
Official Microsoft MCP Server to query Microsoft Entra data using natural language
MCP server for Statistics Sweden (SCB) - 1200+ tables with population, economy, environment data
Related MCP Servers
- AlicenseBqualityFmaintenanceMCP server for accessing Japanese government statistics portal 'e-Stat' API, enabling language models to search and retrieve statistical data.520MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for accessing India's Ministry of Statistics and Programme Implementation (MoSPI) data APIs. Enables natural language queries for economic, demographic, and social indicators via a 4-tool workflow.MIT
- AlicenseAqualityDmaintenanceAn MCP server that exposes the IPUMS API as LLM tools for browsing metadata, creating and downloading extracts, and generating reproducible R/Python code.23MIT
- AlicenseAqualityCmaintenanceMCP server for ENAHO (Peru's national household survey) microdata. Enables discovery, download, merging, and complex-survey statistical estimation of official poverty and income indicators, with report generation.321MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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