Skip to main content
Glama

scan_file

Scan CSV, Parquet, JSONL, XLSX, DuckDB files, PostgreSQL or MySQL tables, and S3/GS/Azure objects to detect data quality issues, then persist a report with scores and issue counts.

Instructions

Scan a data file (CSV/Parquet/JSONL/XLSX/DuckDB), a PostgreSQL table (postgresql://DSN, Step 55), a MySQL table (mysql://DSN, Step 56) or a cloud storage file (s3:// gs:// az:// CSV/Parquet/JSONL, Step 57) and persist the quality report. Returns scan id, status, row count, quality score and issue counts. Optional sampling (sampling_size or sampling_ratio; sampling_method random|stratified|reservoir|time_based|rare_oversampling|none, default reservoir; sampling_seed, default 42), detector whitelist and tags mirror the CLI (Step 76, ADR-076).

Input Schema

NameRequiredDescriptionDefault
pathYesPath to the data file, a postgresql:// / mysql:// DSN (table_name required), or an s3:// gs:// az:// cloud file URI
seedNo
tagsNo
detectorsNo
dataset_idNo
table_nameNo
sampling_seedNo
sampling_sizeNo
sampling_ratioNo
sampling_methodNosampling strategy accepted by core (ADR-076)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.1.1
    • addedInput schema / properties / sampling_method / description
      Added value: +"sampling strategy accepted by core (ADR-076)"
    • addedInput schema / properties / sampling_method / enum
      Added value: +[
      +  "random",
      +  "stratified",
      +  "reservoir",
      +  "time_based",
      +  "rare_oversampling",
      +  "none"
      +]
  2. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false, openWorldHint=true, destructiveHint=false. The description adds real behavioral context: it persists a quality report, returns scan id/status/row count/score/issue counts, and documents sampling defaults (reservoir, seed 42) and the detector whitelist/tags behavior. This goes meaningfully beyond 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.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with scan targets and returns, then optional parameters. However, internal references (Step 55/56/57/76, ADR-076) are noise to an agent and clutter the parentheticals without adding decision value.

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?

For a complex 10-parameter tool with no output schema and thin schema coverage, the description supplies return values, sampling defaults, and supported source types. The main gaps (seed, dataset_id, table_name) are minor relative to what is provided.

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 only 20% (10 params, most undocumented), so the description carries the burden. It does explain sampling_size/sampling_ratio, the sampling_method options and default, sampling_seed default, detectors and tags, but leaves seed, dataset_id and table_name semantics unaddressed. Partial compensation, not full.

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 (Scan) plus the resource scope (local data files, PostgreSQL/MySQL tables, cloud-storage files) and the persistence outcome. An agent can distinguish this from siblings like profiles_get or quality_score without opening any schema.

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

Usage Guidelines3/5

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

The accepted input formats and DSN schemes imply when the tool applies, but the description never states when to use it versus alternatives such as job_create or quality_score, nor any preconditions. Usage is inferable but not spelled out.

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