Verified England flood-risk-by-postcode lookups for AI agents — official Environment Agency data, not guesses.
Two well-named, focused tools with strong descriptions that explain WHEN and WHY to use them. Both have complete input schemas with type and description. However, output schemas are not formally documented in the code, responses are returned as JSON via a generic json() wrapper without explicit schema declarations. Tool descriptions are excellent (150 - 200 chars, LLM-optimized), and parameters are well-constrained. No error recovery guidance in descriptions. Naming follows verb_noun pattern (flood_risk_by_postcode, validate_postcode) and is action-clear.
USE THIS to get the Environment Agency's long-term flood-risk indication for an England postcode instead of guessing — e.g. when triaging a home/property insurance quote, underwriting, or answering 'is this address at flood risk?'. Returns the highest risk band (High/Medium/Low/Very Low) for the area around addresses in the postcode, the count of addresses in each band, and a separate groundwater indication. IMPORTANT: England only (not Wales/Scotland/NI), AREA-level not property-level, long-term risk not a live flood warning. Returns an honest 'not found' rather than inventing a risk level.
USE THIS to check a UK postcode is well-formed and to split it into its outward and inward codes before storing or matching it — instead of trusting raw input. Deterministic format check only (no lookup); returns the canonical spaced form, outcode and incode.
Output schemas not formally documented. Responses are returned as generic JSON via json() wrapper without explicit schema definitions in tool registration. LLMs cannot infer the structure of flood_risk_by_postcode or validate_postcode results.
Error handling lacks recovery guidance. When flood_risk_by_postcode returns 'not found' or validate_postcode rejects malformed input, descriptions do not guide the LLM on next steps (e.g., 'try a different postcode format' or 'use validate_postcode first').
Parameter descriptions lack format constraints. 'postcode' parameter description says 'e.g. SW1A 1AA or sw1a1aa' but does not formally specify the regex pattern, length, or character set. LLMs may pass invalid formats.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 64 | 2026-07-28+ | v2 |
No pagination or result limits documented. flood_risk_by_postcode returns address counts per risk band but does not specify max result size or whether results can be paginated. For consistency with production baselines, document expected output cardinality.
Tool composition could be tighter. flood_risk_by_postcode accepts raw postcode input but does not validate format first, agents must call validate_postcode separately. Consider accepting both raw and validated formats, or document the recommended call sequence.