Skip to main content
Glama

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

NameRequiredDescriptionDefault
labNo
yearNo
breedNo
monthNo
countryNo
date_toNo
speciesNo
group_byNo
pathogenNo
date_fromNo
sample_typeNo
diagnostic_testNo
production_stageNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations present, the description carries the full load. It discloses the return shape for grouped queries (an 'overall' row plus per-group rows and highest_positivity, lowest_positivity, most_tested, most_positive), supports comma-separated multi-values, and accepts synonyms and other languages. It does not state that the operation is side-effect free or how large selections are bounded, which keeps it short of a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is long, but the length is driven by 13 undocumented parameters, and the structure is front-loaded: purpose, usage rule, then one indented block per parameter. A few lines restate obvious points (year is four digits, synonyms work), but nothing is truly wasteful.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 13-parameter, zero-coverage tool with no annotations and no output schema, the definition covers usage, all argument vocabularies, and the grouped return structure. It stops short of describing the ungrouped return payload or how empty results are presented, which an agent would still have to discover at runtime.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% and there are 13 parameters, so the description must compensate entirely, and it does: every parameter gets allowed values (pathogen lists per species, countries, labs, breeds, sample types, diagnostic tests, production stages), formats (year four digits, month '2022-01' or 1-12, date_from/date_to with inclusive ends), and empty-string semantics. It adds the species/lab/breed domain split between cattle and pigs that the schema does not encode.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a precise verb-resource pair ('Count test records') and names the exact measures returned: tested, positive, negative, positivity_percent. That is more specific than any sibling name (describe_term, graph_overview, list_values, search_terms) would imply, so an agent can route to it without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives an explicit use rule ('every question about numbers, percentages, comparisons or trends'), a negative rule ('leave a filter empty when the question does not mention it'), and a full decision tree for group_by with worked examples mapping natural-language phrasings to arguments. It also warns against double-filling breed when group_by='breed' and explains when species should stay empty.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.