Skip to main content
Glama

Execute RPN Code

msfs_execute_calculator_code
Destructive

Run RPN calculator code in MSFS to read SimVars, manipulate L-vars, and trigger events. Specify read/execute mode to avoid misclassification of compound expressions.

Instructions

Execute RPN calculator code in the simulator.

Runs arbitrary RPN (Reverse Polish Notation) calculator code via the MobiFlight WASM bridge. Can read or write any variable type and perform complex operations. Requires the MobiFlight WASM extension.

The 'auto' mode's heuristic -- code starts with '(', ends with ')', and contains no '(>' -- misclassifies compound read expressions such as '(L:A) (L:B) max' as an execute, because they don't end in ')'. Pass mode='read' explicitly for those.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesRPN calculator code, e.g. '(A:PLANE ALTITUDE, feet)' to read a SimVar, '(L:MyCustomVar) 1 + (>L:MyCustomVar)' to increment an L-var, or '1 (>K:PARKING_BRAKES)' to trigger an event.
modeNo'read' returns a value, 'execute' runs the code for effect. 'auto' guesses from the syntax, which is unreliable for compound expressions.auto

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.0.1

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already mark this as destructive and non-read-only, and the description complements them by disclosing that it can read or write any variable type, execute arbitrary code, and that the auto mode has a known misclassification heuristic. This adds meaningful behavioral context beyond the annotations without contradicting them.

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?

Every sentence in the description earns its place: purpose, capability, prerequisite, and a critical mode-selection caveat. It is front-loaded with the core action and remains focused despite covering an important edge case.

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?

Combined with the rich input schema, annotations, and an output schema, the description provides everything an agent needs: what the tool does, the required extension, the arbitrary read/write capability, and precise guidance for the mode parameter. No critical operational detail is 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 description coverage is 100% and both parameters are already well documented with examples. The description adds extra semantic value by explaining the failure mode of mode='auto' and giving a concrete recommendation to pass mode='read' explicitly for expressions like '(L:A) (L:B) max'.

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 states a specific verb ('Execute'), a clearly defined resource ('RPN calculator code in the simulator'), and distinguishes this tool as a general-purpose bridge that can read or write any variable type. This differentiates it from narrower siblings like msfs_get_simvar or msfs_set_lvar.

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 gives clear context: it runs arbitrary RPN code, requires the MobiFlight WASM extension, and explicitly warns when to override the auto mode with mode='read' for compound read expressions. It does not name specific alternative tools, but the usage context is strong enough for an agent to choose it appropriately.

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

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/robin24/simconnect-mcp'

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