test_statistics
Count livestock test records and calculate positivity percentages by species, pathogen, country, lab, breed, sample type, diagnostic test, production stage, year, or month with optional filters.
Instructions
Count test records: tested, positive, negative and positivity_percent.
Use this for every question about numbers, percentages, comparisons or trends. Leave a filter empty when the question does not mention it.
group_by: leave EMPTY for one number or one rate ("how many", "what is the positivity"). Set it ONLY to compare groups ("which ... highest, lowest, most"): one of species, pathogen, country, lab, breed, sample_type, diagnostic_test, production_stage, year, year_month, month_of_year. The result then has "overall" (the whole selection), one row per group, and highest_positivity, lowest_positivity, most_tested, most_positive. "Which pathogen has the highest positivity?" -> group_by="pathogen". "Which laboratory tested the most samples?" -> group_by="lab". "Which breed ... for Mycoplasma bovis?" -> group_by="breed", pathogen="Mycoplasma bovis" (do not also fill the breed filter). pathogen: cattle: BRSV, BCV, PI3, "Pasteurella multocida", "Mannheimia haemolytica", "Histophilus somni", "Mycoplasma bovis". Pigs: PRRS, "Swine influenza virus", "Mycoplasma hyopneumoniae", "Lawsonia intracellularis". Or a group: "bacteria", "virus". country: Belgium, France, Ireland, The Netherlands (cattle), Spain (pigs). lab: 1 to 6 (cattle), 7 and 8 (pigs). breed: Beef, Dairy, Suckler, Veal, Mixed, Unknown (cattle), Meat (pigs). sample_type: Autopsy, BAL, Swab, TTA, Tissue, Feces, Fluid, Unknown, Missing. diagnostic_test: PCR, Culture, NPS. production_stage (pigs only): Suckling, Nursery, Weaning, Finishing, Breeding. year: four digits, for example 2024. month: "2022-01" for one month of one year, or 1 to 12 for that month in every year. date_from, date_to: 2024, 2024-03 or 2024-03-15 (both ends included). species: leave EMPTY unless the question itself names an animal. Empty means both species, which is what "overall", "in total" and "all tests" ask for. Fill "Pig" only for a question about pigs, "Cattle" only for a question about cattle. Several values for one filter may be given with commas: country="Belgium, France". Synonyms and other languages work (for example "kweek" for Culture).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "test_statistics"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lab | No | ||
| year | No | ||
| breed | No | ||
| month | No | ||
| country | No | ||
| date_to | No | ||
| species | No | ||
| group_by | No | ||
| pathogen | No | ||
| date_from | No | ||
| sample_type | No | ||
| diagnostic_test | No | ||
| production_stage | No |