Skip to main content
Glama

crypto.carmichael_lambda

Read-onlyIdempotent

Computes the Carmichael function λ(n) by factoring integers up to 10^14 and returns λ(n) plus the prime factorization for cryptographic and number-theory calculations.

Instructions

카마이클 함수 λ(n) = lcm(λ(p^k)) 를 구한다. n 은 1 이상 10^14 이하의 정수 문자열이며 시행 나눗셈으로 소인수분해하므로 한도를 넘으면 오류다. 결과 키는 lambda(정수 문자열)와 factorization 이다. λ(n) 은 φ(n) 의 약수이므로 둘을 혼동해 쓰지 않는다.

Input Schema

NameRequiredDescriptionDefault
nYes

Output Schema

NameRequiredDescriptionDefault
_metaNo서버가 붙이는 영수증(integrity), 엔진, 힌트
traceYes계산 근거(tool, formula, inputs, steps, output)
lambdaYes
factorizationYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare a safe, idempotent, closed-world read, so the description focuses on value-adds: the hard input ceiling, the failure mode above it, and the method (trial division) that explains the performance bound. It does not mention cost or response format beyond the key names, keeping it just below full marks.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four compact sentences ordered from purpose to input constraint to return keys to the sibling distinction, with no filler. Slightly dense but every sentence contributes information an agent needs.

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?

Even though an output schema exists, the description still names the result keys, and it covers the domain limit and error condition that the schema cannot express. Nothing essential is missing for a correct call, though a note on expected failure behavior for non-numeric input would round it out.

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 0% for the single parameter, so the description carries the burden and does so: it specifies that n is a string (not a number), the inclusive bounds 1 to 10^14, and the algorithmic reason for that bound. Only minor detail, such as handling of leading zeros or whitespace, is left unspecified.

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 computation with its formula (λ(n) = lcm(λ(p^k))), so there is no ambiguity about the resource involved. It also explicitly distinguishes itself from the nearest sibling, crypto.euler_totient, by noting that λ(n) divides φ(n) and that the two must not be confused.

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

Usage Guidelines4/5

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

It gives concrete applicability constraints — n must be an integer string in [1, 10^14] and is factored by trial division — and warns that exceeding the range is an error. The φ-vs-λ warning functions as a when-not-to-use note, though it stops short of naming the alternative tool by name.

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