Skip to main content
Glama

util_csv_to_sql

Read-only

CSV to SQL — Turn a CSV into a ready-to-run SQL script: CREATE TABLE with inferred column types (integer, bigint, exact decimal precision/scale, float, boolean, date, timestamp with or without time zone, sized text) plus batched multi-row INSERTs in one transaction. dialect=postgres (default), mysql, sqlite or mssql with correct identifier quoting and literal escaping; table= name, primaryKey= (checked unique and non-null, otherwise left out with a warning), batch= rows per INSERT, dropIfExists=true, maxRows up to 20000. Column names become safe snake_case, leading-zero codes such as ZIPs stay text, NULL tokens (blank, NA, N/A, null) become NULL, and a primary key is suggested when one fits. Offline. Price: $0.004 USDC (Base, via x402).

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": {
      "csv": "<csv>",
      "dialect": "<dialect>"
    },
    "name": "util_csv_to_sql"
  }
}

Input Schema

NameRequiredDescriptionDefault
csvYese.g. id,name,price,in_stock,added 1,Widget,9.99,true,2026-01-05 2,O'Brien Gadget,12.50,false,2026-02-10
dialectYese.g. postgres

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, yet the description still adds substantial behavior: type inference with exact decimal precision/scale, primaryKey validated for uniqueness/non-null and silently dropped with a warning, a 20000-row cap, NULL-token normalization, and snake_case column sanitization. The one weak spot is 'Offline', which sits awkwardly against openWorldHint=true and the x402 network payment, leaving the agent unsure how the call is actually transacted.

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?

The purpose is correctly front-loaded in the first clause, and most sentences carry information. But the back half collapses parameters into one dense run-on with '=' fragments ('table= name, primaryKey= ..., batch= rows per INSERT'), which reads as schema data stuffed into prose rather than a structured description.

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 stateless converter with no output schema, the description covers the essentials an agent needs: the shape of the emitted SQL, dialect-specific quoting/escaping, edge-case data handling, and hard limits. The gap is that the extra named parameters are absent from the schema, so the agent cannot tell which knobs are real.

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% for the two declared parameters, so baseline is 3. The description does add real value by enumerating dialect values (postgres default, mysql, sqlite, mssql) that the schema leaves as free text, but it also documents table=, primaryKey=, batch=, dropIfExists= and maxRows= which do not appear in the input schema at all, creating ambiguity about what is actually passable.

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?

Opens with a specific verb+resource pair ('CSV to SQL — Turn a CSV into a ready-to-run SQL script') and immediately scopes the output to CREATE TABLE plus batched INSERTs. That is clearly separable from siblings like util_json_to_csv (source format) and util_sql_lint (validation, not generation) 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?

Usage context is implied rather than stated: the agent can infer 'use this when you have CSV and want a runnable SQL script', and 'Offline' plus the dialect list narrows the situation. However, no alternative is ever named or excluded, and nothing tells the agent when to prefer util_sql_lint, util_csv_validate, or util_json_to_csv over this tool.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources