format_json
Take a compact JSON string and return a pretty-printed version with proper indentation and line breaks for easier reading and debugging.
Instructions
Pretty-print a JSON string.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- The actual handler function for the 'format_json' tool. Parses a JSON string and pretty-prints it with indentation and sorted keys.
def format_json(data: str) -> str: """Pretty-print a JSON string.""" parsed = json.loads(data) return json.dumps(parsed, indent=2, sort_keys=True) - src/friday_mcp_server/tools/utils.py:8-9 (registration)The 'format_json' tool is registered via the @mcp.tool() decorator inside the register() function in utils.py.
def register(mcp) -> None: @mcp.tool() - src/friday_mcp_server/tools/__init__.py:8-8 (registration)utils.register(mcp) is called from register_all_tools, which wires up the format_json tool (and word_count) into the MCP server.
utils.register(mcp) - src/friday_mcp_server/server.py:27-27 (registration)register_all_tools is called from build_server() in server.py, which is the top-level entry point that wires all tools (including format_json) into the FastMCP server.
register_all_tools(mcp, config=config, skill_store=skill_store)