Skip to main content
Glama

Eval

eval

Evaluate a MicroPython expression on a connected board and return its result, enabling quick runtime checks and calculations over serial.

Instructions

Evaluate a MicroPython expression and return its result.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "expression": "<expression>"
    },
    "name": "eval"
  }
}

Input Schema

NameRequiredDescriptionDefault
timeoutNoAbsolute wall-clock timeout in seconds (default 30).
expressionYesPython expression to evaluate (e.g. "2 + 2").
read_timeoutNoPer-character idle timeout in seconds (default 10).

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

C2.9/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 burden and does not meet it. It says the result is returned but omits whether evaluation can mutate device state, what happens on exceptions or timeouts, and whether expressions run against live hardware — all material for an evaluator that may execute arbitrary code on a device.

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?

A single front-loaded sentence with no filler or redundancy. It is efficient, though its brevity is part of why guidance and behavioral detail are absent rather than a sign of polish.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return-value description is not required, and the three parameters are fully documented in the schema. Still, for an arbitrary-code-evaluation tool with zero annotations, the absence of error behavior and sibling differentiation leaves notable gaps.

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?

Schema description coverage is 100%, with both timeout parameters fully documented inline (defaults of 30s and 10s, and their meanings). The description adds nothing beyond the schema, so the baseline of 3 applies.

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?

The description states a specific verb and resource ("Evaluate a MicroPython expression") plus the outcome ("return its result"), which is clearer than the tautological title "Eval". It does not, however, distinguish itself from close siblings such as exec or run, so an agent must infer the expression-vs-statement boundary.

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?

There is no when-to-use guidance at all: no statement that this is for single expressions rather than multi-statement scripts (exec), no note on device readiness or prerequisites, and no exclusions. The agent is left to guess among eval, exec, and run from names alone.

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