Skip to main content
Glama

femm_field_stats

Compute area-weighted field statistics over a finite-element mesh: magnetic |B| min/max/mean/RMS/p95 and saturation area, or other physics per element/nodes. Filter by region or material group.

Instructions

Area-weighted statistics of the main field over the mesh, from the bulk arrays (fast, no file). Magnetics: |B| min/max/mean/rms/p95, saturated area fraction (|B| >= threshold, default 1.6 T) and number of elements above 2 T. Other physics: |D|, |F| or |J| per element and V/T at nodes. region: 'all' or 'group:N[,M]' (give the blocks of one material a group number with femm_add_block_label(group=N) to get per-material stats).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
regionNoall
sessionNomain
thresholdNo

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?

No annotations are provided, so the description carries the full disclosure burden, and it does substantial work: data source (bulk arrays), a performance trait (fast, no file), and a concrete default (threshold 1.6 T). It omits prerequisite/error behavior (e.g., whether a solution must exist first), so it is not exhaustive.

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-loads the core purpose in the first clause, then layers in return values and parameter syntax with no filler sentences. Dense notation ('|B| min/max/mean/rms/p95') is efficient, though the single long paragraph is slightly heavy.

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?

With no output schema and no annotations, the description must cover both intent and outputs, and it names the exact returned statistics and the saturation metric. The main gap is that it never states the execution prerequisite (a solved mesh/session) for a results tool.

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 coverage is 0%, so the description must compensate, and it does for two of three parameters: 'region' syntax ('all' or 'group:N[,M]') and 'threshold' (default 1.6 T, saturation cutoff). 'session' is left unexplained, which keeps it from a 5.

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 computation (area-weighted field statistics over the mesh) and a specific data source ('from the bulk arrays (fast, no file)'), which distinguishes it from file-based or integral siblings such as femm_block_integral and femm_point_values. The agent knows exactly what this produces.

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 use: the 'fast, no file' note signals when to prefer it, and it explains how to obtain per-material stats via femm_add_block_label(group=N). It stops short of naming explicit alternatives to avoid or stating prerequisites (e.g., a solved mesh).

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