Skip to main content
Glama

singularis_solve_heat

Solve the 1D/2D heat or diffusion equation by stepping an initial field forward in time, for thermal spread or Black-Scholes option pricing.

Instructions

Solve the heat (diffusion) equation u_t = D * laplacian(u) on a 1D or 2D grid, stepping an initial field forward in time; the same equation prices options after a change of variables (Black-Scholes) and models thermal spread. Use instead of writing a stencil loop whenever steps * cells is large. Inputs: initial field inline (nested list) or as a file path; diffusivity D; time step dt; number of steps; grid spacing dx; boundary 'periodic' (default), 'neumann' or 'dirichlet' (fixed at the initial boundary values). Returns the final field (inline or as a .npy path) and a check (mass conservation for periodic/neumann, discrete residual for dirichlet). Cost scales with steps * cells.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dtNo
dxNo
pathNo
stepsNo
initialNo
boundaryNoperiodic
diffusivityNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.3

TDQS

A4.4/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 well: it discloses boundary-condition semantics ('dirichlet' fixed at initial boundary values), the default ('periodic'), what is returned (final field plus a conservation/residual check), and the cost model ('scales with steps * cells'). It omits stability/CFL constraints, which matter for a diffusion stepper, and any failure modes.

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 equation, then usage, then inputs, then returns, then cost — a logical progression. It is dense but every clause carries information; the only mild redundancy is the return-value sentence, which overlaps the output schema.

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 7-parameter numerical solver with an output schema, the description covers inputs, output, boundary variants, and computational cost, which is nearly everything an agent needs. The notable remaining gap is numerical stability guidance (relationship between dt, dx, and D) and expected failure behavior on stiff parameters.

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?

Schema description coverage is 0%, yet the description maps every one of the 7 parameters: initial (nested list inline or file path), diffusivity D, dt, steps, dx, and boundary. Critically it supplies the valid boundary values and defaults the schema leaves as a bare string, and explains what 'dirichlet' means operationally, fully compensating for the empty schema descriptions.

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+resource ('Solve the heat (diffusion) equation u_t = D * laplacian(u) on a 1D or 2D grid'), names the mathematical model, and clarifies the operational scope (stepping an initial field forward in time). It also notes the same equation underlies Black-Scholes pricing and thermal spread, so an agent understands both the literal and applied purpose without opening the schema.

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 a concrete use condition ('use instead of writing a stencil loop whenever steps * cells is large') and two application domains, which tells the agent when this beats hand-rolling numerics. It does not, however, contrast against numerical siblings such as singularis_blur or singularis_fft, which could plausibly serve overlapping diffusion-like workloads.

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