Skip to main content
Glama

retrieve_media_file

Fetch and retrieve specific media files by filename from the Anki MCP server, enabling efficient access to stored resources.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filenameYesName of the media file to retrieve

Implementation Reference

  • MCP tool registration and inline handler for 'retrieve_media_file'. The handler retrieves the media file content using ankiClient.media.retrieveMediaFile and returns a success message with content length or not found message.
    'retrieve_media_file', { filename: z.string().describe('Name of the media file to retrieve'), }, async ({ filename }) => { try { const content = await ankiClient.media.retrieveMediaFile({ filename }); if (content === false) { return { content: [ { type: 'text', text: `Media file "${filename}" not found`, }, ], }; } return { content: [ { type: 'text', text: `Successfully retrieved media file "${filename}". Content length: ${content.length} characters`, }, ], }; } catch (error) { throw new Error( `Failed to retrieve media 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