Skip to main content
Glama

jev_next_step

Read-only

Decide what an agent should do next after a stalled step: continue, retry, change approach, ask user, or done, with reasoning signals to avoid premature completion.

Instructions

Decide what an agent should do next after a step: continue / retry / change_approach / ask_user / done, with the reasoning signals behind it. Use it when a loop has stalled and you are about to guess: a tool returned an error you are unsure how to read, a search came back thin, you have tried the same thing more than once, or you are about to tell the user you are finished. It is deliberately conservative about done: the verdict is downgraded to continue unless the completion signal comes back a confident yes, so a premature 'task complete' turns into another step instead. retry is capped in code — pass attempts and it becomes change_approach once you have tried enough. Pass result truncated to the part that matters (the error text, the head of the output); a huge dump lowers accuracy. Pass last_step as what you actually ran, and goal as the user's objective rather than the current sub-task. Read reasons before acting: it names every code-level override, which is usually more informative than the verdict itself.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
goalYesThe objective being pursued, in the user's terms.
resultYesWhat came back: tool output or error text. Truncate it yourself to the part that matters.
attemptsNoHow many times this same step has already been attempted, including the one just made. Default 1.
last_stepYesWhat was just attempted, concretely.
thresholdsNoOverride the server's configured gating thresholds for this call only.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
nextYesWhat to do, after code-level overrides.
modelYesThe versioned model id that actually answered.
usageYesToken usage. Jev charges for input tokens only.
reasonsYesWhy, including every override code applied to the model's choice.
signalsYesRaw P(yes) for each supporting judgment. Near 0.5 means unsure.
confidenceYesHow peaked that distribution is.
latency_msYesWall-clock time for the underlying API call(s), including retries.
thresholdsYes
choice_probabilitiesYesThe model's distribution over the five next-step options.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.4

TDQS

A4.7/5.0
Behavior5/5

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

Annotations declare readOnlyHint=true and openWorldHint=true, and the description adds substantial behavioral context: the conservative downgrade of 'done' to 'continue' unless confident, the code-level cap on 'retry' that escalates to 'change_approach', and the guidance to read 'reasons' for code-level overrides. This goes well beyond what annotations provide and fully discloses the tool's decision logic.

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 well-structured and front-loaded with the core purpose, then usage triggers, then behavioral nuances, then parameter tips. Every sentence carries information; there is no filler. It reads as a coherent set of instructions rather than a verbose paragraph, earning the top score.

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?

With an output schema present and the description covering return values (verdict and reasons), edge cases (conservative 'done', retry capping), parameter handling, and even a directive to read 'reasons' before acting, the tool is fully specified for an agent. No critical gap remains for a decision tool of this complexity.

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 100%, so all five parameters are documented. The description adds meaningful guidance beyond the schema: truncate 'result' to the relevant part, pass 'goal' as the user's objective rather than sub-task, and pass 'last_step' as what was actually run. It also explains the 'thresholds' object as an override. This enriches parameter usage without being redundant.

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 description opens with a precise statement of purpose: decide the next step among five named outcomes (continue/retry/change_approach/ask_user/done) with reasoning signals. This is a specific verb+resource and clearly distinguishes from siblings like jev_evaluate (assessment) or jev_gate_action (approval), none of which overlap with next-step decisioning.

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 explicitly lists when to use the tool: stalled loops, unreadable errors, thin search results, repeated attempts, or imminent task-complete claims. This is clear context for invocation. It implies when not to use (when the loop is healthy) but does not name alternatives or explicitly state exclusions, so it falls short of the top score.

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