Skip to main content
Glama

UK Data: Code utilities

is_power

Read-onlyIdempotent

Checks if a given number is an exact integer power of a specified base. Returns true if num = base^k for some non-negative integer k, false otherwise. (cost: 1 credit)

Input Schema

NameRequiredDescriptionDefault
numNonumber, required, the number to check
baseNonumber, required, the base to test against

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already establish that this is a safe read-only, idempotent operation. The description adds meaningful behavioral detail by defining the exact truth condition with non-negative integer exponents and by disclosing the one-credit cost.

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 definition is three short sentences, front-loads the core purpose, then gives the exact condition and cost. There is no redundant or filler wording.

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?

For a simple mathematical predicate with full schema coverage, annotations, no output schema, and only two parameters, the description provides enough information to invoke it correctly. It defines the operation, return condition, and cost.

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 the input schema already defines num and base. The description adds value by making the relationship explicit: num is checked against base^k for non-negative integer k.

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 states a specific operation: checking whether a number is an exact integer power of a specified base, and it gives the exact condition num = base^k. This is clear, though it does not explicitly distinguish itself from the nearby specialized tool is_power_of_two.

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

Usage Guidelines3/5

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

Usage is implied by the mathematical definition, so an agent can infer when to call it. However, the description gives no explicit when-to-use guidance, exclusions, or comparison with alternatives such as is_power_of_two or is_perfect_square.

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