# check_class_balance

Check class distribution in a classification dataset. Flags imbalance if any class < 20%.

Agent View of the PolicyLayer registry record for `check_class_balance`. HTML page: https://policylayer.com/tools/agentic-automl-platform/check-class-balance

## Facts

- Tool: `check_class_balance`
- Server: Agentic Automl Platform (`anantshri1/agentic-automl-platform`) — https://policylayer.com/tools/agentic-automl-platform.md
- Homepage: https://github.com/anantshri1/agentic-automl-platform
- Risk category: Read (Low risk)
- Registry record: grade C, identity unverified
- Server rate-limited: no
- Parameters: 0
- Recommended policy verdict: Allowed

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "check_class_balance",
    "arguments": {}
  }
}
```

## Why check_class_balance is rated Low

This tool retrieves and analyzes dataset metadata to report on class balance ratios. It produces diagnostic information only and does not create, modify, delete, or execute code based on its findings. The output is a simple assessment/flag with no capability to alter data or trigger consequential operations.

From the tool's own definition: "Tool performs analysis and checks class distribution in a dataset without modifying data or triggering external operations. The description explicitly states it 'checks' and 'flags' imbalance, which are diagnostic/informational actions with no side effects."

## Use case

AI agents call check_class_balance to retrieve information from Agentic Automl Platform without modifying anything. It is typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.

## Recommended policy (PolicyLayer)

Verdict: **Allowed**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Agentic Automl Platform:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "check_class_balance": {}
  }
}
```

## Other tools on Agentic Automl Platform (13)

- `evaluate_ffn` — Execute — https://policylayer.com/tools/agentic-automl-platform/evaluate-ffn.md
- `hyperparameter_search` — Execute — https://policylayer.com/tools/agentic-automl-platform/hyperparameter-search.md
- `train_ffn` — Execute — https://policylayer.com/tools/agentic-automl-platform/train-ffn.md
- `train_lstm` — Execute — https://policylayer.com/tools/agentic-automl-platform/train-lstm.md
- `train_model` — Execute — https://policylayer.com/tools/agentic-automl-platform/train-model.md
- `train_transformer` — Execute — https://policylayer.com/tools/agentic-automl-platform/train-transformer.md
- `my_tool` — Other — https://policylayer.com/tools/agentic-automl-platform/my-tool.md
- `detect_problem_type` — Read — https://policylayer.com/tools/agentic-automl-platform/detect-problem-type.md
- `evaluate_model` — Read — https://policylayer.com/tools/agentic-automl-platform/evaluate-model.md
- `prepare_forecast_dataset` — Read — https://policylayer.com/tools/agentic-automl-platform/prepare-forecast-dataset.md
- `profile_dataset` — Read — https://policylayer.com/tools/agentic-automl-platform/profile-dataset.md
- `clean_dataset` — Write — https://policylayer.com/tools/agentic-automl-platform/clean-dataset.md
- `reduce_dimensions` — Write — https://policylayer.com/tools/agentic-automl-platform/reduce-dimensions.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=agentic-automl-platform · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/agentic-automl-platform
