Format Conversion
Convert logfmt (key=value) to JSON or JSON back to logfmt, with quote escaping, number/boolean coercion, and duplicate-key handling.
Call this tool from your code in three languages.
curl -X POST 'https://api.elysiatools.com/en/api/tools/logfmt-to-json-structured-log-bridge' \
-H 'Content-Type: application/json' \
-d '{"input":"level=info msg=\"server started\" port=8080 ready=true count=42","direction":"logfmt-to-json","coerceNumbers":true,"coerceBooleans":true,"dropNullValues":false,"duplicateKeyMode":"warn","indent":2}'Send a POST request with your inputs as JSON. File parameters require a separate upload first.
POST https://api.elysiatools.com/en/api/tools/logfmt-to-json-structured-log-bridge| Name | Type | Required | Description |
|---|---|---|---|
| input | textarea | Yes | — |
| direction | select | Yes | — |
| coerceNumbers | checkbox | No | — |
| coerceBooleans | checkbox | No | — |
| dropNullValues | checkbox | No | — |
Add this tool to your Model Context Protocol server so AI agents can list and call it.
Add this block to your MCP client configuration:
{
"mcpServers": {
"elysiatools-logfmt-to-json-structured-log-bridge": {
"name": "logfmt-to-json-structured-log-bridge",
"description": "Convert logfmt (key=value) to JSON or JSON back to logfmt, with quote escaping, number/boolean coercion, and duplicate-key handling.",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=logfmt-to-json-structured-log-bridge",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}After connecting to the SSE endpoint, list the exposed tools:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoke the tool by its id, passing arguments built from its parameters:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "logfmt-to-json-structured-log-bridge",
"arguments": {
"input": "level=info msg=\"server started\" port=8080 ready=true count=42",
"direction": "logfmt-to-json",
"coerceNumbers": true,
"coerceBooleans": true,
"dropNullValues": false,
"duplicateKeyMode": "warn",
"indent": 2
}
}
}| duplicateKeyMode |
| select |
| No |
| — |
| indent | number | No | — |
Text result
{
"result": "Processed text content",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}Questions or issues? Contact [email protected]