Skip to main content
Glama
JeremyLakeyJr

Friday MCP Server

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

TableJSON Schema
NameRequiredDescriptionDefault
dataYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

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)
  • The 'format_json' tool is registered via the @mcp.tool() decorator inside the register() function in utils.py.
    def register(mcp) -> None:
        @mcp.tool()
  • 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)
  • 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)
Behavior2/5

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

With no annotations, the description carries full burden. It only states it pretty-prints a JSON string, but does not disclose behavior on invalid input, error handling, output format specifics, or side effects.

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?

Extremely concise: five words with no waste. Purpose is front-loaded and every word contributes.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Simple tool with one parameter and output schema present. Description is adequate for basic understanding but lacks error handling and output details.

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?

Schema coverage is 0%, so description must compensate. It clarifies that the 'data' parameter is a JSON string, but does not add details like expected encoding or format of output.

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

Purpose5/5

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

Purpose is clearly stated: 'Pretty-print a JSON string.' The verb 'pretty-print' is specific, and the resource 'JSON string' is unambiguous. This tool is distinct from siblings like read_file or write_file.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives. No mention of prerequisites or when not to use. Only minimal context from the description.

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/JeremyLakeyJr/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server