Skip to main content
Glama

Precision, Recall and F1 Calculator

precision-recall-f1-calculator
Read-onlyIdempotent

Use this when a user asks about their ML model precision, recall, F1 score, or F-beta score. Takes precision and recall as fractions from 0 to 1 and an optional beta weight. Returns F1, F-beta, and interpretation of the precision-recall tradeoff.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
betaNobeta used by this deterministic tool.
recallYesrecall used by this deterministic tool.
precisionYesprecision used by this deterministic tool.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
betaYes
f1_scoreYes
next_stepYes
f_beta_scoreYes
next_step_urlYes
why_follow_upYes
interpretationYes
affiliate_contextNo
computation_basisYes
precision_recall_gapYes
precision_recall_balanceYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedOutput schema / properties / beta
      Added value: +{
      +  "type": "number"
      +}
    • addedOutput schema / properties / precision_recall_gap
      Added value: +{
      +  "type": "number"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "computation_basis",
      -  "f1_score",
      -  "f_beta_score",
      -  "interpretation",
      -  "next_step",
      -  "next_step_url",
      -  "precision_recall_balance",
      -  "why_follow_up"
      -]New value: +[
      +  "beta",
      +  "computation_basis",
      +  "f1_score",
      +  "f_beta_score",
      +  "interpretation",
      +  "next_step",
      +  "next_step_url",
      +  "precision_recall_balance",
      +  "precision_recall_gap",
      +  "why_follow_up"
      +]
  2. Changed8 schema fields changed
    • addedInput schema / properties / beta / description
      Added value: +"beta used by this deterministic tool."
    • addedInput schema / properties / beta / examples
      Added value: +[
      +  1
      +]
    • addedInput schema / properties / precision / description
      Added value: +"precision used by this deterministic tool."
    • addedInput schema / properties / precision / examples
      Added value: +[
      +  1
      +]
    • addedInput schema / properties / recall / description
      Added value: +"recall used by this deterministic tool."
    • addedInput schema / properties / recall / examples
      Added value: +[
      +  1
      +]
    • addedOutput schema / properties / computation_basis
      Added value: +{
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "f1_score",
      -  "f_beta_score",
      -  "interpretation",
      -  "next_step",
      -  "next_step_url",
      -  "precision_recall_balance",
      -  "why_follow_up"
      -]New value: +[
      +  "computation_basis",
      +  "f1_score",
      +  "f_beta_score",
      +  "interpretation",
      +  "next_step",
      +  "next_step_url",
      +  "precision_recall_balance",
      +  "why_follow_up"
      +]
  3. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "affiliate_context": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "affiliate": {
      +          "type": "string"
      +        },
      +        "cta_label": {
      +          "type": "string"
      +        },
      +        "disclosure": {
      +          "type": "string"
      +        },
      +        "framing": {
      +          "type": "string"
      +        },
      +        "posture": {
      +          "enum": [
      +            "secondary"
      +          ],
      +          "type": "string"
      +        },
      +        "slot_id": {
      +          "type": "string"
      +        },
      +        "url": {
      +          "type": "string"
      +        },
      +        "variant": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "affiliate",
      +        "cta_label",
      +        "disclosure",
      +        "framing",
      +        "posture",
      +        "slot_id",
      +        "url",
      +        "variant"
      +      ],
      +      "type": "object"
      +    },
      +    "f1_score": {
      +      "type": "number"
      +    },
      +    "f_beta_score": {
      +      "type": "number"
      +    },
      +    "interpretation": {
      +      "type": "string"
      +    },
      +    "next_step": {
      +      "type": "string"
      +    },
      +    "next_step_url": {
      +      "type": "string"
      +    },
      +    "precision_recall_balance": {
      +      "type": "string"
      +    },
      +    "why_follow_up": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "f1_score",
      +    "f_beta_score",
      +    "interpretation",
      +    "next_step",
      +    "next_step_url",
      +    "precision_recall_balance",
      +    "why_follow_up"
      +  ],
      +  "type": "object"
      +}
  4. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  5. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources