Skip to main content
Glama

calculate_quality

Compute production quality as good units divided by total units for a line and date range, returning the result as a fraction and percentage.

Instructions

Calculate quality (good count ÷ total count).

Args: line: Production line label. start_date: ISO-8601 start. end_date: ISO-8601 end. total_count: Total units produced. good_count: Units that passed quality checks.

Returns: Quality as a fraction and percentage.

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": {
      "line": "<line>",
      "start_date": "<start_date>",
      "end_date": "<end_date>"
    },
    "name": "calculate_quality"
  }
}

Input Schema

NameRequiredDescriptionDefault
lineYes
end_dateYes
good_countNo
start_dateYes
total_countNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden and does not meet it. It never explains what happens when total_count or good_count are omitted (presumably the tool derives them from line and date range in a historian), what occurs if total_count is zero, or what permissions are needed.

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 formula is front-loaded and the Args/Returns structure is scannable with no filler. The Args entries are terse but each adds a definition rather than restating the parameter name, so little is wasted.

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?

A return value description is included even though an output schema exists, and the formula is supplied. For a five-parameter calculation tool with 0% schema coverage and no annotations, the critical gap is the behavior of the optional count arguments, which is left entirely unexplained.

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%, and the Args block does add real meaning: the ISO-8601 format hint for the date bounds, the production-line meaning of 'line', and the definition of the two count fields. However, it does not explain the semantics of the nullable/optional count parameters — the single most ambiguous aspect of the signature.

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 and immediately defines the computation as 'good count ÷ total count', which is exactly what separates it from siblings like calculate_availability, calculate_performance, and calculate_oee. An agent can pick the right metric tool from the description alone.

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

Usage Guidelines2/5

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

There is no statement of when to use this over the other calculate_* tools, and no guidance on when to supply good_count/total_count versus relying on line plus date range. The reader must infer that the counts are optional inputs from the schema's null defaults, which is not usage guidance.

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