Skip to main content
Glama
cvm-mcp
by msperlin

load_dataset

Read-only

Download and parse a CVM dataset or period into the local cache, reusing fresh archives and building only missing partitions so SQL queries can run.

Instructions

Download and parse a dataset/period into the local cache.

This is the non-destructive counterpart of refresh_cache: it reuses archives that are still fresh and only builds the partitions that are missing. Call it before run_query so the SQL layer has the tables (and periods) it needs, and use describe_dataset(detail=True) for column meanings.

Heavy optional tables (dfp/itr parecer) are skipped unless named in table or include_optional is true.

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": {
      "dataset": "<dataset>"
    },
    "name": "load_dataset"
  }
}

Input Schema

NameRequiredDescriptionDefault
tableNoOptional table; omit for all tables in the dataset.
periodNoYear (YYYY) or month (YYYYMM); comma-separated values are accepted. Defaults to the latest published period. Use '*' for every period.
datasetYesDataset id from list_datasets, e.g. 'dfp', 'fi_inf_diario'.
include_optionalNoAlso build the heavy optional tables (DFP/ITR `parecer`, which is free text and ~15 MB per year).

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.2.0
    • addedInput schema / properties / include_optional
      Added value: +{
      +  "default": false,
      +  "description": "Also build the heavy optional tables (DFP/ITR `parecer`, which is free text and ~15 MB per year).",
      +  "title": "Include Optional",
      +  "type": "boolean"
      +}
  2. First observedv0.1.1

TDQS

A4.4/5.0
Behavior4/5

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

Beyond the annotations, it discloses the incremental behavior (reuses still-fresh archives, builds only missing partitions) and the default skip of heavy optional tables with a concrete cost figure (~15 MB per year), which materially affects whether an agent sets `include_optional`. What's missing is any statement about how long a build takes or what happens when a requested period is unpublished; the local-cache write also sits in mild tension with `readOnlyHint: true` even though the tool is explicitly framed as the non-destructive option.

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?

Front-loaded with the action, then the sibling contrast, then the prerequisite call order, then the edge case about optional tables — a sensible priority order. The double-backtick formatting around 'table' and 'include_optional' is noisy and the paragraph break interrupts an otherwise tight three-sentence block.

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?

For a four-parameter cache-building tool with an output schema, the description covers everything the agent needs to decide and call correctly: prerequisites, incremental semantics, defaults, and the expensive optional-table condition. Return values are properly left to the output schema.

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% and the schema already documents period formats, the '*' wildcard, and the optional-table cost, so the description is largely restating structured data. The one added nuance — that `parecer` tables are skipped unless named in `table` or `include_optional` is true — is genuinely useful interaction between two parameters, but it doesn't go much further than the schema text.

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?

States a specific verb+resource+destination: 'Download and parse a dataset/period into the local cache.' It immediately positions itself relative to two siblings by name — the non-destructive counterpart of `refresh_cache` and a prerequisite for `run_query` — so an agent can place it in the workflow without opening the schema.

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?

Gives an explicit ordering rule ('Call it before `run_query` so the SQL layer has the tables') and redirects to `describe_dataset(detail=True)` for column meanings, which is exactly the kind of when-to-use/when-to-use-something-else routing an agent needs. The `refresh_cache` contrast also tells the agent which of the two cache tools is safe to call.

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