Skip to main content
Glama

fairness_metrics

Compute fairness metrics from prediction data to assess bias and compliance. Use optional ground truth for equalized odds and calibration metrics.

Instructions

Calculate fairness metrics from prediction data. Input format: comma-separated values with group labels.

Provide predictions as 'group:prediction' pairs separated by commas. Example: "male:1,female:0,male:1,female:1,male:0,female:0"

If ground_truth is provided, use same format for actual outcomes to compute equalized odds and calibration metrics.

Args: predictions: Comma-separated group:prediction pairs (e.g. "male:1,female:0,male:1"). ground_truth: Optional comma-separated group:actual pairs for outcome-based metrics. api_key: Optional MEOK API key for pro tier.

Behavior: This tool is read-only and stateless — it produces analysis output without modifying any external systems, databases, or files. Safe to call repeatedly with identical inputs (idempotent). Free tier: 10/day rate limit. Pro tier: unlimited. No authentication required for basic usage.

When to use: Use this tool when you need to assess, audit, or verify compliance requirements. Ideal for gap analysis, readiness checks, and generating compliance documentation.

When NOT to use: Do not use as a substitute for qualified legal counsel. This tool provides technical compliance guidance, not legal advice.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
predictionsYes
ground_truthNo
api_keyNo
Behavior5/5

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

With no annotations provided, the description fully carries the burden. It states the tool is read-only, stateless, idempotent, includes rate limits (10/day free, unlimited pro), and clarifies authentication needs (optional api_key, no auth required for basic usage).

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

Conciseness3/5

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

The description is well-structured with sections but somewhat verbose; it repeats the comma-separated format twice. Every sentence adds value, but could be tightened.

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

Completeness2/5

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

No output schema exists, and the description does not specify the return format or structure of the fairness metrics (e.g., list, dictionary, scores). This leaves the agent guessing about what the tool actually returns.

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

Parameters4/5

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

Schema coverage is 0%, so description compensates well by explaining the comma-separated 'group:prediction' format for predictions and ground_truth, and the purpose of api_key for pro tier. Could add accepted value ranges or constraints.

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

Purpose4/5

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

The description clearly states 'Calculate fairness metrics from prediction data' and provides specific metrics (equalized odds, calibration), distinguishing it from sibling tools like detect_bias or regulatory_check by focusing on metric calculation rather than detection or checks.

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

Usage Guidelines4/5

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

Explicit 'When to use' and 'When NOT to use' sections provide context for compliance audits and gap analysis, and warn against using as legal advice. However, no direct comparison to sibling tools is given.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/CSOAI-ORG/bias-detection-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server