Skip to main content
Glama

solve_laplace_2d

Solve the 2D Laplace equation on a unit square with constant Dirichlet edges using red-black Gauss-Seidel iteration, returning the solution grid, convergence status, and iteration count.

Instructions

Solve u_xx + u_yy = 0 on the unit square with constant Dirichlet edges.

Red-black Gauss-Seidel is iterated until max|u_new-u_old| < tol. If
``max_iter`` is reached first the call still succeeds, with
``converged = False`` and the achieved ``iterations`` count. The full grid
is saved as .npz; the returned grid is downsampled to at most 100x100.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nxYes
nyYes
tolNo
topYes
leftYes
rightYes
bottomYes
max_iterNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations, the description fully discloses the algorithm (red-black Gauss-Seidel), convergence criterion (max|u_new-u_old| < tol), non-failure on max_iter with converged=False and iterations count, and output handling (full grid saved as .npz, returned grid downsampled to at most 100x100). This gives an agent rich behavioral context beyond the schema.

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?

The description is front-loaded with the core purpose, followed by behavior and output details in a compact, well-structured manner. Every sentence adds necessary information without redundancy.

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?

Given the complexity of a numerical PDE solver with no annotations and no output schema, the description covers the method, convergence failure mode, and return handling. It is nearly complete, though explicit definitions for nx/ny and the edge-parameter mapping would make it fully self-contained.

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

Parameters3/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. It explains tol and max_iter and implies left/right/top/bottom are Dirichlet edge values, and nx/ny are grid dimensions via 'unit square' and 'grid', but it never explicitly defines nx, ny, or maps each edge parameter, leaving significant semantic gaps.

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 mathematical problem: solving u_xx + u_yy = 0 on the unit square with constant Dirichlet edges. This clearly identifies the verb, resource, and domain, distinguishing it from siblings like solve_laplace_3d and other PDE solvers.

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?

The equation and domain provide clear context for when to use this tool, and no exclusions are stated. It does not explicitly name sibling alternatives such as solve_laplace_3d or solve_pde_1d, but the mathematical scope makes the intended use unambiguous.

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