Skip to main content
Glama
stand-out-of-my-sun

Diogenes Context Compression, Code Patching & Deterministic Solver MCP

Shunting-Yard Algebraic Math, Financial IRR/NPV & Descriptive Stats Solver

evaluate_deterministic_math
Read-onlyIdempotent

Evaluate algebraic and scientific formulas exactly, compute NPV, IRR, Kelly criterion, and dataset stats without relying on LLM floating-point guesswork.

Instructions

Evaluates algebraic and scientific formulas via a Shunting-Yard AST parser and computes exact financial NPV, Newton-Raphson IRR, Kelly criterion, and dataset stats. Use when computing exact arithmetic formulas, cashflow NPV/IRR, or descriptive statistics without LLM floating-point guesswork; for running two-sample A/B hypothesis tests between control and treatment arms, use evaluate_ab_statistical_significance instead. Read-only edge call (32 KB, 60 RPM): accepts 'expression' ('precision_digits' defaults to '2_decimals'), uses '?demo=true' or L402 (40 sats); HTTP 400 if invalid.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
expressionYesAlgebraic or scientific formula to evaluate (e.g. '(125000 * (1 + 0.0725/12)^60) - 98450.50').
precision_digitsNoDecimal rounding precision for returned numbers; defaults to '8_decimals' when omitted.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
expressionYesEvaluated mathematical expression.
exact_resultYesDeterministic floating-point result of the expression.
dataset_statisticsYesOptional count, mean, median, std_dev, min, and max when a dataset array is supplied.
financial_analysisYesOptional NPV, Newton-Raphson IRR, and Kelly fraction when financial parameters are supplied.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations cover the safety profile (readOnly, idempotent, non-destructive, closed-world), and the description adds substantive traits they do not carry: a 32 KB payload cap, a 60 RPM rate limit, demo/L402 (40 sats) access, and an HTTP 400 failure mode. That is meaningful operational context beyond the structured fields.

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?

Front-loaded with the purpose and tightly packed; the when-to-use, alternative, and operational constraints are all in a compact block. Slightly dense with parenthetical jargon (Shunting-Yard AST, Newton-Raphson, L402) but every sentence carries actionable information.

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?

An output schema exists, so return-format explanation is unnecessary, and the description covers access, limits, and error behavior. The one flaw is the contradictory precision default, which leaves the agent with conflicting guidance on an actual input parameter.

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

Parameters2/5

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

Schema description coverage is 100%, so the baseline would be 3, but the description actively misleads: it says 'precision_digits' defaults to '2_decimals' while the schema states it 'defaults to 8_decimals when omitted.' Supplying a wrong default is worse than staying silent, so this falls below the baseline.

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 ('Evaluates') and enumerates concrete resource classes: algebraic/scientific formulas, financial NPV/IRR, Kelly criterion, and dataset stats. It explicitly names the sibling it is not (evaluate_ab_statistical_significance) so an agent can distinguish it without opening either schema.

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?

Gives an explicit when ('exact arithmetic formulas, cashflow NPV/IRR, or descriptive statistics without LLM floating-point guesswork') and an explicit when-not with the alternative ('for two-sample A/B hypothesis tests... use evaluate_ab_statistical_significance instead'). This is exactly the routing information an agent needs.

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