Skip to main content
Glama

Evaluate

evaluate
Read-onlyIdempotent

Evaluate mathematical expressions: arithmetic, algebra, trigonometry, statistics. Returns computed result. E.g., "2+2", "sin(pi/2)", "sqrt(16)", "mean([1,2,3])". Use when you need to calculate or simplify math.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "expression": "2 + 3 * 4"
    },
    "name": "evaluate"
  }
}

Input Schema

NameRequiredDescriptionDefault
expressionYesMathematical expression to evaluate (e.g., "2 + 3 * 4", "sqrt(16)", "sin(pi/2)", "det([1,2;3,4])")

Output Schema

NameRequiredDescriptionDefault
resultYesThe computed result of the expression
expressionYesThe mathematical expression that was evaluated

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "expression": {
      +      "description": "The mathematical expression that was evaluated",
      +      "type": "string"
      +    },
      +    "result": {
      +      "description": "The computed result of the expression",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "expression",
      +    "result"
      +  ],
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "expression": "2 + 3 * 4"
      +  },
      +  {
      +    "expression": "sin(pi/2)"
      +  }
      +]
  3. First observed

TDQS

A4.3/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 that it 'Returns computed result' and lists supported domains, giving useful behavioral context without contradicting 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 compact and front-loaded, stating the purpose immediately, then adding a return note, examples, and usage guidance in just a few sentences. No wasted words.

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?

Given a simple single-parameter tool with rich annotations and an output schema, the description covers purpose, usage, and examples sufficiently. It is complete for the tool's complexity.

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 input schema fully documents the single 'expression' parameter with examples, and the description repeats similar examples. Since schema coverage is 100%, the description adds no additional parameter meaning beyond the schema.

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 uses a specific verb 'Evaluate' and clearly names the resource ('mathematical expressions') plus domains (arithmetic, algebra, trigonometry, statistics). This distinguishes it from sibling tools like convert_units and various research tools.

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

Usage Guidelines4/5

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

Explicitly states 'Use when you need to calculate or simplify math,' providing a clear trigger condition. It does not mention when not to use it or alternatives, but the guidance is clear and actionable.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.