Skip to main content
Glama
sudeepan

mathematica-wstp

by sudeepan

evaluate

Run Wolfram Language code in a persistent kernel with state preserved across calls. On timeout, aborts the evaluation but keeps all definitions so you can retry smaller pieces.

Instructions

Evaluate Wolfram Language code in the persistent kernel. State carries between calls. On timeout the evaluation is ABORTED but the kernel and all its definitions survive, so you can retry a smaller piece.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
timeoutNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/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 burden. It transparently discloses that state persists across calls and that a timeout aborts the evaluation but preserves kernel definitions. This is significant behavioral context that goes beyond a generic 'evaluate' tool. It does not cover error handling or result format, but the core stateful and timeout behaviors are clearly stated.

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 two sentences with no filler. The core purpose is front-loaded ('Evaluate Wolfram Language code in the persistent kernel'), and the timeout behavior is added concisely. Every sentence contributes necessary operational information.

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 that an output schema exists (which presumably describes return values), the description covers the key operational aspects: persistent state and timeout behavior. It does not discuss error handling or how to interact with the 'abort' sibling, but for a basic evaluation tool this is reasonably complete.

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 adds meaning to 'code' by implying it is Wolfram Language code and that state from previous calls is available. For 'timeout', it explains the consequence of a timeout but does not specify units or range. This adds some value but does not fully cover the parameter semantics.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool evaluates Wolfram Language code in a persistent kernel, giving a specific verb and resource. It does not explicitly differentiate from the sibling 'evaluate_cells', but the emphasis on 'persistent kernel' and the absence of cell context makes it distinct enough for an agent to infer the intended use.

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?

The description provides useful guidance on statefulness and timeout behavior: state carries between calls, and on timeout the evaluation is aborted but the kernel survives, advising a retry with a smaller piece. However, it does not explicitly compare against alternatives like evaluate_cells or batch, leaving the agent to infer when to prefer this tool.

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