Skip to main content
Glama

Load and Clean KoboToolbox Data

kobo_load_data
Read-onlyIdempotent

Downloads all form submissions, cleans and labels data, flattens groups, and reports data quality for analysis. Use this first to prepare a complete dataset.

Instructions

Download ALL submissions of a form and prepare them for analysis. Start every analysis here.

Unlike kobo_list_submissions (one page of raw records), this pulls the whole dataset, replaces stored choice codes with their labels, converts numbers and dates, flattens groups, and reports data quality. The cleaned snapshot is cached for 15 minutes and reused by kobo_analyze, kobo_crosstab, kobo_get_data_sample and kobo_build_report.

Args:

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

  • query (string, optional): Mongo-style server-side filter, e.g. '{"region":"Sud-Ouest"}'

  • max_rows (number): safety cap (default: everything, up to 50000)

  • language (string, optional): label language for multilingual forms

  • refresh (boolean): re-download instead of using the cache

  • response_format ('markdown' | 'json')

Returns: the list of analysable questions with their measurement type (categorical / numeric / datetime / text) and answer options, the number of submissions, and a data-quality summary (missing values, duplicates, skipped repeat groups).

Use the returned question list to decide what to analyse — its "field" values are what you pass to the other tools.

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"}}'
refreshNoForce a fresh download instead of reusing the cached snapshot (cache lasts 15 min)
languageNoPreferred label language for multilingual forms, e.g. 'Français' or 'fr'
max_rowsNoHow many submissions to pull. Defaults to 50000, which protects against dragging a huge project into memory; pass a higher value explicitly to analyse a project larger than that.
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?

Beyond the annotations, the description discloses meaningful behavior: it downloads all submissions, applies transformations (choice labels, number/date conversion, group flattening), caches the result for 15 minutes, and reports data quality. It also explains that the cache is reused by other tools and that refresh forces a re-download. No contradiction with the readOnly/idempotent annotations exists.

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 longer than average but well-structured: purpose is front-loaded, the sibling distinction comes second, then args, then return value and usage hint. The Args list duplicates some schema information, but it interleaves practical context that helps an agent, so the length is mostly earned and not padded.

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 adequately explains the return shape: analysable questions with measurement types and answer options, submission count, and a data-quality summary. It also tells the agent how to use the returned 'field' values with other tools, which is exactly the guidance needed for correct follow-up calls. Nothing essential is missing for a read-only cached data-loading tool.

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 100%, so the input schema already documents all six parameters. The description adds modest context such as max_rows being a 'safety cap' and the returned field values being what to pass to other tools, but it largely restates the schema rather than adding substantial new parameter meaning. The phrase 'default: everything, up to 50000' is also slightly ambiguous compared to the schema's explicit default of 50000.

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: 'Download ALL submissions of a form and prepare them for analysis.' It clearly distinguishes this from kobo_list_submissions by contrasting 'one page of raw records' with the full cleaned dataset, and it names the exact downstream tools that consume the result.

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?

The description explicitly says 'Start every analysis here,' which is a strong directive for when to use the tool. It also names kobo_list_submissions as the alternative for single-page raw records and lists which sibling tools consume the cached snapshot, making the surrounding workflow unambiguous.

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