Skip to main content
Glama

Calculate final grade

calculate_final_grade
Read-onlyIdempotent

Work out what score is needed on the final exam: current is the average so far (percent), weight is how much the final is worth (percent of the course), target is the course grade wanted (percent).

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": {
      "current": "<current>",
      "weight": "<weight>",
      "target": "<target>"
    },
    "name": "calculate_final_grade"
  }
}

Input Schema

NameRequiredDescriptionDefault
targetYes
weightYes
currentYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false, and openWorldHint=false, so the safety profile is covered and the description doesn't need to repeat it. The description does add the computational semantics (what the three inputs mean). However, with no output schema, it says nothing about what is returned — a percent, a letter grade, or a negative value when the target is unreachable — which is a real gap for a calculator.

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?

A single front-loaded sentence stating the goal, followed by inline definitions for the three inputs. Every clause earns its place with no filler, though the parenthetical repeated '(percent)' three times is slightly 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 simple three-parameter calculator with annotations covering safety, the description covers inputs well. With no output schema, though, it leaves the return value and edge-case behavior (unreachable target, weight of zero) unexplained, which an agent would need in order to interpret the result.

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 description coverage is 0%, so the description carries the full burden, and it does define all three parameters in prose: current as the average so far in percent, weight as the final's percent of the course, and target as the desired course grade in percent. It omits that current and target accept values up to 200 (extra credit), but the core semantics are fully supplied.

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 states a specific verb and resource: 'Work out what score is needed on the final exam,' which is unambiguous and clearly distinct from the sibling calculate_gpa. It never names a sibling explicitly, but the resource (required final-exam score vs. GPA) is distinct enough that an agent can route correctly.

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 parameter definitions — you supply a current average, a final weight, and a target grade to get the needed exam score. There is no explicit statement of when to prefer this over calculate_gpa, nor any note on preconditions such as a nonzero weight.

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.

Resources