Skip to main content
Glama
filing-agent

filing-agent

by chensirui3

calculate

Read-only

Evaluates arithmetic exactly for computed filing figures using named variables in expressions, supporting +, -, *, /, powers, parentheses, abs, round, min, max, sum, avg and sqrt.

Instructions

Evaluate arithmetic exactly. Use it for every computed figure. Give each input number a name in variables and use the names in the expression, e.g. expression '(capex_2018 / revenue_2018) * 100' with variables capex_2018=1577 and revenue_2018=32765. Supports + - * / **, parentheses, abs, round(x, digits) (half-up), min, max, sum, avg and sqrt.

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>",
      "variables": "<variables>"
    },
    "name": "calculate"
  }
}

Input Schema

NameRequiredDescriptionDefault
variablesYesEvery input number, each with a name.
expressionYesArithmetic over the variable names.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, and the description adds real behavioral detail beyond them: exact (non-floating-point) evaluation and half-up rounding semantics for round. It does not say what happens on invalid expressions or unknown variable names, so it is not fully transparent.

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 core purpose and the usage rule are front-loaded in the first two sentences, and the example immediately follows to anchor the parameter convention. The trailing operator list is dense but each item is functional information with no filler.

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?

For a two-parameter, no-output-schema tool, this covers purpose, calling convention, supported syntax, and rounding behavior. The remaining gap is the return value shape and error behavior (e.g., division by zero or undefined variable), which the absent output schema would otherwise have supplied.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description goes further by showing the relationship between the two params: variables are named inputs whose names must appear in the expression, plus the constraint that values carry no commas or units. The worked example makes the calling convention unambiguous.

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 and resource ('Evaluate arithmetic exactly') and enumerates the supported grammar (+ - * / **, parentheses, abs, round, min, max, sum, avg, sqrt), so an agent knows precisely what capability this provides. It is clearly distinguishable from the data-retrieval siblings, which return figures rather than compute them.

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?

'Use it for every computed figure' is an explicit, directive rule about when to use it, effectively telling the agent not to do mental math. It stops short of naming exclusions (e.g., unit conversion, symbolic algebra, or non-numeric work), which keeps it from a 5.

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