Skip to main content
Glama

add_math_expression_node

Adds a Math Expression node to a Blueprint, converting a formula like (A+B)*C into a collapsed graph with input pins for each variable and a Return Value output.

Instructions

Add a Math Expression node (collapsed graph from a math formula string).

From Ch. 15: The Math Expression node creates a collapsed graph based on a typed expression. Variable names in the expression become input pins, and the result is the Return Value output pin.

Example from the book: (PlayerLuck/5) * (EnemyHP/30) Creates input pins PlayerLuck and EnemyHP.

Args: blueprint_name: Blueprint to add the node to expression: Mathematical expression string (variables become input pins) node_position: [X, Y] graph position

KB: see knowledge_base/01_BLUEPRINT_FUNDAMENTALS.md#overview Example: add_math_expression_node(blueprint_name="/Game/MCP_Test/BP_Example")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
expressionNo(A + B) * C
node_positionNo
blueprint_nameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.9/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full disclosure burden. It does disclose key behaviors: creates a collapsed graph, variables become input pins, result is the Return Value output pin. But it omits mutation implications (it modifies a blueprint), any connection/compile side effects, and failure behavior. With zero annotation coverage, more disclosure would be warranted.

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?

Well-structured with a clear purpose statement, an Args block, and an example. The purpose is front-loaded. Some redundancy exists — the 'From Ch. 15:' and 'Example from the book:' citations add context but are slightly extraneous; the example itself is genuinely useful for illustrating the variable-to-pin conversion.

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?

For a moderate-complexity mutation tool (3 params, 1 required), the description covers all parameters, gives a worked example, and points to a knowledge base reference. An output schema exists to cover return values. It is fairly complete, though it could mention whether the added node is auto-connected or left floating, and any blueprint-save implications.

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 0%, so the description must compensate, and it does. The Args section documents all three parameters: blueprint_name (Blueprint to add the node to), expression (with the variable-to-pin behavior), and node_position ([X, Y] graph position). This adds real meaning beyond the bare schema, especially for expression and node_position which have no schema descriptions.

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+resource ('Add a Math Expression node') and explains its distinctive semantics: it creates a collapsed graph from a formula string, with variables becoming input pins and a Return Value output pin. This clearly differentiates it from the many math-related siblings like add_math_node and add_arithmetic_operator_node.

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 explains the tool's behavior well (collapsed graph, variable-to-pin mapping) which implies when to use it, and includes a concrete example. However, it never explicitly distinguishes when to choose this over the math-node siblings (add_math_node, add_arithmetic_operator_node, add_abs_node), so an agent gets no explicit exclusion or alternative guidance.

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

Deploy Server

Other Tools