Skip to main content
Glama

Combine two congruences

bpj_discrete_congruence_pair
Read-onlyIdempotent

Combine two congruences using the generalized Chinese remainder theorem and detect incompatible residues.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "r1": "<r1>",
      "m1": "<m1>",
      "r2": "<r2>",
      "m2": "<m2>"
    },
    "name": "bpj_discrete_congruence_pair"
  }
}

Input Schema

NameRequiredDescriptionDefault
m1Yes
m2Yes
r1Yes
r2Yes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

B3/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive, and closed-world, so safety is covered. The description adds genuine context by disclosing the generalized-CRT behavior and that incompatible residues are detected. It does not say whether an incompatibility produces an error, a flag, or a distinct return shape, which is the key behavioral question for this tool.

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?

A single front-loaded sentence with no filler; the verb, method, and the incompatibility behavior all appear up front. It is dense but not padded.

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

Completeness3/5

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

For a simple pure-computation tool with strong annotations, this is close to adequate, but there is no output schema and the description never states what is returned — a combined residue and modulus, or a failure indication — nor what happens in the incompatible case. That omission is material for an agent trying to consume the result.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%; the schema only supplies titles like "First modulus" and numeric bounds. The description adds nothing about what r1/m1/r2/m2 represent, the residue-to-modulus pairing, or the 1..1e9 range constraints, so it fails to compensate for the coverage gap.

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 and resource ("Combine two congruences") plus the method (generalized CRT) and a secondary capability (detecting incompatible residues). This is far more informative than a tautology, though it never names or contrasts with a sibling such as bpj_discrete_modular_inverse or bpj_discrete_bezout.

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 explicit when-to-use or when-not-to-use guidance and no pointer to an alternative tool. The only implicit signal is that the tool takes exactly two congruences, which an agent must infer from the schema rather than the prose.

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.