Skip to main content
Glama
darshan-tools

darshan-tools

by Presciman

calc

Computes exact arithmetic expressions for Darshan I/O log analysis—operators, parentheses, unit constants, and aggregates—so results are calculated rather than estimated.

Instructions

Exact arithmetic. Use it for every computation instead of doing math in your head. Supports + - * / ** %, parentheses, lists, min max abs round sqrt log2 log10 sum mean, and the constants KiB MiB GiB TiB KB MB GB. Example: calc('1554195 / MiB / 0.0772').

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

Input Schema

NameRequiredDescriptionDefault
logNopath of an opened .darshan log (default: the one opened last)
expressionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations at all, the description carries the full behavioral burden. It discloses the expression grammar, supported functions, and unit constants plus a concrete example, which implies a side-effect-free pure evaluation, but it never states this explicitly, nor does it describe error behavior for malformed expressions or what the response looks like.

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?

Three short sentences, front-loaded with purpose and the usage directive, followed by a capability list and a single high-value example. Nothing is padded or redundant.

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?

For a two-parameter tool with no output schema, the description covers the expression language well and the example hints at a numeric return. The omission of the 'log' parameter's role and the lack of any statement about return shape or error handling leave meaningful gaps for an agent composing a call against a specific opened log.

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%. The description adds substantial meaning for 'expression' — operators, functions, constants, and a worked example — that the schema leaves as a bare string. However, the 'log' parameter is never mentioned, so an agent cannot learn from the description that expressions can likely reference values from an opened Darshan log, which is the tool's most consequential parameter relationship.

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 opens with a specific verb+resource statement ('Exact arithmetic') and immediately frames the tool as a calculator, which is unmistakably distinct from siblings like search, get, outline, or open_log. An agent knows exactly what capability this tool provides without opening the schema.

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 computation instead of doing math in your head' is explicit, actionable when-to-use guidance, and the supported-operator list clarifies the boundary of what it can evaluate. It stops short of stating when-not to use it or naming an alternative, but no sibling appears to offer competing arithmetic, so the gap is small.

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

Deploy Server

Other Tools