Skip to main content
Glama
jenova-marie

Keyboard Shortcuts MCP Server

by jenova-marie

get_shortcuts

Query keyboard shortcuts for operating systems and applications using natural language. Specify OS and desktop environment to find relevant shortcuts for system functions, desktop apps, and CLI tools.

Instructions

Query keyboard shortcuts for a specific OS, desktop environment, and/or application. Uses Claude Opus to intelligently search and return relevant shortcuts based on natural language queries.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
osYesOperating system (e.g., ubuntu, macos, windows)
queryYesNatural language query about keyboard shortcuts (e.g., "how do I split a pane vertically?")
desktopNoDesktop environment (e.g., gnome, kde) - optional
applicationNoSpecific application (e.g., firefox, tmux) - optional

Implementation Reference

  • The handler function that executes the get_shortcuts tool: filters relevant shortcut data by OS/desktop/app, queries the Opus client with the natural language query, and returns the response as tool content.
    export async function handleGetShortcuts(
      params: GetShortcutsParams,
      dataStore: DataStore,
      opusClient: OpusClient
    ): Promise<{ content: Array<{ type: string; text: string }> }> {
      // Filter data based on parameters
      const relevantData = dataStore.getByFilters({
        os: params.os,
        desktop: params.desktop,
        application: params.application,
      });
    
      if (relevantData.length === 0) {
        return {
          content: [
            {
              type: 'text',
              text: `No shortcut data found for: OS=${params.os}${params.desktop ? `, Desktop=${params.desktop}` : ''}${params.application ? `, App=${params.application}` : ''}`,
            },
          ],
        };
      }
    
      // Query Opus with filtered data
      const response = await opusClient.queryShortcuts(params.query, relevantData);
    
      return {
        content: [
          {
            type: 'text',
            text: response,
          },
        ],
      };
    }
  • Zod schema for input validation of get_shortcuts tool parameters.
    const GetShortcutsParamsSchema = z.object({
      os: z.string().describe('Operating system (e.g., ubuntu, macos, windows)'),
      query: z.string().describe('Natural language query about keyboard shortcuts'),
      desktop: z.string().optional().describe('Desktop environment (e.g., gnome, kde)'),
      application: z.string().optional().describe('Specific application (e.g., firefox, tmux)'),
    });
  • TypeScript interface defining the input parameters for the get_shortcuts tool.
    export interface GetShortcutsParams {
      os: string;
      query: string;
      desktop?: string;
      application?: string;
    }
  • src/index.ts:41-72 (registration)
    Registers the get_shortcuts tool in the ListToolsRequestHandler, providing name, description, and inputSchema.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: [
          {
            name: 'get_shortcuts',
            description: 'Query keyboard shortcuts for a specific OS, desktop environment, and/or application. Uses Claude Opus to intelligently search and return relevant shortcuts based on natural language queries.',
            inputSchema: {
              type: 'object',
              properties: {
                os: {
                  type: 'string',
                  description: 'Operating system (e.g., ubuntu, macos, windows)',
                },
                query: {
                  type: 'string',
                  description: 'Natural language query about keyboard shortcuts (e.g., "how do I split a pane vertically?")',
                },
                desktop: {
                  type: 'string',
                  description: 'Desktop environment (e.g., gnome, kde) - optional',
                },
                application: {
                  type: 'string',
                  description: 'Specific application (e.g., firefox, tmux) - optional',
                },
              },
              required: ['os', 'query'],
            },
          },
        ],
      };
    });
  • src/index.ts:75-82 (registration)
    Dispatches tool calls to get_shortcuts by validating arguments with the schema and invoking the handleGetShortcuts function.
    server.setRequestHandler(CallToolRequestSchema, async (request) => {
      if (request.params.name === 'get_shortcuts') {
        const params = GetShortcutsParamsSchema.parse(request.params.arguments) as GetShortcutsParams;
        return handleGetShortcuts(params, dataStore, opusClient);
      }
    
      throw new Error(`Unknown tool: ${request.params.name}`);
    });
Behavior2/5

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 mentions using 'Claude Opus to intelligently search,' which adds some context about the AI-driven behavior, but it fails to disclose critical traits like rate limits, authentication needs, response format, or potential errors. For a tool with no annotation coverage, this is a significant gap in behavioral transparency.

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?

The description is concise and front-loaded, consisting of two sentences that efficiently convey the tool's purpose and method. Every sentence adds value without redundancy, though it could be slightly more structured (e.g., separating functional and behavioral aspects).

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

Completeness3/5

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

Given the complexity (4 parameters, no annotations, no output schema), the description is moderately complete. It covers the core functionality and method but lacks details on output format, error handling, or operational constraints. Without an output schema, the description should ideally hint at return values, which it doesn't, leaving gaps in contextual understanding.

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%, meaning the input schema fully documents all parameters. The description adds minimal value beyond the schema by mentioning 'natural language queries' and 'intelligently search,' which aligns with the 'query' parameter but doesn't provide additional syntax or format details. The baseline score of 3 is appropriate given the high schema coverage.

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 clearly states the tool's purpose: 'Query keyboard shortcuts for a specific OS, desktop environment, and/or application.' It specifies the verb 'query' and the resource 'keyboard shortcuts,' and mentions the intelligent search capability using Claude Opus. However, with no sibling tools, the differentiation aspect is not applicable, preventing a perfect score.

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?

The description implies usage by stating it handles 'natural language queries' and targets specific OS/application contexts, but it lacks explicit guidance on when to use this tool versus alternatives (e.g., other search methods). With no sibling tools, there's no comparison, but it doesn't provide exclusions or prerequisites, leaving room for improvement.

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/jenova-marie/keyboard-shortcuts-mcp'

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