Skip to main content
Glama
Hybrid Recursive Ladder

Hybrid Recursive Ladder

Bucket calculation

ladder_calc
Idempotent

Bucket a time-series range into fixed intervals and compute sums, averages, or meter deltas, returning anomaly codes for missing, repeated, or reset readings.

Instructions

Bucket [start, end) and compute one value per bucket.

    ``dimension`` is the bucket size (minute/hour/day/month, both edges
    must align to it) and ``rule`` is one of:

    * ``sum`` — bucket sum;
    * ``avg`` — bucket mean of sums/counts, row totals are means of means;
    * ``meter_delta`` — next bucket's first reading minus this bucket's;
      the last bucket reads one bucket past ``end``; missing anchors,
      repeated readings and meter resets come back as ``anomaly`` codes
      (``no_current_reading``, ``no_next_reading``, ``same_reading``,
      ``negative_delta``, ``non_numeric``) instead of values.

    ``mode`` is ``tb`` (source only), ``mixed`` (local first) or
    ``local`` (offline).
    

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": {
      "series": "<series>",
      "start": "<start>",
      "end": "<end>"
    },
    "name": "ladder_calc"
  }
}

Input Schema

NameRequiredDescriptionDefault
endYes
modeNotb
ruleNosum
startYes
seriesYes
dimensionNoday
materializeNo
verify_on_readNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

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

The description adds substantial behavior beyond the annotations: bucket alignment constraints, sum/avg semantics, meter_delta behavior, and anomaly codes are all disclosed. The annotations already cover safety traits such as idempotent, non-destructive, and non-read-only, and the description is consistent with them. It stops short of explaining side effects or behavior for materialize and verify_on_read.

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?

The description is front-loaded with the core action and then uses bullet structure for the rule options, making it easy to scan. It is dense but justified by the complexity of the calculation modes and anomaly behavior. Formatting is slightly rough due to embedded indentation, but there is little wasted wording.

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?

The tool is complex: eight parameters, annotations, and an output schema. The description covers the core calculation model well and need not explain return values because an output schema exists. However, it omits important operational context for series, materialize, and verify_on_read, so it is adequate rather than complete.

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 description coverage is 0%, so the description has to carry parameter meaning. It explains dimension, rule, mode, and the start/end bracket semantics well, but it leaves required series, materialize, and verify_on_read undocumented. The description compensates for several important parameters but not all eight.

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?

The description clearly states a specific operation: bucket the [start, end) range and compute one value per bucket. It also defines the core rule behaviors, so the tool is easy to distinguish from a generic sum or verify tool. It does not explicitly differentiate itself from siblings such as ladder_sum or ladder_decompose, which keeps it just below a 5.

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?

Usage is implied by the bucketing description and by the rule/mode options, but there is no explicit when-to-use or when-not-to-use guidance. It does not name alternatives or describe conditions for choosing ladder_calc over ladder_sum, ladder_decompose, or ladder_verify. The result is minimum-viable guidance.

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