Skip to main content
Glama

solve_laplace_3d

Solve the 3D Laplace equation on a unit cube with Dirichlet boundaries using Jacobi iteration, returning the potential field grid.

Instructions

Solve u_xx + u_yy + u_zz = 0 on the unit cube with Dirichlet faces.

``x0``/``x1`` are the values on the faces x=0 and x=1 (likewise for y and
z). A vectorised Jacobi iteration is run until max|u_new-u_old| < tol; if
``max_iter`` is reached first the call still succeeds with
``converged = False`` and the achieved ``iterations``. Grids above 500,000
cells are rejected. The full (z, y, x) grid is saved to .npz and returned
downsampled to at most 20 points per axis.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nxYes
nyYes
nzYes
x0No
x1No
y0No
y1No
z0No
z1No
tolNo
max_iterNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/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 does so well: it names the Jacobi iteration, the convergence criterion max|u_new-u_old| < tol, the non-convergence behavior (still succeeds with converged=False plus iterations), and a hard grid-size rejection above 500,000 cells. It stops short of stating the exact form of the rejection (exception vs. error result) or any runtime expectations.

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 compact and front-loads the governing equation, then layers behavior and I/O limits in short declarative sentences. Each sentence earns its place; the only slight cost is that grid-dimension semantics are assumed rather than stated.

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?

There is no output schema, so the description must describe returns — and it does: the full (z,y,x) grid saved to .npz, the downsampled return capped at 20 points per axis, and the converged/iterations fields. Combined with the tolerance, iteration cap, and grid limit, this is close to complete, with only the precise return type/shape and rejection mechanism left implicit.

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% across 11 parameters, so the description must compensate. It explains the six boundary-value params (x0/x1/y0/y1/z0/z1 as face values), tol as the convergence threshold, and max_iter's role in the non-convergence path. However, nx/ny/nz are never explicitly defined as grid dimensions nor tied to the 500,000-cell limit, and defaults are omitted.

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 operation (solving u_xx + u_yy + u_zz = 0), the domain (unit cube), and the boundary condition type (Dirichlet faces). This clearly distinguishes it from siblings like solve_laplace_2d and solve_heat_3d, which differ in dimension or PDE.

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

Usage Guidelines3/5

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

Usage is implied by the boundary-value framing (use it when you need a Dirichlet Laplace solution on the unit cube), but there is no explicit when-to-use/when-not guidance and no routing to alternatives such as solve_laplace_2d for lower dimensions. Adequate but with clear gaps.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.