{
  "name": "csv.convert",
  "group": "data",
  "summary": "Convert between CSV and JSON with correct quote handling.",
  "description": "A full RFC 4180 parser: quoted fields, escaped quotes, embedded commas and newlines inside cells all survive the round trip, and the delimiter is detected automatically. Splitting CSV on commas is the classic silent data-corruption bug; this does not have it.",
  "keywords": [
    "csv to json",
    "json to csv",
    "parse csv",
    "rfc 4180",
    "tsv",
    "spreadsheet",
    "delimiter"
  ],
  "endpoint": "https://fluentedi.com/v1/csv/convert",
  "mcp_name": "csv_convert",
  "makes_network_request": false,
  "parameters": {
    "type": "object",
    "properties": {
      "input": {
        "description": "CSV text, or JSON array of objects when converting to CSV.",
        "maxLength": 1000000
      },
      "direction": {
        "description": "Conversion direction.",
        "type": "string",
        "enum": [
          "csv_to_json",
          "json_to_csv"
        ],
        "default": "csv_to_json"
      },
      "delimiter": {
        "description": "Field delimiter. \"auto\" detects among comma, semicolon, tab and pipe.",
        "type": "string",
        "default": "auto",
        "maxLength": 4
      },
      "header": {
        "description": "Treat the first CSV row as column names.",
        "type": "boolean",
        "default": true
      }
    },
    "required": [
      "input"
    ],
    "additionalProperties": false
  },
  "examples": [
    {
      "description": "CSV with a quoted comma",
      "url": "https://fluentedi.com/v1/csv/convert?input=name%2Crole%0A%22Doe%2C%20Jane%22%2Cengineer%0AAda%2Cfounder",
      "args": {
        "input": "name,role\n\"Doe, Jane\",engineer\nAda,founder"
      }
    },
    {
      "description": "Objects back to CSV",
      "url": "https://fluentedi.com/v1/csv/convert?input=%5B%7B%22name%22%3A%22Ada%22%2C%22role%22%3A%22founder%22%7D%2C%7B%22name%22%3A%22Grace%22%2C%22role%22%3A%22admiral%22%7D%5D&direction=json_to_csv",
      "args": {
        "input": "[{\"name\":\"Ada\",\"role\":\"founder\"},{\"name\":\"Grace\",\"role\":\"admiral\"}]",
        "direction": "json_to_csv"
      }
    }
  ],
  "suggestion": null
}