Skip to main content
Glama

rasterize_expression

Render Wolfram Language expressions like plots, matrices, or formatted output as images without modifying notebooks. Specify expression and optional image size.

Instructions

Render a Wolfram Language expression as an image.

Useful for visualizing plots, matrices, or formatted output without modifying any notebook.

Args: expression: Wolfram Language expression to render image_size: Size of the resulting image in pixels

Examples: rasterize_expression("Plot[Sin[x], {x, 0, 2 Pi}]") rasterize_expression("MatrixForm[{{1, 2}, {3, 4}}]") rasterize_expression("Graphics[Circle[]]", image_size=200)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
expressionYes
image_sizeNo
Behavior3/5

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

No annotations are provided, so the description carries full burden. It states the tool does not modify notebooks, but does not disclose return format (e.g., image binary or URL), error behavior, or system-side effects.

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 brief yet includes key info and examples, front-loading the purpose. Every sentence contributes, with no wasted words.

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 tool's simplicity (2 parameters, no output schema), the description adequately covers what and how. However, it could mention return type or format for completeness.

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 coverage is 0%, so description must add meaning. The 'Args' section explains 'expression' as the Wolfram Language expression to render and 'image_size' as the image size in pixels, adding value beyond the schema's type-only information.

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 clearly states the tool renders a Wolfram Language expression as an image, using specific verbs and resource. It distinguishes from sibling tools like evaluate_cell (which evaluates but does not produce an image) or export_graphics (which exports existing graphics).

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 description explains it is useful for visualizing plots, matrices, or formatted output without modifying notebooks, providing clear context. However, it does not explicitly state when not to use it or list alternatives like evaluate_cell for non-visual results.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/AbhiRawat4841/mathematica-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server