Skip to main content
Glama

export_to_file

Export JSON data to a specified file in JSON, JSONL, or CSV format. Supports absolute or relative paths, automatic directory creation, and precise insertion at defined line numbers.

Instructions

将JSON数据导出到指定文件,支持多种格式和插入位置。支持绝对路径和相对路径,自动创建不存在的目录。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes目标文件路径:支持绝对路径(如'D:/data/export.json')或相对路径(如'./output/export.json')。相对路径相对于当前工作目录
formatNo输出格式:json(标准JSON格式)、jsonl(每行一个JSON)、csv(逗号分隔值,仅支持扁平结构)json
insert_lineNo插入行号:从1开始,指定在文件的第几行插入内容。不指定则覆盖整个文件
json_idsYesJSON ID列表:要导出的JSON的ID数组。使用item_operations工具查看可用的JSON ID
pretty_printNo是否美化输出:true(格式化缩进)、false(紧凑格式)

Other Tools

Related 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/zb2947244682/mcp-json-maker'

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