Skip to main content
Glama

Descriptive Statistics of KoboToolbox Data

kobo_analyze
Read-onlyIdempotent

Compute descriptive statistics for survey questions in a form, returning counts, percentages, means, medians, and date ranges. Filter to selected columns or use a query to analyze response subsets.

Instructions

Compute descriptive statistics for every question (or a chosen subset) of a form.

For each question it returns the statistics that fit its type:

  • categorical: counts and percentages per answer option (multi-select handled correctly — percentages are of respondents, so they can exceed 100%)

  • numeric: n, mean, median, standard deviation, min, max, quartiles, sum

  • date: earliest and latest

  • free text: number of distinct answers plus examples

Args:

  • uid (string): the form's asset uid

  • columns (array, optional): restrict to these questions (field name or question label)

  • query (string, optional): Mongo-style filter

  • response_format ('markdown' | 'json')

Loads the data automatically if it isn't cached yet.

Examples:

  • Use when: "What do the responses to my cocoa form look like?" -> uid=...

  • Use when: "What's the average plot size?" -> columns=["plot_size"]

  • Don't use when: you need two questions crossed (use kobo_crosstab)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uidYesAsset uid of the form (from kobo_list_forms)
queryNoOptional Mongo-style filter applied server-side, e.g. '{"region":"Sud-Ouest"}' or '{"_submission_time":{"$gte":"2026-01-01"}}'
columnsNoRestrict the profile to these questions (field name or question label). Omit for all.
response_formatNoOutput format: 'markdown' for human-readable or 'json' for machine-readablemarkdown

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.6/5.0
Behavior5/5

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

The description goes beyond the read-only/idempotent annotations by explaining what statistics are returned per question type, that multi-select percentages are of respondents and can exceed 100%, and that data is loaded automatically if not cached. These are meaningful behavioral details not present in the annotations.

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 description is well-structured and front-loaded with purpose, followed by useful output-type details and usage examples. The 'Args' section repeats schema information, adding some length, but the overall structure remains efficient and scannable.

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 no output schema, the description compensates by detailing what is returned for categorical, numeric, date, and free-text questions. It also covers parameters, the optional restriction to chosen questions, the filter option, output formats, and the caching behavior, making it sufficiently complete for an agent to invoke the tool correctly.

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 fully documents uid, columns, query, and response_format. The description restates the args without adding significant new parameter-level meaning, though the response_format enum is reinforced by the markdown/json mention.

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 opens with a specific verb and resource: 'Compute descriptive statistics for every question (or a chosen subset) of a form.' It lists the per-type outputs and explicitly contrasts with kobo_crosstab, making the tool's purpose distinguishable from its siblings.

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

Usage Guidelines5/5

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

It provides concrete 'Use when' examples, such as 'What do the responses to my cocoa form look like?' and 'What's the average plot size?', and an explicit 'Don't use when' case referencing kobo_crosstab. This gives an agent clear selection criteria.

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