Skip to main content
Glama

josephus

Calculate the survivor’s position in a circle of n people where every k-th person is eliminated, solving the Josephus problem for given n and k.

Instructions

Solve the Josephus problem: find the survivor in a circle of n people eliminating every k-th.

Input Schema

NameRequiredDescriptionDefault
kYesEvery k-th person is eliminated
nYesNumber of people in the circle

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.11

TDQS

A3.6/5.0
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 of behavioral disclosure. It states the core computation but omits key behavior: input constraints (e.g., n and k must be positive integers), what the returned survivor representation is (position number? 1-based or 0-based?), and any edge-case handling. For a tool with zero annotation coverage, this is a significant gap.

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, front-loaded sentence with zero wasted words. It clearly states the problem and the result to be found. Nothing is missing for conciseness.

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 simple algorithmic tool with no output schema and no annotations, the description gives the essential problem definition and the two required inputs. It is nearly complete, though it could state the return value's format (e.g., the survivor's position number) to remove ambiguity. Given the tool's simplicity, this is a minor 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%, and both parameters already have clear descriptions in the schema. The tool description essentially restates the same meanings ('circle of n people', 'eliminating every k-th') without adding constraints or format details beyond the schema. Baseline 3 is appropriate when the schema does the heavy lifting.

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 names a specific problem (the Josephus problem) and states the exact computational goal: find the survivor in a circle of n people eliminating every k-th. This is a precise verb+resource statement that lets an agent distinguish it from generic math or algorithm tools. No sibling tool covers the same problem, so explicit differentiation is unnecessary.

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 description implies usage by defining the problem, so an agent can infer this tool should be used when a user asks to solve the Josephus problem. However, it provides no explicit when-to-use guidance, no prerequisites, and no alternative tools to consider. This is adequate but leaves usage context implicit.

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

Deploy Server

Other Tools