Skip to main content
Glama

EM Field

em_field
Read-only

Calculate exact magnetic field strength for a long straight wire or solenoid from current, distance, or turn density, returning values in tesla and millitesla without a solver.

Instructions

Exact magnetostatic field of the two canonical sources (NO solver): kind='wire' is the long straight wire B = μ₀·I/(2π·r) at distance_mm (Ampère's law); kind='solenoid' is the long-solenoid interior B = μ₀·μ_r·n·I with turns_per_m.

Returns {b_t, b_mt, …} (the field in tesla and millitesla).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "em_field"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindNowire
mu_rNo
current_aNo
workspaceNoRun this call in this named workspace
distance_mmNo
turns_per_mNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.7
    • addedInput schema / properties / workspace
      Added value: +{
      +  "default": "",
      +  "description": "Run this call in this named workspace",
      +  "title": "Workspace",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds useful behavioral context beyond that: the computation is analytic (no solver), the two source modes, and the return keys (b_t, b_mt) in tesla and millitesla. It doesn't state defaults or edge-case handling (e.g., r=0), a minor 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?

Front-loaded with the tool's identity and the two modes, then formulas, then return shape. Dense but every sentence carries essential physical or structural information; no filler.

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 6-param analytic tool with no output schema, the description supplies the return keys and units and explains the mode-dependent parameters, so an agent can call it correctly. Defaults (kind='wire', current_a=1, mu_r=1) are surfaced only via schema, not reinforced, which is the only notable gap.

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?

With only 17% schema description coverage, the description compensates well by explaining kind values ('wire'/'solenoid'), distance_mm (radius r), turns_per_m (n), and implicitly current_a (I) and mu_r (μ_r) via the formulas. The workspace and default values are not addressed, so it stops short of full coverage.

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?

States a specific verb and resource: exact magnetostatic field for the two canonical sources, with the governing formulas (B = μ₀·I/(2π·r) for wire; μ₀·μ_r·n·I for solenoid). 'NO solver' and formulas cleanly distinguish it from the numerical EM siblings like em_fullwave_submit and em_induction_submit.

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?

Gives clear context for when to use: only for the two canonical closed-form cases, explicitly 'NO solver' (implying a solver-based sibling is the alternative). However, it doesn't name a specific alternative tool or state exclusions such as 'for arbitrary geometry use em_fullwave_submit', leaving that inference to the agent.

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