# Farm-Gate Nitrogen Balance AI Agent Connect

> Calculates whole-farm nitrogen balance, efficiency, and environmental risk indicators.

## Overview
- **Category:** environmental-science
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_lxg6XZSLwEzcMntiktNyLgPieLLlVlSB8TtyV6Gx/ai-agent-connect
- **Tags:** nitrogen, farming, ecology, fertilizer, agronomy

## Description

This MCP server provides tools to track nitrogen (N) flow across an entire farm ecosystem. It calculates the total nitrogen surplus or deficit using `get_nitrogen_balance`, determines Nitrogen Use Efficiency (NUE) via `get_efficiency_metrics`, and evaluates environmental risks like leaching and denitrification with `get_environmental_risk_indicators`. It also identifies loss hotspots through `get_nitrogen_flow_summary` to help optimize fertilizer use and minimize environmental impact.

## Tools

### get_environmental_risk_indicators
Evaluates the risk of nitrogen loss to the environment

### get_nitrogen_balance
Calculates the total nitrogen surplus or deficit for the entire farm

### get_nitrogen_flow_summary
Identifies loss hotspots and provides a summary of the nitrogen distribution

### get_efficiency_metrics
Calculates the Nitrogen Use Efficiency (NUE) of the farm

## Prompt Examples

**Prompt:** 
```
Calculate the nitrogen balance for a farm with 100 hectares. Inputs: 500kg fertilizer, 200kg manure, 50kg fixation, 10kg deposition, 5kg seed. Outputs: 300kg grain, 100kg forage, 50kg meat, 20kg milk, 10kg erosion.
```

**Response:** 
```
The total nitrogen input is 765kg and the total output is 480kg, resulting in a net surplus of 285kg. The surplus per hectare is 2.85kg/ha.
```

**Prompt:** 
```
What is the nitrogen use efficiency if the total input is 1000kg and the harvested output is 400kg?
```

**Response:** 
```
The Nitrogen Use Efficiency (NUE) is 0.4, which is 40%.
```

**Prompt:** 
```
Evaluate the environmental risk for a surplus of 200kg with 30kg erosion in sandy soil.
```

**Response:** 
```
The environmental risk level is High due to the high leaching potential associated with sandy soil and the nitrogen surplus.
```

## Frequently Asked Questions

**What does the nitrogen balance tool calculate?**
The `get_nitrogen_balance` tool calculates the difference between all nitrogen inputs (like fertilizer and manure) and all nitrogen outputs (like grain and forage) to determine the farm's net surplus or deficit.

**How can I assess environmental risk?**
You can use `get_environmental_risk_indicators` to evaluate the risk of nitrogen loss based on your nitrogen surplus, erosion levels, and soil type.

**Can I identify where nitrogen is being lost?**
Yes, `get_nitrogen_flow_summary` identifies specific loss hotspots such as erosion, leaching, or denitrification.
