Skip to main content
Glama

gui_import_file

Import files into Anki MCP by specifying the file path using this tool. Streamline data integration and enhance workflow efficiency.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filePathYesPath to the file to import

Implementation Reference

  • The handler function for the 'gui_import_file' tool. It takes a filePath parameter and calls ankiClient.graphical.guiImportFile to perform the import, returning a success message or throwing an error.
    async ({ filePath }) => { try { await ankiClient.graphical.guiImportFile({ path: filePath }); return { content: [ { type: 'text', text: `Successfully imported file: ${filePath}`, }, ], }; } catch (error) { throw new Error( `Failed to import file: ${error instanceof Error ? error.message : String(error)}` ); } }
  • The Zod input schema for the 'gui_import_file' tool, defining the required 'filePath' string parameter.
    { filePath: z.string().describe('Path to the file to import'), },
  • The complete registration of the 'gui_import_file' MCP tool using server.tool(), including name, schema, and inline handler function.
    server.tool( 'gui_import_file', { filePath: z.string().describe('Path to the file to import'), }, async ({ filePath }) => { try { await ankiClient.graphical.guiImportFile({ path: filePath }); return { content: [ { type: 'text', text: `Successfully imported file: ${filePath}`, }, ], }; } catch (error) { throw new Error( `Failed to import file: ${error instanceof Error ? error.message : String(error)}` ); } } );

Other Tools

Related 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/arielbk/anki-mcp'

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