Skip to main content
Glama
Prasadpodaparthi

SketchUp MCP Server

eval_ruby

Run arbitrary Ruby code inside SketchUp to build geometry, edit models, or query the scene. Returns the last expression's string, enabling structured results and error messages.

Instructions

Evaluate arbitrary Ruby code in SketchUp.

Enabled by default; the user can close the gate in the SketchUp extension's Settings. When closed, the SketchUp side returns JSON-RPC code -32010 with a user-facing message explaining how to re-enable it. This wrapper surfaces that message as a plain string so the LLM can repeat it to the user verbatim — without the [code] prefix that format_error would otherwise add.

Returns the .to_s of the LAST evaluated expression; stdout (puts) is NOT captured. End scripts with an explicit expression — e.g. a final result.to_json — to get structured data back. Errors return "[code] message" with the Ruby exception class and message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesRuby code to evaluate inside SketchUp

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.1

TDQS

A3.9/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 behavioral burden and does so well: it discloses the settings gate, the exact JSON-RPC error code (-32010), that stdout is not captured, that only the last expression's .to_s returns, and the error format. These are exactly the traits an agent needs. It stops short of 5 only because it doesn't state permission/security implications beyond the gate.

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 core purpose, then organized into gate behavior, return semantics, and error format. Each sentence earns its place and there is minimal redundancy. Slightly dense but appropriate for a tool with subtle execution 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?

Given an output schema exists, the description needn't enumerate return fields, and it still explains the critical return mechanics (last expression, no stdout). With no annotations, it fully compensates by covering the settings gate, error codes, and error string format. Nothing an agent needs to invoke this correctly appears missing.

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 100% and there is a single required 'code' parameter well documented in the schema. The description adds real semantic value beyond the schema by explaining what the code should return (last expression's .to_s, not stdout) and the recommended output convention. Baseline for a 1-param tool with full coverage would be 3-4; the return-semantics guidance justifies the 4.

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?

States a specific verb+resource: evaluate arbitrary Ruby code in SketchUp. This is clear and distinguishable from the sibling modeling tools (chamfer_edge, create_component, etc.), which perform CAD operations rather than code execution. It lacks an explicit 'use this for X, not Y' routing statement, keeping it from a 5.

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 implies usage through the return-value mechanics (e.g., end with result.to_json), which hints at when this tool is useful for structured data. However, it never states when to choose this tool over siblings, nor any explicit conditions of use. Usage is inferable but not spelled out.

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