Tool Details: covia_aggregate

Basic Information

Tool Name:covia_aggregate
Asset Name:Aggregate Lattice Entries
Description:Count the entries a given number of levels below a lattice path, optionally grouped by a field. A 'step' is one navigation into a container (map/Index value, vector/set element), uniform across types. Use this for authoritative tallies over nested data (e.g. 'how many records under w/health/appointments' with depth=2, or 'how many per source' with groupBy=source) instead of listing and counting client-side. count is always returned; groupBy adds a per-group breakdown. Reads only — creates no job.
Adapter:covia
Asset Hash:0x4c6aa433c7dda1db94a68042b7eb36cca605434c9243c76c5238c59f1b069aca
Input
PropertyTypeDescription
depthintegerHow many get-steps below path to count (default 1 = direct children/elements). A branch shorter than depth contributes nothing.
pathanyAny resolvable lattice path whose sub-tree you want to tally. Examples: 'w/health/appointments', 'g' (your agents), 'j' (your jobs).
groupBystringOptional field read off each visited entry to partition the count. May be a relative path like 'meta/source'. Entries missing the field group under the 'null' key.
Output
PropertyTypeDescription
countintegerNumber of entries visited at the given depth.
existsbooleanTrue if a countable collection is present at the path (false for an absent path or a scalar).
groupsobjectPresent only with groupBy: maps each distinct field value to a { count } object. Sum of group counts equals count.

MCP Tool Usage Examples

This tool can be called via the MCP (Model Context Protocol) endpoint. Here are examples of how to use it:

JSON-RPC Call Example:

POST to https://venue-2.covia.ai/mcp

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "covia_aggregate",
    "arguments": {
      "input": "your input here"
    }
  }
}
cURL Example:
curl -X POST https://venue-2.covia.ai/mcp \\
  -H "Content-Type: application/json" \\
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "covia_aggregate",
      "arguments": {
        "input": "your input here"
      }
    }
  }'
Python Example:
import requests
import json

url = "https://venue-2.covia.ai/mcp"
payload = {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
        "name": "covia_aggregate",
        "arguments": {
            "input": "your input here"
        }
    }
}

response = requests.post(url, json=payload)
result = response.json()
print(result)
JavaScript/Node.js Example:
const fetch = require('node-fetch');

const url = 'https://venue-2.covia.ai/mcp';
const payload = {
    jsonrpc: '2.0',
    id: 1,
    method: 'tools/call',
    params: {
        name: 'covia_aggregate',
        arguments: {
            input: 'your input here'
        }
    }
};

fetch(url, {
    method: 'POST',
    headers: {
        'Content-Type': 'application/json'
    },
    body: JSON.stringify(payload)
})
.then(response => response.json())
.then(data => console.log(data));

Asset Metadata

{
	"name": "Aggregate Lattice Entries",
	"description": "Count the entries a given number of levels below a lattice path, optionally grouped by a field. A 'step' is one navigation into a container (map/Index value, vector/set element), uniform across types. Use this for authoritative tallies over nested data (e.g. 'how many records under w/health/appointments' with depth=2, or 'how many per source' with groupBy=source) instead of listing and counting client-side. count is always returned; groupBy adds a per-group breakdown. Reads only — creates no job.",
	"dateCreated": "2026-07-03T00:00:00Z",
	"operation": {
		"adapter": "covia:aggregate",
		"toolName": "covia_aggregate",
		"input": {
			"type": "object",
			"properties": {
				"path": {
					"description": "Any resolvable lattice path whose sub-tree you want to tally. Examples: 'w/health/appointments', 'g' (your agents), 'j' (your jobs)."
				},
				"depth": {
					"type": "integer",
					"description": "How many get-steps below path to count (default 1 = direct children/elements). A branch shorter than depth contributes nothing."
				},
				"groupBy": {
					"type": "string",
					"description": "Optional field read off each visited entry to partition the count. May be a relative path like 'meta/source'. Entries missing the field group under the 'null' key."
				}
			}
		},
		"output": {
			"type": "object",
			"properties": {
				"exists": { "type": "boolean", "description": "True if a countable collection is present at the path (false for an absent path or a scalar)." },
				"count": { "type": "integer", "description": "Number of entries visited at the given depth." },
				"groups": { "type": "object", "description": "Present only with groupBy: maps each distinct field value to a { count } object. Sum of group counts equals count." }
			}
		}
	}
}

Navigation

Back to adapter details

Back to all adapters

Back to index