Skip to main content
Glama

util_csv_melt

Read-only

CSV unpivot (melt) — Reshape a wide CSV into long/tidy format (melt, unpivot, gather): keep the id= columns (comma-separated, default the first column) and turn every other column, or only the values= list, into variable/value rows. Rename the new columns with varName= and valueName=, keep or drop empty cells (dropEmpty, default true). Returns the long CSV, a JSON sample, row-count checks (input x value columns vs output), a numeric/text guess for the values and the exact csv-pivot call that reverses it. Ideal for charting, loading into databases and BI tools. Offline. Price: $0.003 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>",
      "id": "<id>"
    },
    "name": "util_csv_melt"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYese.g. region
csvYese.g. region,2024,2025 East,100,120 West,90,130

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior4/5

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

Adds a lot beyond the annotations: defaults (id defaults to the first column, dropEmpty default true), the full return payload (long CSV, JSON sample, row-count checks, type guess, reversing pivot call), and the payment/auth requirement ($0.003 USDC on Base via x402) which is critical for invocation. Minor tension: it advertises "Offline" while openWorldHint=true implies external interaction, and no error/failure behavior is described.

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 purpose, then mechanics, then outputs, then pricing — a sensible order with little pure filler. It is dense to the point of being a single run-on block, and the synonym triplet plus the use-case sentence are slightly padded, but every clause carries information.

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?

No output schema exists, and the description compensates by enumerating the return values including the row-count verification and the reversing pivot call, which is exactly what an agent needs to chain calls. Defaults and pricing are both covered, so nothing essential to a correct first invocation is missing.

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

Parameters4/5

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

Schema coverage is 100%, but the description still adds real meaning: id accepts a comma-separated list and defaults to the first column, and it explains what each non-id column becomes. It also references values=, varName=, valueName= and dropEmpty, which are not present in the supplied schema — helpful semantics, but an agent could try to pass parameters the schema does not expose.

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 and resource ("CSV unpivot (melt) — Reshape a wide CSV into long/tidy format") and immediately supplies synonyms (melt, unpivot, gather) plus the exact transformation semantics: keep id columns, turn remaining columns into variable/value rows. An agent can distinguish this from util_csv_pivot or util_csv_join without opening a schema.

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?

Gives concrete use cases ("Ideal for charting, loading into databases and BI tools") and points at the inverse operation ("the exact csv-pivot call that reverses it"), which helps routing back to the sibling. It stops short of explicit when-not conditions or a rule for choosing between this and util_csv_pivot/other reshapers.

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