Skip to main content
Glama

Key code lookup

get_keycode
Read-onlyIdempotent

Returns the values a key reports in a browser key event: key, code, keyCode, which and location. Accepts a key name such as Enter or Shift, or one character on a US keyboard, and lists the left, right and number-pad variants.

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": {
      "key": "<key>"
    },
    "name": "get_keycode"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyYesA key name such as Enter, Shift, F5 or Arrow Up, or one character such as A, 7 or /.

Output Schema

NameRequiredDescriptionDefault
itemYes
viewYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/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. The description adds useful context beyond that: it discloses the US-keyboard scope of the input and that a single lookup expands to left, right and number-pad variants, telling the agent one call suffices. It does not describe error behavior for unrecognized keys, and the return values it lists are already covered by the output schema.

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 filler, front-loaded with the return payload before the accepted input forms. Every clause carries information an agent can act on.

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 single-parameter, read-only lookup with full schema coverage, an output schema, and rich annotations, the description supplies everything needed: what it returns, what input it accepts, and that variants are enumerated in one call. Nothing material is missing.

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% and the single 'key' parameter is documented with examples (Enter, Shift, F5, Arrow Up, A, 7, /). The description largely restates that constraint, adding only the 'US keyboard' qualifier for single characters. Baseline 3 is appropriate when the schema carries the parameter detail.

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?

The description names a specific verb and resource ('Returns the values a key reports in a browser key event') and enumerates exactly what is returned: key, code, keyCode, which and location. That scope makes it unmistakable against siblings like get_layout or check_rollover, which operate on layouts and rollover behavior rather than per-key event values.

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: the agent can infer this is the tool for looking up a single key's event values, and the accepted input forms (key name or one US-keyboard character) are stated. However, there is no explicit when-to-use/when-not guidance and no sibling alternative is named for adjacent questions such as layout differences.

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.