get_media_dir_path
Retrieve the directory path for media files stored in the Anki MCP server to facilitate access and management of media resources.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/media.ts:35-51 (registration)Registration and handler for the 'get_media_dir_path' MCP tool. It calls ankiClient.media.getMediaDirPath() to retrieve the path and returns it in a text content block.server.tool('get_media_dir_path', {}, async () => { try { const path = await ankiClient.media.getMediaDirPath(); return { content: [ { type: 'text', text: `Media directory path: ${path}`, }, ], }; } catch (error) { throw new Error( `Failed to get media directory path: ${error instanceof Error ? error.message : String(error)}` ); } });