Skip to main content
Glama

ACTION_RANDOM

Generates random integers, decimals, or booleans for automation workflows, with configurable ranges, variable output, and error handling.

Instructions

生成随机整数、小数或布尔值。输出:random_value, random_success。int 含两端,float 为 [min, max);min > max 时自动交换。。字符串参数支持 ${var} 插值;结果以变量快照 JSON 返回。

Input Schema

NameRequiredDescriptionDefault
maxNo最大值(只取整数部分)(默认 100)
minNo最小值(只取整数部分)(默认 0)
typeNo结果类型(默认 int)
requireNo执行后要求为 true 的变量名(如 click_success),不满足按出错处理
on_errorNo节点出错时:skip=跳过继续(默认),stop=停止整个工作流
output_varNo结果变量名(默认 random_value)
node_timeout_msNo单节点超时毫秒,0=不限;默认 30 分钟

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the full burden and does add real value: int is inclusive at both ends, float is [min, max), and min > max swaps automatically. However, it does not disclose permission/auth needs, rate limits, how require/on_error/timeout failures surface, or what random_success means on failure.

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?

It is front-loaded with the core purpose and stays to four short clauses, but there is a stray double period ('。。') and the trailing interpolation note feels appended rather than structured.

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?

For a 7-parameter tool with no output schema, the description covers the main output keys (random_value, random_success) and the range edge cases. Gaps remain on the control-flow parameters (require, on_error, node_timeout_ms) and on the failure semantics of random_success.

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 coverage is 100%, so the baseline is 3. The description earns some credit for clarifying range semantics (inclusive vs half-open) and the auto-swap rule, which the schema does not state, but it adds nothing about require, on_error, output_var, or node_timeout_ms.

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 first sentence states a specific verb and resource set: generate random int, float, or boolean values. That is recognizable against siblings such as ACTION_MATH, though the description never explicitly distinguishes itself from ACTION_MATH or ACTION_SET_VARIABLE.

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

Usage Guidelines2/5

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

There is no when-to-use guidance, no exclusions, and no routing to alternatives like ACTION_MATH. The only usage-adjacent content is the interpolation note and the default on_error behavior, which is context but not selection guidance.

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