Skip to main content
Glama

femm_block_integral

Integrate over selected FEMM blocks by points or group, then evaluate requested block integral codes for magnetics, electrostatics, heat flow, or current flow results.

Instructions

Integrate over blocks: select the blocks containing points and/or every block in group (list of group numbers), then evaluate xo_blockintegral for each code. Magnetics codes (manual 3.7.1): 0 A.J, 1 A, 2 field energy (J), 3 hysteresis/lamination loss, 4 resistive loss (W), 5 area, 6 total loss, 7 total current, 8/9 integral of Bx/By, 10 volume, 11/12 Lorentz force x/y, 15 Lorentz torque, 17 coenergy, 18/19 weighted stress tensor force x/y (N, select the moving part surrounded by air), 22 stress tensor torque (N m), 24 R^2... Other physics: see femm_api_get('eo_blockintegral') etc. Defaults: magnetics [2,17,5,10,7]; electrostatics [0,1,2]; heatflow [0,1,2]; currentflow [0,1,4,5]. Planar results are per the problem depth (total, not per metre).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codesNo
groupNo
pointsNo
sessionNomain

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and reveals substantial behavior: the block-selection rule, per-physics default codes, result units (J, W, N, N m), the 'select moving part surrounded by air' caveat for stress-tensor forces, and the planar-length caveat that results are totals not per metre. It omits any mention of the session parameter or requirement that a solved problem exists.

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?

Front-loaded with the core action and scoping rule, then the code table. The code listing is long but each entry carries load-bearing meaning (units, selection caveats). Slightly dense but no filler sentences.

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 4-param tool with no annotations and no output schema, the description supplies enough to call it correctly, including per-physics defaults and result semantics. The unexplained session parameter and the unstated dependency on a prior solve are the only notable gaps.

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 description coverage is 0%, so the description must compensate and largely does: it defines group as a list of group numbers, points as the basis for block selection, and codes as the integration quantities with an explicit magnetics code table and defaults. Only the session parameter is left unexplained.

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?

Opens with a specific verb+resource ('Integrate over blocks') and immediately explains block selection via points/group. It is distinguishable from siblings like femm_line_integral and femm_point_values by naming the underlying xo_blockintegral operation and the block-scoped selection model.

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?

Provides strong context on when to use each code (per-physics default code sets for magnetics/electrostatics/heatflow/currentflow) and how blocks are chosen (points vs group). It does not explicitly state when to prefer this over femm_line_integral or name exclusions, so it stops short of full when/when-not guidance.

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