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 tasks under w/projects/tasks' 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:0x11f11f87b3b9c8b1ab677a5c7c5cca65f7be7ea6e58beb310e22ee09b01de6ee
Input
PropertyTypeDescription
pathanyAny resolvable lattice path whose sub-tree you want to tally. Examples: 'w/projects/tasks', 'g' (your agents), 'j' (your jobs).
depthintegerHow many get-steps below path to count (default 1 = direct children/elements). A branch shorter than depth contributes nothing.
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
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.
countintegerNumber of entries visited at the given depth.

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-1.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-1.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-1.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-1.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 tasks under w/projects/tasks' 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",
		"readOnly": true,
		"toolName": "covia_aggregate",
		"input": {
			"type": "object",
			"properties": {
				"path": {
					"description": "Any resolvable lattice path whose sub-tree you want to tally. Examples: 'w/projects/tasks', '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