Skip to main content
Glama

jev_tiered_gate

Route decisions by confidence into automate, review, or escalate tiers using two thresholds. Fails closed on NaN confidence and runs locally without API calls.

Instructions

Two-threshold confidence routing (automate / review / escalate).

confidence >= high -> high_label, >= low -> middle_label, otherwise low_label. Non-finite thresholds raise ValueError; a NaN confidence escalates (fail closed). Local and deterministic — no API call. provider is validated against the registry; the gate is provider-agnostic.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "choice": "<choice>",
      "confidence": "<confidence>"
    },
    "name": "jev_tiered_gate"
  }
}

Input Schema

NameRequiredDescriptionDefault
lowNo
highNo
choiceYes
providerNojev
low_labelNoescalate
confidenceYes
high_labelNoautomate
middle_labelNoreview

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.2

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations at all, the description carries the full burden and does well: it declares the tool local and deterministic with no API call, discloses that non-finite thresholds raise ValueError, and states the fail-closed behavior (NaN confidence escalates). What it omits is ordering constraints (e.g. what happens when low >= high) and any statement about side effects or state.

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

Conciseness5/5

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

Front-loaded with the routing rule, then edge cases, then the provider note — every sentence adds information and none restates another. Code-formatted identifiers make the threshold mapping scannable.

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

Completeness3/5

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

An output schema exists, so return values need not be explained here, but with 8 parameters at 0% schema coverage and no annotations the description should define `choice` and the relationship between low and high. Two required/vital pieces of information are left for the agent to guess.

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

Parameters3/5

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

Schema description coverage is 0%, so the description must compensate for 8 parameters. It explains low, high, confidence, the three label parameters, and that provider is validated against the registry — but the required `choice` parameter is never mentioned in either the description or the schema title, leaving a mandatory input undefined.

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?

Opens with a specific verb-phrase and resource: "Two-threshold confidence routing (automate / review / escalate)", and the threshold-to-label mapping is spelled out exactly. The only gap is sibling differentiation — jev_confidence_gate exists and is never referenced, so an agent must infer the difference itself.

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

Usage Guidelines3/5

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

Usage is implied by the mechanics (route a confidence score into one of three buckets) rather than stated. There is no explicit when-to-use / when-not-to-use guidance and no pointer to the closely named alternative jev_confidence_gate, so routing between the two is left to inference.

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