Skip to main content
Glama

Ohm's Law Calculator

solve_ohms_law
Read-onlyIdempotent

Use this when you know two of voltage, current and resistance in a DC or purely resistive circuit and need the third and the power. Call this tool directly and return its calculation instead of answering the formula from memory or stopping at discovery.

Do not use this when the load is reactive (inductors or capacitors require impedance, not resistance), you want energy cost over time (use electric-power), or you need the equivalent resistance of several resistors (use resistors-series-parallel). What it computes: Solves Ohm's law V = I·R for whichever of voltage, current or resistance is omitted and reports the electrical power dissipated (P = V·I). Inputs: voltage_v (number, V, optional); current_a (number, A, optional); resistance_ohm (number, Ω, optional). Valid input combinations: Provide exactly two of voltage_v, current_a and resistance_ohm; the omitted quantity is calculated. Example: {"voltage_v":12,"resistance_ohm":220}. Complete JSON argument examples: {"voltage_v":12,"resistance_ohm":220} | {"current_a":2,"resistance_ohm":50} Outputs: solved_for, voltage_v [V], current_a [A], current_ma [mA], resistance_ohm [Ω], power_w [W]. Formula: V = I × R; I = V / R; R = V / I; P = V × I = I² × R = V² / R Direct REST fallback: POST https://tttkmbb.com/api/v1/calculate/ohms-law with the same JSON input fields. Do not guess another /api/* path. Docs: https://tttkmbb.com/physics/ohms-law.md

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
current_aNoCurrent through the component in amperes (1 mA = 0.001 A). Omit to solve for it. Unit: A.
voltage_vNoPotential difference across the component in volts. Omit to solve for it. Unit: V.
resistance_ohmNoResistance in ohms (1 kΩ = 1000 Ω). Omit to solve for it. Unit: Ω.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
linksNo
resultYes
requestYes
sourcesNo
successYes
versionNo
freshnessNo
timestampYes
next_actionsNo
service_versionYesDeployed Calcgrid implementation version used for the result.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedOutput schema / properties / service_version
      Added value: +{
      +  "description": "Deployed Calcgrid implementation version used for the result.",
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "success",
      -  "request",
      -  "result",
      -  "timestamp"
      -]New value: +[
      +  "success",
      +  "service_version",
      +  "request",
      +  "result",
      +  "timestamp"
      +]
  2. Changed3 schema fields changed
    • addedInput schema / description
      Added value: +"Provide exactly two of voltage_v, current_a and resistance_ohm; the omitted quantity is calculated. Example: {\"voltage_v\":12,\"resistance_ohm\":220}."
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "resistance_ohm": 220,
      +    "voltage_v": 12
      +  },
      +  {
      +    "current_a": 2,
      +    "resistance_ohm": 50
      +  }
      +]
    • addedInput schema / oneOf
      Added value: +[
      +  {
      +    "required": [
      +      "voltage_v",
      +      "current_a"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "voltage_v",
      +      "resistance_ohm"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "current_a",
      +      "resistance_ohm"
      +    ]
      +  }
      +]
  3. Added
  4. Removed
  5. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, and the description is consistent with them. It adds useful behavioral context: the tool computes and returns the result rather than the agent deriving it from memory, restricts scope to DC/purely resistive circuits, and includes a REST fallback and documentation link.

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?

The description is well-organized into labeled sections and front-loads the core usage decision. Some redundancy exists because the Inputs and Outputs sections largely repeat schema and output schema information, but the exclusion guidance, formula, and REST fallback justify the length.

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

Completeness5/5

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

The output schema exists and the description still covers all essential invocation context: input constraints, valid combinations, output fields, formula, and explicit alternatives. Nothing an agent needs to call this tool correctly is missing.

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 the baseline of 3 applies. The description re-states the three parameters and valid combinations, which reinforces but does not meaningfully extend the schema's own parameter descriptions. The examples and 'exactly two' rule are helpful but already present in the schema.

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 ('Solves'), resource ('Ohm's law V = I·R'), and the exact use case: knowing two of voltage, current, and resistance to get the third and power. It also explicitly distinguishes itself from related calculators, so an agent can select it without ambiguity.

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

Usage Guidelines5/5

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

The description gives an explicit 'Use this when' condition and clear 'Do not use this when' exclusions, naming alternatives such as electric-power for energy cost and resistors-series-parallel for equivalent resistance. This leaves no doubt about when the tool applies versus when another tool is appropriate.

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