Skip to main content
Glama

UK Data: Code utilities

is_rotation

Read-onlyIdempotent

Checks if one string is a rotation of another string by verifying if str1 appears in str2 concatenated with itself. Returns true if str1 is a rotation of str2, false otherwise. (cost: 1 credit)

Input Schema

NameRequiredDescriptionDefault
str1Nostring, required, first string to compare
str2Nostring, required, second string to check if it's a rotation of str1

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 declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false. The description adds the checking algorithm and a 1-credit cost, which is useful behavioral context beyond the annotations, though it does not state edge-case behavior such as case sensitivity or empty-string handling.

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 front-loaded, uses two tightly written sentences, and includes only relevant information: what is checked, how it is checked, the return value, and the cost.

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 two-parameter boolean predicate, the description covers the operation, return value, and cost, and the schema fully documents both inputs. It could be more complete by specifying edge-case semantics such as case sensitivity or empty-string treatment.

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 both parameters are already documented by the schema. The description clarifies the direction of the check by saying 'str1 appears in str2 concatenated with itself,' but it does not add syntax or format details beyond the schema baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: 'Checks if one string is a rotation of another string.' It also names the inputs and the boolean return, which distinguishes it clearly from sibling string predicates such as is_anagram and is_palindrome.

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?

The operation's purpose implies its usage, but the description gives no explicit when-to-use guidance, no exclusions, and no alternatives. For a simple predicate this is mostly adequate, but it leaves edge-case selection 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