Skip to main content
Glama

Calculate typing score

calculate_typing_score
Read-onlyIdempotent

Use this when a typing test has finished, or when the user gives the target passage, what they typed, and the time taken and wants their typing speed. Compares word by word and computes exact WPM = (correct characters / 5) / minutes, raw WPM (all typed characters), accuracy = correct / (correct + errors), errors (incorrect + extra + skipped letters), consistency and per-second speed (when samples are given), and the weakest keys. Returns a shareable result card (SVG) and a challenge link. Does not run a test or time anything itself; seconds must be between 1 and 3600. Do not use for reading speed or word counts.

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": {
      "target_text": "<target_text>",
      "typed_text": "<typed_text>",
      "seconds": "<seconds>"
    },
    "name": "calculate_typing_score"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNoSettings of the test from show_typing_test, used to label the result and build a challenge link. Example: timed.
seedNoSeed from show_typing_test, e.g. 4821, so a challenge link reproduces the same passage.
samplesNoOptional, sent by the widget: cumulative count of characters entered at the end of each whole second, e.g. [5, 11, 16]. Used for per-second speed and consistency.
secondsYesElapsed typing time in seconds, from the first keystroke to the end (the full duration for a timed test), e.g. 60. Must be between 1 and 3600.
difficultyNoDifficulty from show_typing_test, e.g. words.
focus_keysNoDrill keys from show_typing_test, e.g. 'eth'.
typed_textYesExactly what the user typed, including mistakes, e.g. 'the quikc brown fox'. May be empty.
custom_textNoSent by the widget for custom-text tests: the full custom text from show_typing_test, e.g. 'The early bird catches the worm.', so the challenge link reproduces the whole passage. Omit otherwise.
missed_keysNoOptional, sent by the widget: one character per mistyped keystroke, giving the key that was expected (including mistakes later corrected), e.g. 'eet'. Used to find weak keys.
target_textYesThe passage the user was asked to type, exactly as shown, e.g. 'the quick brown fox'.
duration_secondsNoTimed-test length from show_typing_test, e.g. 60.

Output Schema

NameRequiredDescriptionDefault
wpmYes
kindYes
labelYes
errorsYes
raw_wpmYes
secondsYes
summaryYes
accuracyYes
settingsYes
completedYes
downloadsYes
weak_keysYes
consistencyYes
extra_charsYes
typed_charsYes
missed_charsYes
target_charsYes
correct_charsYes
untyped_charsYes
per_second_wpmYes
incorrect_charsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the safety bar is low, yet the description goes further: it discloses the exact scoring formulas, the return artifacts (SVG result card and challenge link), the fact that it does not time anything itself, and the seconds bound (1–3600). This is substantive behavioral context beyond 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?

Front-loaded with the usage trigger and followed by the computation list, so an agent gets the essential decision information immediately. The formula detail is dense but mostly earns its place by justifying result trust; a minor trim would make it tighter.

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?

With 11 parameters, an output schema, and rich annotations, the description covers purpose, inputs, computed outputs, constraints, and boundaries, leaving nothing an agent needs in order to call it correctly. Return values are appropriately summarized rather than re-specified, since an output schema exists.

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 relationships the schema does not: samples drive per-second speed and consistency, missed_keys drive weak-key detection, and seed/mode/difficulty/custom_text feed the challenge link. It stops short of explaining every parameter, but the causal mapping from inputs to outputs is genuinely useful.

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 (computes/calculates) and resource (typing score), enumerates exactly what is computed (WPM, raw WPM, accuracy, errors, consistency, per-second speed, weak keys), and explicitly contrasts with the sibling: 'Does not run a test or time anything itself' plus 'Do not use for reading speed or word counts.' An agent can distinguish this from show_typing_test without opening either schema.

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

Usage Guidelines5/5

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

Gives concrete triggering conditions ('when a typing test has finished, or when the user gives the target passage, what they typed, and the time taken'), names explicit exclusions (reading speed, word counts), and implicitly routes test-running to show_typing_test. Both when-to-use and when-not-to-use are present.

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