Skip to main content
Glama

Passage Data — cited environmental limits

Fill a DMR from monitoring rows

fill_dmr
Read-onlyIdempotent

What numbers go on a permit's DMR this period, computed from the plant's own daily results? The numbers a US NPDES permit's Discharge Monitoring Report asks for in one period, computed from the plant's own raw results (daily samples, flows): for each value due on the period's forms (EPA's national limits file) its statistic as EPA defines it (monthly average, daily maximum, weekly average over EPA's Sunday-to-Saturday weeks, geometric mean, loadings in lb/d from concentration x flow x 8.34, percent removal), the rows it was computed from, and EPA's violation rule's verdict against the limit. A value the rows cannot give is refused with its code (fill.no_column, fill.unit, fill.ambiguous, dmr.nd_rule_missing ...): a number the rows do not hold is never supplied. Send rows as JSON (date, parameter, value, unit, point) or table as the file's text (a laboratory's long export, or a sheet of days with one column per parameter); include the previous month's last days when a weekly average is due. A result below detection enters an average by nd_rule (zero, half, dl, dl_lt), else by the state's written rule. netdmr: true adds the NetDMR "Import DMRs" file as text (not yet validated by NetDMR's own import check). The rows reach our server to be computed and are not kept: only how many rows were sent and values filled is counted.

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": {
      "permit": "<permit>",
      "period_end": "<period_end>"
    },
    "name": "fill_dmr"
  }
}

Input Schema

NameRequiredDescriptionDefault
rowsNoThe plant's results, one a row (send rows or table).
tableNoThe plant's file as text (CSV, TSV or semicolons; at most 2000000 characters) or as lines of cells (send rows or table).
netdmrNoAlso return the NetDMR "Import DMRs" file (CSV text) for the values filled.
permitYesThe NPDES permit number, e.g. PA0228061.
nd_ruleNoHow a result below detection enters an average: as zero, half the limit, the limit (dl), or the limit reported as less-than (dl_lt). Default: the state's written rule, else none (such a statistic is refused).
period_endYesThe reporting period: its month (2026-09) or its last day (2026-09-30).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare read-only/idempotent/non-destructive, and the description adds substantial context beyond them: refusal behavior with named error codes (fill.no_column, fill.unit, fill.ambiguous, dmr.nd_rule_missing), the guarantee that a number the rows do not hold is never invented, the NetDMR output's not-yet-validated caveat, and the data-handling disclosure that rows are computed on the server and not retained (only counts kept). This is meaningful behavioral detail an agent cannot get from the annotations.

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?

Core purpose is front-loaded and nearly every sentence carries operational information, but the opening rhetorical question ('What numbers go on a permit's DMR this period...') is restated by the following clause, and the dense single-paragraph form with stacked parentheticals reduces scannability.

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 high-complexity compute tool with no output schema and 100% param coverage, the description covers inputs, refusal modes, statistical definitions, and the shape of results (statistic, source rows, violation verdict). Return structure and error-code handling are described only in prose, leaving some ambiguity about the exact output payload.

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 adds real meaning: the weekly-average rule requiring the prior month's last days, the semantics of each `nd_rule` value, and the rows-vs-table mutual option. Much overlaps the detailed schema descriptions, so it lands at 4 rather than 5.

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 precise verb+resource+scope: it computes the values a US NPDES permit's DMR requires for one period from the plant's own raw results, naming the specific statistics (monthly average, daily maximum, weekly average, geometric mean, loadings, percent removal) it derives. An agent can distinguish this compute-a-DMR tool from siblings like check_dmr or find_limits without opening a 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?

Gives rich conditional guidance: supply `rows` OR `table`, include the previous month's last days when a weekly average is due, use `nd_rule` for below-detection results, and enable `netdmr` only when the Import DMRs file is wanted. It never names a sibling alternative (e.g., check_dmr) or an explicit when-not-to-use, so it stops short of a 5.

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.