Skip to main content
Glama

Grid Convergence

grid_convergence
Read-only

Computes the Grid Convergence Index from two or three systematically refined mesh results and returns the percentage band containing the mesh-independent answer.

Instructions

Grid Convergence Index — how much of a solved number is the MESH (no solver, milliseconds). Give it the same quantity solved on 2-3 systematically refined meshes, FINEST FIRST, and it fits the observed order of convergence, Richardson-extrapolates to zero cell size, and returns the percentage band inside which the mesh-independent answer lies. Roache's GCI as codified in ASME V&V 20.

This is the honest band_pct for a result with no analytic oracle — the verification counterpart to every validation ratio in the solver families — and it is deliberately family-agnostic: three CFD drag coefficients, three FEM peak stresses and three modal frequencies are all valid input; only you know what the mesh size means. cfd_mesh_independence_submit is the driver that produces the three CFD values for you.

Describe the meshes with either cell_sizes (representative cell length, same order as values) or cell_counts (total cells; h = N^(-1/dimensions)). With THREE values the order is measured and the safety factor is 1.25; with TWO it must be assumed (assumed_order, default 2.0) and the factor triples to 3.0 — a much wider band, which is the honest price of the missing mesh.

Watch three fields before quoting the band: monotonic False means the solutions oscillate and the extrapolation is not meaningful (usually an unconverged level, not a mesh effect); asymptotic_ratio far from 1 means the meshes have not reached the range where the theory holds, so gci_pct is a LOWER bound; order_clamped True means the fitted order was unphysical and a clamped one was used.

Returns {n_levels, values, cell_sizes, refinement_ratios, observed_order, order_used, order_clamped, extrapolated_value, gci_pct, gci_coarse_pct, band_pct, relative_error_pct, monotonic, asymptotic_ratio, safety_factor, converged_fit, fidelity, warnings}.

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": {
      "values": "<values>"
    },
    "name": "grid_convergence"
  }
}

Input Schema

NameRequiredDescriptionDefault
valuesYes
workspaceNoRun this call in this named workspace
cell_sizesNo
dimensionsNo
cell_countsNo
assumed_orderNo

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.9/5.0
Behavior5/5

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

Goes well beyond the readOnlyHint/openWorldHint annotations, disclosing safety factors (1.25 for three levels, 3.0 for two), how monotonic/asymptotic_ratio/order_clamped affect interpretation, and that gci_pct becomes a lower bound when meshes are not asymptotic. This is exactly the behavioral context an agent needs before quoting a result.

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 what the tool is and how to call it before the interpretive caveats, and every paragraph carries actionable content. There is some flourish ('the honest price of the missing mesh'), but it does not obscure the core instructions.

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?

No output schema exists, but the description enumerates the return fields and explains the key ones (monotonic, asymptotic_ratio, order_clamped, band_pct), giving the agent enough to interpret results correctly. Combined with the input guidance, nothing needed to call or read the tool is missing.

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

Parameters5/5

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

Despite only 17% schema description coverage, the description explains the critical params: values must share order with cell_sizes, the cell_sizes vs cell_counts choice, how dimensions maps counts to h = N^(-1/dimensions), and assumed_order's default of 2.0 for the two-level case. It fully compensates for the schema gap (workspace is the only param handled by 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?

States a specific verb and resource — computes the Grid Convergence Index from 2-3 refined-mesh solutions — and spells out the operation (fits observed order, Richardson-extrapolates, returns a band). It distinguishes itself from siblings by naming cfd_mesh_independence_submit as the driver that produces the CFD values, so an agent can tell what this is versus the solvers.

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?

Explicitly says when to use it (no analytic oracle, family-agnostic inputs across CFD/FEM/modal) and gives the conditions that change behavior (2 values vs 3 values, order measured vs assumed). It also routes to cfd_mesh_independence_submit when the agent needs the three CFD values produced for it.

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