Skip to main content
Glama

Calculate a metric

calculate_metric
Read-onlyIdempotent

Evaluate a formula entry, such as OEE, with your inputs. Get the variable symbols from get_entry first.

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": {
      "id": "<id>",
      "inputs": "<inputs>"
    },
    "name": "calculate_metric"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesOperational entry id, e.g. 'oee'
inputsYes

Output Schema

NameRequiredDescriptionDefault
idYes
unitNo
inputsYes
resultYes
warningsYes
expressionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered and the bar is lower. The description's contribution is the ordering constraint with get_entry; it says nothing about failure behavior when inputs do not match the formula's symbols, which is the main behavioral risk here.

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?

Two sentences, action first, prerequisite second, no filler. Nothing in it is redundant with the title.

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 values need no explanation, and annotations carry the safety profile. What is left uncovered is how to obtain the entry id in the first place (search_entries) and how input keys map onto the formula's symbols, both of which matter for a nested-object parameter.

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 coverage is 50%: 'id' is documented with an example, but 'inputs' has no description in the schema at all. The description partially compensates by implying the keys are variable symbols obtained from get_entry, yet it does not state that values are numbers, that keys must match the formula exactly, or what happens on unknown keys.

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?

Specific verb ("Evaluate") plus the resource (a formula entry, exampled as OEE) and an explicit reference to get_entry as the source of variable symbols, which separates it from the other read-style siblings. The phrase "formula entry" remains somewhat domain jargon, so an agent still has to infer that this is the computation step in a get_entry-then-calculate flow.

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

Usage Guidelines3/5

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

"Get the variable symbols from get_entry first" gives a real prerequisite and names the sibling, which is more than most descriptions. It never states when to prefer this over check_limits or compare, nor what to do if an input variable is missing.

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.

Resources