karabiner-mcp
Provides tools to manage Karabiner-Elements keyboard remapping rules on macOS, including searching key codes, adding/editing/removing/toggling rules, and switching profiles.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@karabiner-mcpRemap Caps Lock to Escape"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
karabiner-mcp
MCP server for managing Karabiner-Elements keyboard remapping rules on macOS.
Exposes Karabiner configuration as MCP tools so an LLM can search key codes, list/add/edit/remove/toggle rules, and switch profiles — all through natural language.
Tools
Tool | Description |
| Find Karabiner key code names (e.g. "enter" → |
| List all rules in the current profile with enabled/disabled status |
| Create a new remapping rule |
| Modify an existing rule |
| Delete a rule (with optional asset cleanup) |
| Enable or disable a rule |
| Show all Karabiner profiles |
| Switch the active profile |
Related MCP server: macos-control-mcp
Installation
Requires Python 3.13+ and uv. No need to clone the repo — register the server in your Claude config (~/.claude.json) and uvx will install it on first run:
{
"mcpServers": {
"karabiner-mcp": {
"type": "stdio",
"command": "uvx",
"args": [
"--from", "git+https://github.com/jason-weddington/karabiner-mcp.git",
"karabiner-mcp"
]
}
}
}Then ask Claude things like:
"Remap Caps Lock to Escape"
"Make right Option act as Hyper key"
"When I tap left Shift, type open-paren"
"Disable the rule called 'Caps Lock to Escape'"
Rule patterns
Simple remap — one key to another
Modifier combo — e.g. Cmd+Shift+K to something
Tap vs hold — different output for tap and hold on the same key
App-specific — rules scoped to specific applications by bundle ID
Shell command — trigger a shell command from a key combo
Development
uv run pytest # Run tests
uv run pytest --cov=karabiner_mcp # Tests with coverage
uv run ruff check . # Lint
uv run ruff format . # Format
uv run mypy src/ # Type checkLicense
Available Tools
8 toolsadd_ruleA
Create and install a new Karabiner-Elements rule.
Writes the rule to an asset file AND installs it in karabiner.json for immediate effect. Karabiner-Elements auto-reloads on file change.
For simple remaps, use to_key_code. For tap-vs-hold, combine to_key_code (held behavior) with to_if_alone_key_code (tap behavior).
Examples:
Simple remap (caps->esc): from_key_code="caps_lock", to_key_code="escape"
With modifier (ctrl+h->backspace): from_key_code="h", from_mandatory_modifiers=["control"], to_key_code="delete_or_backspace"
Tap/hold (caps: tap=esc, hold=ctrl): from_key_code="caps_lock", to_key_code="left_control", to_if_alone_key_code="escape"
App-specific: add app_if=['^com.apple.Terminal$']
Shell command: from_key_code="f5", to_shell_command="open -a Safari"
| Name | Required | Description | Default |
|---|---|---|---|
| app_if | No | Bundle ID regexes — rule only fires in these apps (e.g. ['^com\\.apple\\.Terminal$']). Use app_unless for the inverse. | |
| to_keys | No | Full output key list. Each entry: {key_code, modifiers[], pointing_button}. Use instead of to_key_code for multi-key or complex outputs. | |
| device_if | No | Device identifiers — rule only fires on these devices. Each dict may contain: vendor_id (int), product_id (int), location_id (int), is_keyboard (bool), is_pointing_device (bool). | |
| app_unless | No | Bundle ID regexes — rule fires everywhere EXCEPT these apps. | |
| asset_title | No | Asset file group title. Rules with the same title go in the same file. Default: 'MCP Rules'. | |
| description | Yes | Human-readable rule description. Must be unique across all rules. | |
| to_key_code | No | Output key code (shorthand for a single to-key). For multiple outputs or modifiers on output, use to_keys instead. | |
| to_modifiers | No | Modifiers to apply to the output key (used with to_key_code). | |
| device_unless | No | Device identifiers — rule fires on all devices EXCEPT these. Same fields as device_if. | |
| from_key_code | No | Trigger key code (e.g. 'caps_lock', 'a', 'left_command'). Mutually exclusive with from_pointing_button. | |
| profile_index | No | Profile to install the rule in. Omit for the selected profile. | |
| to_shell_command | No | Shell command to execute when the rule fires (e.g. 'open -a Terminal'). | |
| from_pointing_button | No | Trigger mouse button (e.g. 'button1'). Mutually exclusive with from_key_code. | |
| to_if_alone_key_code | No | Key to send if the trigger is tapped briefly (not held). Common for dual-purpose keys like 'caps_lock as escape when tapped, control when held'. | |
| from_optional_modifiers | No | Modifiers allowed but not required. Use ['any'] to ignore all extra modifiers (recommended for most remaps). | |
| from_mandatory_modifiers | No | Modifiers that must be held for the rule to fire (e.g. ['command', 'shift']). Use search_key_codes to find valid names. | |
| to_if_held_down_key_code | No | Key to send if the trigger is held down past the threshold. |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses side effects: writes to an asset file and installs in karabiner.json, and notes auto-reload behavior. This goes beyond the schema. However, it doesn't mention potential pitfalls like rule conflicts or whether the operation is reversible, but the core behavioral traits are sufficiently transparent for a creation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured and front-loaded with the core action, followed by behavioral notes and then examples. It is somewhat long, but every sentence earns its place—the examples specifically illustrate parameter combinations that would otherwise be unclear. No fluff or repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's high complexity (17 parameters) and no annotations, the description covers the essential mechanics (file writes, installation, auto-reload), provides usage guidance, and gives practical examples. An output schema exists, so return values are handled elsewhere. The only minor gap is not discussing how this interacts with existing rules on the same keys, but overall it is sufficiently complete for a creation tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema already provides descriptions for all 17 parameters (100% coverage), so the baseline is 3. The description adds value by giving real usage examples that tie parameters together, such as from_key_code='caps_lock', to_key_code='escape', and combining to_key_code with to_if_alone_key_code for tap-vs-hold behavior. This contextualizes parameters beyond their individual schema definitions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb and resource: 'Create and install a new Karabiner-Elements rule.' It clearly differentiates from sibling tools by stating it writes to an asset file AND installs in karabiner.json for immediate effect, which is distinct from listing, toggling, removing, or editing rules.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives explicit usage guidance for parameter selection: 'For simple remaps, use to_key_code. For tap-vs-hold, combine to_key_code (held behavior) with to_if_alone_key_code (tap behavior).' It also provides concrete examples for various scenarios, which helps the agent choose appropriate parameters. It doesn't explicitly contrast with sibling tools like edit_rule, but the intent to create is clear from the first sentence.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
edit_ruleA
Edit an existing rule. Updates both the asset file and karabiner.json. Only pass the parameters you want to change.
To see a rule's current configuration, use list_rules first.
| Name | Required | Description | Default |
|---|---|---|---|
| app_if | No | New app_if bundle IDs. None = keep current. Pass [] to clear. | |
| device_if | No | New device_if identifiers. None = keep current. Pass [] to clear. | |
| app_unless | No | New app_unless bundle IDs. None = keep current. Pass [] to clear. | |
| description | Yes | Exact description of the rule to edit. | |
| to_key_code | No | New output key code. None = keep current. | |
| to_modifiers | No | New output modifiers (with to_key_code). None = keep current. | |
| device_unless | No | New device_unless identifiers. None = keep current. Pass [] to clear. | |
| from_key_code | No | New trigger key code. None = keep current. | |
| new_description | No | New description. None = keep current. | |
| to_shell_command | No | New shell command. None = keep current. | |
| from_pointing_button | No | New trigger mouse button. None = keep current. | |
| to_if_alone_key_code | No | New tap key code. None = keep current. | |
| from_optional_modifiers | No | New optional modifiers. None = keep current. | |
| from_mandatory_modifiers | No | New mandatory modifiers. None = keep current. | |
| to_if_held_down_key_code | No | New hold key code. None = keep current. |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of disclosing behavioral traits. It explicitly reveals the side effect of updating both the asset file and karabiner.json, and implies partial update behavior via 'Only pass the parameters you want to change.' It does not cover error handling or reversibility, but the key mutation behavior is transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and well-structured, with the primary action stated first, followed by the side effect and a usage tip. It is organized into two short paragraphs, and every sentence adds value without verbosity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description provides essential context for a complex mutation tool: its purpose, the files it modifies, the partial-update model, and a recommended pre-step. It does not enumerate all potential constraints, but the schema covers parameter specifics. Overall, it is sufficiently complete for an AI agent to use the tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, with each parameter clearly stating 'None = keep current' or 'Pass [] to clear.' The description's general rule about passing only changed parameters reinforces these semantics but does not add per-parameter information. Since schema coverage is high, the baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states 'Edit an existing rule' with a specific verb and resource, clearly distinguishing it from sibling tools like add_rule, toggle_rule, and remove_rule. It also specifies that it updates both the asset file and karabiner.json, which adds precision to the purpose.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides a clear usage recommendation: 'To see a rule's current configuration, use list_rules first.' It also instructs to 'Only pass the parameters you want to change,' which operationalizes the tool. It does not explicitly contrast with add_rule or toggle_rule, but the sibling names make this implicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_profilesA
List all Karabiner-Elements profiles with their rule counts.
Shows which profile is currently selected. Use select_profile to switch the active profile.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the burden of disclosing behavior. It does not explicitly state the operation is read-only, but the verb 'List' implies no mutation. It adds useful context about what is returned (rule counts, current selection), but lacks explicit statements about side-effects or edge cases.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is only two sentences, front-loaded with the main purpose, and each sentence adds value. It is efficient with no redundant details.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's low complexity, an output schema, and zero parameters, the description covers the essential details: what it lists and what extra information it shows. It could mention read-only behavior explicitly, but overall it is sufficiently complete for an agent to invoke it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, and the schema coverage is 100%. No parameter explanation is needed; the description adds no parameter detail, but the baseline of 4 for 0 parameters is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb 'List' and specifies the resource ('all Karabiner-Elements profiles') plus a distinct detail ('with their rule counts'). It also states it shows the currently selected profile, making the tool's purpose clear and differentiating it from the sibling list_rules (which lists rules).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly points to select_profile as the tool to switch the active profile, implying list_profiles is for reviewing profiles rather than changing them. It does not provide exclusions for other siblings, but for a simple listing tool, this guidance is sufficient.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_rulesA
List Karabiner-Elements complex modification rules for a profile.
Returns each rule's description, enabled/disabled status, whether it's installed in karabiner.json, and its source asset file. Rules are listed in priority order (first match wins in Karabiner).
| Name | Required | Description | Default |
|---|---|---|---|
| profile_index | No | Profile index (0-based). Omit to use the currently selected profile. | |
| include_available | No | Also show rules from asset files not yet installed in the profile. |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden of behavioral disclosure. It specifies the exact return fields (description, enabled/disabled status, installation state, source asset file) and notes the ordering rule (first match wins). This goes beyond a generic 'list' statement, though it could be more explicit about being a non-mutating operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and front-loaded, stating the core purpose in the first sentence and then adding return details in two short paragraphs. Every sentence adds value, with no redundant or filler content.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity, full schema coverage, and the presence of an output schema, the description provides sufficient context for correct invocation. It explains what is returned, the ordering, and the optional parameters' semantics, making it complete for an agent to use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema already provides 100% coverage of both parameters (profile_index and include_available) with clear descriptions. The tool description does not add significant meaning beyond what the schema offers, so the baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'List' and the resource 'Karabiner-Elements complex modification rules for a profile,' making the tool's purpose unambiguous. It also distinguishes from siblings like 'list_profiles' by targeting rules within a profile, and from CRUD tools like 'add_rule' and 'remove_rule.'
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context on what the tool does and what it returns, implying when to use it (e.g., inspecting rules in a profile). It does not explicitly exclude alternatives, but the sibling tool names make the differences obvious. The mention of priority order adds useful domain context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
remove_ruleA
Remove a rule from karabiner.json (all profiles).
By default the asset file is preserved so the rule can be re-added later via the Karabiner Settings UI or add_rule.
| Name | Required | Description | Default |
|---|---|---|---|
| description | Yes | Exact description of the rule to remove. | |
| also_delete_asset | No | Also remove the rule from its source asset file. Default: False (keeps asset so rule can be re-installed later). |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It discloses the key behavioral trait that the asset file is preserved by default, allowing re-addition later, and clarifies the scope 'all profiles'. This adds meaningful context beyond the obvious removal action.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short, front-loaded sentences: the first states the core purpose, the second explains a critical default behavior. No redundant wording.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple removal tool with full schema coverage and an output schema, the description provides essential context about default behavior and reversibility. It is sufficient for an agent to understand the tool's scope and side effects.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Input schema already provides detailed descriptions for both parameters (100% coverage), including the default for also_delete_asset. The description's mention of the asset preservation aligns with the schema but does not add additional parameter-level information.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states a specific action 'Remove a rule from karabiner.json (all profiles)', identifying both the verb and resource, and distinguishing it from sibling tools like add_rule, toggle_rule, and edit_rule.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides context for the default behavior (asset preservation) and references add_rule as an alternative for re-adding, but does not explicitly state when-not-to-use in favor of toggle_rule or edit_rule.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_key_codesA
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 '`').
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | Search term to filter key codes (e.g. 'arrow', 'f1', 'ctrl', 'media'). Case-insensitive substring match. Omit to list all categories. | |
| category | No | Filter by category: Letters, Numbers, Function Keys, Modifiers, Navigation, Punctuation, Keypad, Media, International, System. |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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.
select_profileA
Switch the active Karabiner-Elements profile.
Takes effect immediately. Use list_profiles first to see available profiles and their indices.
| Name | Required | Description | Default |
|---|---|---|---|
| profile_index | Yes | Index of the profile to activate (0-based). Use list_profiles to see available profiles. |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It adds that the switch 'takes effect immediately,' which is a useful side-effect detail. However, it does not mention persistence, error handling, or any impact on other profiles, leaving some transparency gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, with the first sentence immediately stating the action and target. Every word earns its place; there is no fluff or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple one-parameter tool, the description covers the core purpose, the prerequisite step, and the immediate effect. An output schema exists to document return values, so the description need not repeat those. Minor gaps like out-of-range behavior are not critical for this simple tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% and the schema already explains 'profile_index' as the 0-based index and points to list_profiles. The tool description repeats this guidance ('Use list_profiles first') but does not add new semantic information beyond what the schema provides, so baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Switch') plus a clear resource ('the active Karabiner-Elements profile'). It distinguishes from sibling tools like list_profiles, which lists profiles, and rule-editing tools, which operate on rules rather than profiles.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explicitly instructs to 'Use list_profiles first to see available profiles and their indices,' giving a clear prerequisite step. It does not discuss exclusions or alternatives beyond this, but the guidance is specific and actionable.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
toggle_ruleA
Enable or disable an installed rule.
The rule stays in karabiner.json either way — disabling adds 'enabled: false', enabling removes that flag.
| Name | Required | Description | Default |
|---|---|---|---|
| enabled | Yes | True to enable, False to disable. | |
| description | Yes | Exact description of the rule to toggle. | |
| profile_index | No | Profile index. Omit for the selected profile. |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full disclosure burden and does well by explaining the persistent effect on karabiner.json: disabling adds 'enabled: false', enabling removes the flag. It does not cover error conditions or profile-specific behavior, but the core mutation semantics are transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two crisp sentences with front-loaded action. Every sentence earns its place: the first states the purpose, the second provides essential behavioral detail about the JSON flag mechanics without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description sufficiently covers the tool's behavior, and since an output schema exists, return values need no explanation. Minor gap: it does not mention how profile_index affects the toggle, but the schema covers that parameter, leaving only a small completeness gap.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the input schema already documents all three parameters with clear descriptions. The tool description adds no parameter-specific meaning beyond the schema, which is the expected baseline.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb pair ('Enable or disable') and clearly identifies the target resource ('installed rule'). It effectively distinguishes from sibling tools like add_rule, remove_rule, and edit_rule by focusing on the enabled state mutation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies the tool is for toggling rule state, but it does not explicitly contrast with edit_rule or state when not to use it. Context is clear, but there are no exclusions or alternative tool references.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
8 tool updates
v0.1.0- First observed
add_rule - First observed
edit_rule - First observed
list_profiles - First observed
list_rules - First observed
remove_rule - First observed
search_key_codes - First observed
select_profile - First observed
toggle_rule
TDQS
Scored across 8 tools
Each tool targets a distinct operation: rule lifecycle (add, list, toggle, remove, edit), profile management (list, select), and key code lookup (search). No two tools have overlapping purposes.
All tools follow a consistent verb_noun pattern in lowercase snake_case (list_rules, add_rule, toggle_rule, remove_rule, edit_rule, list_profiles, select_profile, search_key_codes). No deviations.
8 tools is well-scoped for managing Karabiner rules and profiles, covering CRUD and auxiliary operations without bloat or thinness.
Rule CRUD and profile selection are covered, but there is no tool to reorder rules, which is important given Karabiner's priority-based matching. Minor gap that agents can work around by editing the underlying file.
Maintenance
Related MCP Connectors
MCP server for progressive tool usage at any scale (see https://klavis.ai)
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
MCP connector that lets ChatGPT list, search, and run your Apple Shortcuts via a local Mac agent
Personal assistant MCP server with search, execute, packages, jobs, secrets, and integrations.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceA lightweight MCP server that bridges AI agents and macOS, enabling automation of file navigation, application control, UI interaction, browser automation, and system operations.184MIT
- AlicenseBqualityDmaintenanceMCP server that enables AI to fully control macOS — mouse, keyboard, terminal, screenshots, window management, UI element detection, and provides AI-optimized information reporting.3619 npmMIT
- AlicenseAqualityBmaintenanceA local MCP server that exposes macOS automation actions (AppleScript + CLIs) as tools, enabling MCP clients on your Mac to control apps, system settings, and more.39MIT
- FlicenseNot gradedqualityBmaintenanceEnterprise-grade macOS MCP server that gives AI agents eyes, hands, and a terminal, enabling screen capture, mouse/keyboard control, shell commands, and file operations.-