Skip to main content
Glama

search_key_codes

Search valid Karabiner-Elements key codes and modifiers for keyboard remapping. Filter by term or category to identify the correct key_code string before creating or modifying rules.

Instructions

Search valid Karabiner-Elements key codes and modifiers.

Call this before add_rule or edit_rule to find the correct key_code string. Key codes are Karabiner-specific identifiers (e.g. 'return_or_enter' not 'enter', 'delete_or_backspace' not 'backspace', 'grave_accent_and_tilde' not '`').

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryNoSearch term to filter key codes (e.g. 'arrow', 'f1', 'ctrl', 'media'). Case-insensitive substring match. Omit to list all categories.
categoryNoFilter by category: Letters, Numbers, Function Keys, Modifiers, Navigation, Punctuation, Keypad, Media, International, System.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description carries the full burden for behavioral disclosure. It appropriately indicates this is a search operation (no side effects) and adds valuable context about Karabiner-specific naming conventions with examples. It does not describe output format or pagination, but the output schema fills that gap.

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?

The description is concise and front-loaded: it states the purpose in the first sentence, provides usage guidance in the second, and uses examples for clarification. Every sentence earns its place, with no fluff.

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?

Given the simple search tool with fully documented parameters and an output schema, the description is complete. It covers what the tool does, why it exists, and provides critical domain-specific naming examples. No missing context for an agent to select and invoke it correctly.

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 query and category well-documented. The description does not add new parameter semantics beyond what the schema provides, though the key-code examples help illustrate the expected domain. Baseline score of 3 is appropriate given full schema coverage.

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 clearly identifies the tool as a search for valid Karabiner-Elements key codes and modifiers. It uses a specific verb ('search'), names the resource, and distinguishes it from rule-management siblings by explaining its role in preparing key_code strings for add_rule/edit_rule.

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?

The description explicitly states when to use the tool: 'Call this before add_rule or edit_rule to find the correct key_code string.' This provides direct contextual guidance and implicitly differentiates it from alternative tools like list_rules or toggle_rule.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jason-weddington/karabiner-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server