Skip to main content
Glama

isPrime

isPrime

Check if a positive integer is a prime number. This tool determines whether a given number is divisible only by 1 and itself.

Instructions

判断一个正整数是否为素数

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nYes
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions the input must be a positive integer, but doesn't disclose behavioral traits such as performance characteristics (e.g., handling large numbers), error handling for non-positive inputs, or the return format (e.g., boolean or structured result).

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, efficient sentence in Chinese that directly states the tool's function. It's front-loaded with no unnecessary words, making it easy to parse quickly.

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

Completeness2/5

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

Given the tool's mathematical nature, no annotations, no output schema, and low schema coverage, the description is incomplete. It lacks details on return values, error conditions, and performance limits, which are important for an agent to use it correctly in varied contexts.

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

Parameters2/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. It adds that 'n' must be a positive integer, which clarifies beyond the schema's broad integer range (-2147483648 to 2147483647). However, it doesn't explain edge cases (e.g., 1 or 2) or validation details, leaving gaps.

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's purpose: '判断一个正整数是否为素数' (determine if a positive integer is prime). It specifies the verb (determine) and resource (positive integer), though it doesn't explicitly differentiate from siblings like 'isPerfectNumber' or 'primeFactorization' beyond the obvious semantic difference.

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?

No guidance is provided on when to use this tool versus alternatives. The description doesn't mention sibling tools like 'isPerfectNumber' for other number properties or 'primeFactorization' for detailed prime analysis, nor does it specify prerequisites or constraints beyond the positive integer requirement.

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/xiaobenyang-com/1777316659204099'

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