Skip to main content

toml_to_yaml

Convert a TOML string to YAML format.

Parameters​

ParameterTypeRequiredDescription
inputstringYesTOML string to convert.

Response​

FieldTypeDescription
outputstringThe converted YAML string.

Example​

{
"input": "name = \"Alice\"\nport = 8080\n\n[db]\nhost = \"localhost\"\n"
}

Result:

{
"output": "db:\n host: localhost\nname: Alice\nport: 8080\n"
}

Errors​

Each failure carries a precise code in the response. Argument-schema and server errors are JSON-RPC protocol errors; a rejected value is returned as a tool result with isError: true (so the agent can read the code and self-correct).

CodeWhenDelivered as
invalid_argumentsinput is missing or not a string.protocol error (invalid_params)
invalid_tomlThe input string is not valid TOML.tool error (isError)
internal_errorAn unexpected server error.protocol error (internal_error)

Notes​

  • TOML datetime values are serialized as strings in the YAML output.
  • Key ordering may differ from the input since TOML tables are unordered.