Skip to main content
Glama

import_rows

Import rows from a CSV or JSON file into a dataset with a two-step process: preview the column mapping, then confirm to add valid rows and receive clear rejection reasons for invalid ones.

Instructions

Import rows into a dataset from a CSV or JSON file, in two safe steps.

Step 1 (confirm=false, default): returns a mapping preview - how each file column maps to a dataset column, unmatched file columns, missing required dataset columns, and a small sample. Share the mapping with the user and let them confirm or adjust the file.

Step 2 (confirm=true): imports. Every row is validated against the dataset schema; valid rows are added and invalid rows are reported with plain-language reasons. CSV values are coerced automatically ("5" becomes the number 5, "true" becomes a boolean).

Args: dataset: Exact dataset name, e.g. "Candidates". file_path: Path to the .csv or .json file on this machine. format: "auto" (default, infers from extension), or force "csv"/"json". confirm: Must be true to actually import (default false = preview only). create_if_missing: When the dataset does not exist, create it first with one string column per file header, then import (default false).

Returns: Preview: {"ok": true, "requires_confirmation": true, "preview": {...}}. Commit: {"ok": true, "dataset", "added": , "rejected": , "rejected_rows": [{"row": , "errors": ["..."]}]}.

Example: import_rows(dataset="Candidates", file_path="~/Downloads/applicants.csv")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNoauto
confirmNo
datasetYes
file_pathYes
create_if_missingNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations, the description carries the behavioral burden and does so well: it reveals that previews happen before commit, that rows are validated against the schema, that CSV values are coerced, and that invalid rows are reported. It stops short of explicitly stating whether the preview is fully non-mutating or whether the import is transactional.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

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

The description is long but every section earns its place: purpose, two-step behavior, parameter definitions, return shapes, and an example. It is well-structured with clear headers and front-loaded with the core behavior.

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 complex two-phase tool with five parameters and no annotations, the description covers the full call contract: all parameters, both phase return shapes, defaults, validation behavior, and an example. Nothing essential for invoking it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, but the description compensates fully by explaining every parameter: dataset name, file path, format auto/csv/json, confirm gating the actual import, and create_if_missing behavior. The example reinforces how the parameters are used together.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence names a specific action ('Import rows into a dataset'), the source formats (CSV/JSON), and the two-step preview/commit model. This makes it easy to distinguish from file-export or manual-row tools, but it never explicitly names sibling tools or states what it is not.

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

Usage Guidelines4/5

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

The description clearly explains the intended workflow: call with confirm=false first, share the mapping with the user, then call with confirm=true to commit. It also explains create_if_missing behavior and defaults, but it does not explicitly compare against alternatives like add_rows or validate_rows.

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

Install Server

Other Tools

Latest Blog Posts

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/kanishk393/mdm-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server