Skip to main content
Glama

shunting_yard

Converts an infix math expression into postfix RPN and evaluates the result, enabling reliable parsing and calculation of formulas.

Instructions

Convert an infix math expression to postfix (RPN) and evaluate it.

Input Schema

NameRequiredDescriptionDefault
expressionYesInfix math expression (e.g. '3 + 4 * 2')

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.11

TDQS

B3.4/5.0
Behavior2/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. It does not disclose supported operators beyond the example, error handling for invalid expressions, return type, determinism, or edge-case behavior.

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?

A single front-loaded sentence with no filler. It states the operation and result directly, which is appropriately sized for a simple one-argument utility.

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 simple pure-function math tool with a fully described single parameter, the description is nearly sufficient. However, without an output schema, it could clarify what evaluation returns or how invalid input is handled.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema fully documents the single expression parameter with an example. The description adds no additional parameter meaning beyond the schema's own 'infix math expression' wording, so the baseline of 3 applies.

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 and resource: convert an infix math expression to postfix (RPN) and evaluate it. This precisely identifies the tool's unique computational function and differentiates it from generic math or calculator siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No when-to-use guidance, no alternatives, no prerequisites, and no error conditions are given. The description only states the operation, leaving the agent to infer that this is the tool for infix-to-postfix conversion and evaluation.

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