Skip to main content
Glama
Bristlecone2026

Bristlecone Logic Utilities

eval_expression

Read-onlyIdempotent

Evaluate arithmetic and boolean expressions inside an AST sandbox to prevent calculation errors, while blocking arbitrary code execution.

Instructions

Deterministically evaluates arithmetic, mathematical, and logical expressions inside an AST-isolated sandbox. Prevents LLM calculation errors while strictly blocking arbitrary code execution. Use for reliable numerical calculations and boolean logic. Do not use for executing arbitrary Python statements or importing external libraries.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
expressionYesA valid mathematical, arithmetic, or boolean expression string (e.g. '((150 * 12) / 4) + 18.5').

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
successYes
expressionYes

Schema Changelog

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

  1. First observedv0.3.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false. The description adds valuable context about determinism, AST sandboxing, and blocking arbitrary code execution, which explains the tool's safety and reliability beyond the annotations. It does not contradict annotations.

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?

The description is three concise sentences with no redundancy. It front-loads the primary action and purpose, then follows with usage guidance and exclusions. Every sentence adds value without unnecessary detail.

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?

With a single well-documented parameter, an output schema, and annotations covering safety, the description is complete. It provides usage constraints, examples, and safety details, leaving no gaps for correct invocation.

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 single 'expression' parameter is fully described in the schema (100% coverage) with an example. The tool description reinforces accepted expression types but adds no new semantics beyond the schema, so the baseline score of 3 is appropriate given the high schema coverage.

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 clearly states the tool's function: it deterministically evaluates arithmetic, mathematical, and logical expressions in an AST-isolated sandbox. It uses a specific verb ('evaluates') and resource ('expressions') and distinguishes itself from general code execution by explicitly blocking arbitrary code. No ambiguity or tautology.

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

Usage Guidelines5/5

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

The description explicitly states when to use the tool ('reliable numerical calculations and boolean logic') and when not to use it ('executing arbitrary Python statements or importing external libraries'). This provides clear guidance for an agent to select this tool over alternatives, even though siblings are unrelated.

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/Bristlecone2026/bristlecone-logic'

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