Skip to main content
Glama

data_convert

Read-only

Convert files between JSON, YAML, and TOML formats to enable data interchange and compatibility across different systems and applications.

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_formatYesTarget format to convert to
output_fileNoOptional output file path (if not provided, returns converted content)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

The description adds valuable behavioral context beyond the readOnlyHint annotation by detailing side effects (writes to output_file if provided), failure modes (FileNotFoundError, ToolError), and output behavior (returns JSON or writes to file). This compensates well for the limited annotation, providing practical usage insights not covered by structured fields.

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 well-structured and front-loaded, starting with the core purpose, followed by usage guidelines, output contract, side effects, and failure modes. Every sentence adds value without redundancy, making it efficient and easy to parse for an AI agent.

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?

Given the tool's complexity (format conversion with file I/O), the description is complete enough. It covers purpose, usage, output behavior, side effects, and failure modes. With an output schema present, it doesn't need to detail return values, and the annotations (readOnlyHint) are complemented by the behavioral disclosures, making this a comprehensive description.

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

Parameters3/5

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

With 100% schema description coverage, the input schema already documents all parameters thoroughly. The description doesn't add significant meaning beyond what's in the schema, such as explaining parameter interactions or edge cases. It meets the baseline by not contradicting the schema but doesn't enhance parameter understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose as converting file formats between JSON, YAML, and TOML, which is a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like data_merge or data_query, which might also handle data transformation or manipulation, leaving some ambiguity about when to choose this tool over others.

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 provides clear context on when to use the tool ('when you need to transform a file from one format to another'), but it doesn't specify when not to use it or name explicit alternatives among the sibling tools. This gives good guidance but lacks exclusion criteria or direct sibling comparisons.

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