Skip to main content
Glama
liangjunglj-cpu

Almond MCP

execute_rhino_script

Compile and execute C# RhinoCommon scripts in Rhino 8 to create geometry, returning created object GUIDs or error details.

Instructions

Sends a C# RhinoCommon script to the Rhino 3D Bridge for compilation and execution. The script is compiled by Roslyn inside Rhino and executed natively as JIT-compiled C#.

The script MUST define a class with a static Run method that returns created GUIDs:

public class Script
{
    public static List<Guid> Run(RhinoDoc doc)
    {
        var guids = new List<Guid>();
        // Use doc.Objects.AddSphere(), doc.Objects.AddBrep(), etc.
        // Append each GUID: guids.Add(guid);
        return guids;
    }
}

Available namespaces (auto-imported if not present): System, System.Collections.Generic, System.Linq, Rhino, Rhino.Geometry, Rhino.DocObjects

Args: script: C# source code containing a class with public static List Run(RhinoDoc doc). Returns: JSON with status (success/compile_error/runtime_error), created GUIDs, or error trace.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scriptYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations exist, so the description carries full burden. It discloses compilation process, execution nature (JIT, native), error types (compile/runtime), and return format. However, it lacks explicit mention of potential destructive side effects on the Rhino document, which is important for an execution tool.

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?

The description is relatively long but well-organized with a code block and namespace list. It is front-loaded with the purpose. Every sentence adds value; no redundant phrases. Slightly verbose but justified by complexity.

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 the tool's complexity (C# script execution) and no output schema (but described in text), the description covers input format, code requirements, execution process, error handling, and output structure. It is fully sufficient for an agent to invoke correctly.

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 coverage is 0%, so the description must compensate. It extensively explains the 'script' parameter: must be C# source with a specific class structure, includes a code example, lists auto-imported namespaces, and describes return value format. This far exceeds basic schema details.

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 uses specific verbs like 'sends', 'compilation', 'execution' to clearly state the tool's action on a resource (C# script in Rhino). The code example and namespaces further clarify the resource. No sibling tool has similar script execution intent, making it distinct.

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 implies when to use: to execute custom C# in Rhino. It provides code requirements and namespaces, but does not explicitly contrast with alternatives (e.g., 'run_gh_definition'). Still, the context is clear enough for an agent to decide.

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/liangjunglj-cpu/almond-mcp'

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