Skip to main content
Glama

MCP JSON Maker

by zb2947244682

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

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(紧凑格式)

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "file_path": { "description": "目标文件路径:支持绝对路径(如'D:/data/export.json')或相对路径(如'./output/export.json')。相对路径相对于当前工作目录", "type": "string" }, "format": { "default": "json", "description": "输出格式:json(标准JSON格式)、jsonl(每行一个JSON)、csv(逗号分隔值,仅支持扁平结构)", "enum": [ "json", "jsonl", "csv" ], "type": "string" }, "insert_line": { "description": "插入行号:从1开始,指定在文件的第几行插入内容。不指定则覆盖整个文件", "type": "number" }, "json_ids": { "description": "JSON ID列表:要导出的JSON的ID数组。使用item_operations工具查看可用的JSON ID", "items": { "type": "string" }, "minItems": 1, "type": "array" }, "pretty_print": { "default": true, "description": "是否美化输出:true(格式化缩进)、false(紧凑格式)", "type": "boolean" } }, "required": [ "json_ids", "file_path" ], "type": "object" }

Other Tools from MCP JSON Maker

Related Tools

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