Skip to main content
Glama

data_convert

Read-onlyIdempotent

Convert files between JSON, YAML, and TOML formats. Specify input file and target format to get converted output or save to a file.

Instructions

Convert file format.

Use when you need to transform a file from one format (JSON, YAML, TOML) to another.

Output contract: Returns {"success": bool, "result": str, ...} or writes to file. Side effects: Writes to output_file if provided. Failure modes: FileNotFoundError if input missing. ToolError if formats same or conversion fails.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesPath to source file
output_fileNoOptional output file path (if not provided, returns converted content)
output_formatYesTarget format to convert to

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileNo
resultNo
messageNo
successYes
input_fileNo
output_fileNo
input_formatNo
output_formatNo
Behavior5/5

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

The description discloses side effects ('Writes to output_file if provided'), output contract, and failure modes, adding context beyond annotations. It is consistent with idempotentHint and destructiveHint, though readOnlyHint is contradicted (see below).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise with 4 sentences, front-loading the action ('Convert file format') and using structured sections for output contract, side effects, and failure modes, with no wasted words.

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?

The description covers the conversion use case, all parameters, side effects, failure modes, and output contract. Given the output schema exists, no further detail is needed.

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

Parameters5/5

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

Schema coverage is 100%, and the description adds meaning by explaining the dual behavior (return string vs. write to file) based on output_file parameter, and implicitly confirms output_format via listed formats.

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?

The description starts with 'Convert file format' and specifies the supported formats (JSON, YAML, TOML), clearly stating the tool's function. It is distinct from siblings like data_diff and data_merge, which do not perform format conversion.

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?

The description explicitly states 'Use when you need to transform a file from one format (JSON, YAML, TOML) to another,' providing clear usage context. However, it lacks explicit when-not-to-use guidance or alternatives, though siblings do not compete.

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

Install Server

Other 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/bitflight-devops/mcp-json-yaml-toml'

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