Home / Servers / Data Formats / json_group_by

Json group by

An MCP tool from the Data Formats server, hosted on mcp.hjlabs.in.

Group an array of objects by a key (dotted paths allowed) and optionally aggregate a numeric field per group: count, sum, avg, min, max.

Name on the gateway: data__json_group_by · read-only.

Parameters

NameTypeDescription
json requiredstringAn array of objects.
by requiredstringThe key to group by, e.g. "country" or "address.city".
aggregatestringA numeric field to summarise per group. Optional.

How to call it

Through the Smart Gateway, any client can run it by name with call_tool, or let the gateway find it with search_tools:

call_tool arguments
{
  "name": "data__json_group_by",
  "arguments": {
    "json": "…",
    "by": "…"
  }
}

Or connect the Data Formats server directly, which lists 26 tools including this one:

Run in your terminal
claude mcp add --transport http hj-data https://mcp.hjlabs.in/mcp/data \
  --header "Authorization: Bearer YOUR_API_KEY"

Try asking

Use the json group by tool with json set to ….

More from Data Formats