Skip to main content
Glama

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}`); });
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