Skip to main content
Glama

chinese_remainder_theorem

Solves a system of simultaneous congruences using the Chinese Remainder Theorem; provide remainders and moduli to compute the unique solution modulo their product.

Instructions

Solve a system of simultaneous congruences using the Chinese Remainder Theorem.

Input Schema

NameRequiredDescriptionDefault
moduliYesModuli for each congruence
remaindersYesRemainders for each congruence

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.11

TDQS

C2.9/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. It says nothing about the critical constraint that moduli must be pairwise coprime, what happens when they are not, or what form the result takes — all behavioral facts an agent needs for a CRT solver.

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?

A single sentence with zero filler, and the verb+technique are front-loaded. Nothing could be removed without losing information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no annotations and no output schema, the description is the only place to convey the coprimality requirement, the positional pairing of the two arrays, and the shape of the returned solution — and it covers none of them. Incomplete for a 2-required-parameter solver.

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 are simple arrays, so the baseline is 3. The description adds no meaning beyond the schema — it never states that remainders and moduli must be the same length or that entries are paired positionally.

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?

States a specific verb (Solve) and resource (a system of simultaneous congruences) plus the named technique, so the purpose is unambiguous. It doesn't differentiate itself from the near-duplicate sibling 'chinese_remainder' or from adjacent math tools like 'modular_arithmetic' and 'extended_gcd', so it falls short of a 5.

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 guidance on when to use this rather than 'chinese_remainder', 'modular_arithmetic', or 'extended_gcd', and no preconditions are stated. The only implied usage is the name of the theorem itself.

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