Skip to main content
Glama

decide_choice

Select the best candidate from provided options by evaluating context against criteria, returning calibrated probabilities and abstaining when confidence is low.

Instructions

Select the single best candidate for the state, with calibrated probabilities.

state: dict of context to evaluate. candidates: the allowed options (strings). criteria: how to judge them (plain string or mapping). allow_abstain: when the best confidence is too low, value becomes UNKNOWN and tentative_value keeps the raw argmax. Returns ChoiceDecision JSON.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stateYes
criteriaNo
candidatesYes
allow_abstainNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations provided, the description carries the behavioral disclosure burden. It explains calibrated probabilities, the abstain mechanism (UNKNOWN plus tentative_value holding the raw argmax), and the JSON return type. This is strong transparency, though it does not clarify what 'calibrated probabilities' means in practice.

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?

The description is compact and front-loaded, stating the core purpose first and then efficiently defining each parameter and the abstain behavior. Every sentence adds useful information without redundancy.

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

Completeness4/5

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

Given the output schema exists and the description covers parameters, behavioral nuances, and the return type, the tool is callable by an agent. The main missing piece is explicit guidance on how this tool relates to the sibling tools decide_score, decide_noul, and decision_status.

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 description coverage is 0%, so the description must compensate, and it does: state is a dict, candidates are strings, criteria can be a string or mapping, and allow_abstain controls low-confidence behavior. The only gap is that the semantics of a mapping-valued criteria object are not fully specified.

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 uses a specific verb ('Select'), names the resource ('the single best candidate for the state'), and identifies the output type ('ChoiceDecision JSON'). It is clearly about candidate selection and distinguishes this from scoring/status siblings, though it does not explicitly name alternatives.

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?

The description provides clear context for when to use the tool: given a state and allowed candidates, choose the best one according to criteria. It also explains the abstain option and output behavior. However, it does not explicitly state when not to use this tool or name sibling alternatives.

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