toml_to_yaml
Convert a TOML string to YAML format.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | Yes | TOML string to convert. |
Response
| Field | Type | Description |
|---|---|---|
output | string | The 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).
| Code | When | Delivered as |
|---|---|---|
invalid_arguments | input is missing or not a string. | protocol error (invalid_params) |
invalid_toml | The input string is not valid TOML. | tool error (isError) |
internal_error | An 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.