We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/StacklokLabs/plotting-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
utils.py•319 B
def sizeof_fmt(num, suffix="B"):
"""
Convert a number to a human-readable format with appropriate suffix.
"""
for unit in ("", "Ki", "Mi", "Gi", "Ti", "Pi", "Ei", "Zi"):
if abs(num) < 1024.0:
return f"{num:3.1f}{unit}{suffix}"
num /= 1024.0
return f"{num:.1f}Yi{suffix}"