Skip to main content
Glama

max_eval

Execute raw MAXScript in a live 3ds Max session and return the last expression’s value as JSON. Use it for custom scene operations that structured tools do not cover.

Instructions

Execute raw MAXScript in the live Max session and return the resulting value.

This is the escape hatch for everything the structured tools do not cover. The code runs verbatim (no wrapper is added), so write a complete expression and wrap multi-statement code in ( ... ). The value of the last expression is serialized back to JSON:

Integer/Float -> number, String -> string, Point3 -> [x,y,z], Array -> array (first 2000 items), node/material/anything else -> its name.

Nothing is auto-saved and no undo block is opened for you. Wrap writes in undo "label" on ( ... ) when you want them reversible.

Args: code: MAXScript source. Multi-statement code must be wrapped in ( ). timeout_seconds: how long to wait before giving up (Max may still be busy).

Input Schema

NameRequiredDescriptionDefault
codeYes
timeout_secondsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.5

TDQS

A4.6/5.0
Behavior5/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 unusually well: code runs verbatim with no wrapper, nothing is auto-saved, no undo block is opened, and writes must be wrapped in `undo "label" on ( ... )` to be reversible. It also discloses that a timeout does not necessarily stop Max, which is a critical operational caveat an agent would otherwise miss.

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 purpose, then behavior, then the serialization table, then args — a sensible order. The mapping list is long but each entry conveys a real return conversion; the trailing 'Args' block mildly repeats schema titles while adding genuine semantics.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, so the description supplies the return-value mapping (Integer->number, String->string, Point3->[x,y,z], Array truncated at 2000 items, objects->name). Combined with the undo/autosave caveats, an agent has everything needed to call this correctly.

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 the description must compensate and largely does: `code` is documented as verbatim source requiring `( ... )` wrapping for multi-statement input, and `timeout_seconds` is explained as a give-up point rather than a hard kill. No detail on valid ranges or defaults beyond the schema's 30, which is a small gap.

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 (execute raw MAXScript) and resource (live Max session), plus the return contract. The line 'escape hatch for everything the structured tools do not cover' positions it against the entire family of structured siblings at once.

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 clear selection rule: use this when no structured tool covers the need. It does not name specific alternatives (e.g. when to prefer max_python or max_check over raw eval), so the routing is directional rather than exhaustive.

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