count_by_field
Pack: idigbio · Endpoint: https://gateway.pipeworx.io/idigbio/mcp
Get taxonomic/geographic specimen counts grouped by a field (top values + counts) across iDigBio. Optionally scope the counts with taxonomy/locality filters. Keyless.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
field | string | yes | Field to group by: one of country, stateprovince, family, genus, institutioncode, basisofrecord. |
scientific_name | string | no | Optional filter to scope the counts. |
genus | string | no | Optional filter to scope the counts. |
family | string | no | Optional filter to scope the counts. |
country | string | no | Optional filter to scope the counts. |
top_count | number | no | Number of top buckets to return (default 10, max 25). |
Example call
Arguments
{
"field": "country"
}
curl
curl -X POST https://gateway.pipeworx.io/idigbio/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"count_by_field","arguments":{"field":"country"}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('count_by_field', {
"field": "country"
});
More examples
{
"field": "family",
"genus": "acer",
"top_count": 20
}
Connect
Add this to your MCP client config, or use one-click install buttons:
{
"mcpServers": {
"idigbio": {
"url": "https://gateway.pipeworx.io/idigbio/mcp"
}
}
}
See Getting Started for client-specific install steps.