Skip to main content
Glama

Choose an option with Jev

jev.choice
Read-only

Selects one option from defined criteria for a given state and returns the choice, per-option probabilities, and confidence; can include up to four images.

Instructions

Ask TypeSafe Jev to pick one option for some state. criteria maps option names to descriptions (or null), up to 255 options; include a "none" option when nothing may fit. Returns answer.choice, answer.probabilities per option and answer.confidence.

state is the content to judge (a string, or a JSON object/array). instructions must state the full question; refer to parts of structured state with backticked paths such as ticket.messages[0].text. model is optional. images (optional, up to 4 PNG, JPEG or WebP, 4 MiB each) are judged together with state; each is either { "path": "" } for a local file inside a directory the server allows (JEV_IMAGE_DIRS), or { "data": "data:image/png;base64,..." }. Only image-capable models accept images (for example cloudflare/clef or cloudflare/clef-flash through OpenRouter); other models reject them. Never put images inside state. To ask several questions about the same state, use jev.evaluate instead: it answers them in one request. provider is optional; this server offers only "typesafe".

Input Schema

NameRequiredDescriptionDefault
modelNo
stateYes
imagesNo
criteriaYes
providerNo
instructionsYes

Output Schema

NameRequiredDescriptionDefault
modelYesThe model that answered, usually a versioned ID
usageYes
answerYes
providerNoThe provider that answered

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already cover read-only and open-world traits, and the description adds return shape (`answer.choice`, `answer.probabilities`, `answer.confidence`), a hard limit of 255 options, image size/format limits of 4 images, PNG/JPEG/WebP, 4 MiB each, and the model-capability rejection behavior. It doesn't describe failure modes for oversized criteria or missing model access, but the constraints it does disclose go well beyond the annotations.

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

Conciseness4/5

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

The purpose and the return values are front-loaded, then parameters follow in a logical order. It is dense and packs image-handling detail into one long sentence, but essentially every clause — limits, path constraints, model capability — is load-bearing rather than filler.

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

Completeness5/5

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

For a 6-parameter tool with nested objects and an output schema, the description covers what the output schema cannot say on its own: the option cap, the 'none' pattern, the image rules and the single-question scope. Nothing an agent needs to invoke it correctly is missing.

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

Parameters5/5

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

With 0% schema description coverage the description must carry the whole burden, and it does: `criteria` is explained as a name-to-description map (or null), `state` as string or structured JSON, `instructions` as the full question with backticked paths like `ticket.messages[0].text`, and `images` entries as either a path inside JEV_IMAGE_DIRS or a base64 data URL.

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

Purpose5/5

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

The opening sentence states a specific verb and resource: 'Ask TypeSafe Jev to pick one option for some state', which tells an agent exactly what the tool produces. It is clearly separable from jev.evaluate, the multi-question sibling, which is named later in the text.

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

Usage Guidelines5/5

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

Explicit routing rules are given: 'include a "none" option when nothing may fit' and 'To ask several questions about the same state, use jev.evaluate instead'. It also states that only image-capable models accept images and that other models reject them, so the agent knows when this call should not be made.

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