Skip to main content
Glama

UK Data: Maths and statistics

is_power_of_two

Read-onlyIdempotent

Checks if a number is a power of two (2^n for some non-negative integer n). (cost: 1 credit)

Input Schema

NameRequiredDescriptionDefault
numNointeger, required, the number to check

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true and destructiveHint=false, so the safety profile is covered elsewhere. The description adds a genuinely useful non-annotation detail — the "cost: 1 credit" charge — plus the definitional constraint of non-negative n, but it does not say what the response looks like or how 0/1 are treated.

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?

One compact sentence with the core purpose front-loaded, followed by the precise definition and the cost note. No filler, no redundancy.

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 one-parameter boolean predicate with full schema coverage and annotations covering safety and idempotency, the description supplies what an agent needs plus the credit cost. The only remaining gap is the unspecified return value/edge-case behavior, which is minor for a tool this simple.

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% and the single parameter is documented as "integer, required, the number to check". The description adds no additional parameter meaning (e.g. accepted range, handling of negatives or string-formatted integers), so the baseline of 3 for a fully-covered schema applies.

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 names a specific verb+resource ("Checks if a number is a power of two") and pins the exact mathematical definition (2^n for some non-negative integer n), which inherently separates it from siblings like is_prime, is_perfect_square, and is_power. It never explicitly names those siblings, so the differentiation is left implicit.

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 and no reference to the closely related siblings (is_power, is_perfect_square) that an agent would have to choose between. Edge cases such as 0, 1, or negative input are not addressed, so selection and invocation are left entirely to inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources