Skip to main content
Glama

np_randint

Generate random integers between low (inclusive) and high (exclusive), with optional output shape.

Instructions

Return random integers from low (inclusive) to high (exclusive).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
lowYesLowest integers to be drawn (inclusive). If high is None, this is the upper bound.
highNoUpper bound (exclusive). If None, low=0 and this becomes high.
sizeNoOutput shape (int or tuple of ints).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

With no annotations, the description carries the full burden. It states the return type and bounds but does not explain behaviors like the effect when high is None (low becomes the upper bound and low defaults to 0), or that size can be an integer or tuple for multi-dimensional output. This is insufficient for a full understanding.

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 a single sentence of 12 words, front-loading the core purpose with no wasted words. Every element is essential for conveying the basic functionality.

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?

Given the presence of an output schema and the parameter descriptions covering 100% of parameters, the description is adequate but lacks completeness. It does not explain that the tool can generate arrays via the size parameter or the default behavior when high is None. For a random generation tool, this is a notable gap.

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 100%, so the baseline is 3. The description restates the inclusive/exclusive bounds but adds no new information beyond the parameter descriptions. It does not clarify parameter interactions or constraints beyond what the schema already provides.

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 clearly states the tool returns random integers from low (inclusive) to high (exclusive), distinguishing it from siblings like np_rand (uniform floats) and np_randn (normal floats). However, it does not mention that the output can be an array when the size parameter is provided, which is a key aspect.

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?

The description provides no guidance on when to use this tool versus alternatives, such as np_random_choice for sampling with replacement or np_arange for generating sequences. There is no mention of use cases or exclusions.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/daedalus/mcp-numpy'

If you have feedback or need assistance with the MCP directory API, please join our Discord server