Skip to main content
Glama

Rank class

rank_class
Read-only

Ranks a class by total term score, assigns tied positions, and lists students with missing scores as unranked with their missing subjects.

Instructions

Rank a class by total score for a term. Ties share a position (1, 2, 2, 4). Students with any missing score are listed separately as unranked, with the missing subjects.

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": {
      "classId": "<classId>"
    },
    "name": "rank_class"
  }
}

Input Schema

NameRequiredDescriptionDefault
termNoTerm ID such as '2026-T1'. Defaults to the current term.
classIdYesClass ID from list_classes, e.g. 'sch_demo_a_c3'.

Output Schema

NameRequiredDescriptionDefault
termYes
classYes
rankedYes
unrankedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Beyond the readOnlyHint=true and openWorldHint=false annotations, the description discloses two genuinely non-obvious behaviors: competition ranking with shared positions (1, 2, 2, 4) and that students with missing scores are segregated into a separate unranked list with the missing subjects identified. It does not discuss pagination or ordering across equal totals beyond tie handling, but it adds real semantic context.

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?

Two sentences with zero waste: the core operation and scope lead, then the edge-case rule follows. Every sentence carries information an agent needs.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-only, two-parameter aggregate with full schema coverage and an output schema, the description covers what the tool computes and how degenerate cases (ties, missing scores) are represented. Nothing an agent needs in order to call it correctly is absent.

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 100%, with both classId and term documented in the schema itself, including the current-term default. The description only restates that ranking is for a term and adds no syntax or format detail beyond the schema, so the baseline 3 applies.

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 names a specific verb and resource ('Rank a class') plus the scoping dimension ('by total score for a term'), so an agent can tell this apart from raw-result siblings like get_class_results. It stops short of naming an alternative, but the operation is unambiguous.

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 only implied by the phrase 'for a term' and the unranked-handling note; there is no explicit statement of when to prefer this over get_class_results or find_missing_scores. An agent can infer the use case (ordered standings rather than raw scores) but must reason about it.

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