load_profile
Load a specified profile on the Anki MCP server by providing the profile name for configuration or operational needs.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| profileName | Yes | Name of the profile to load |
Implementation Reference
- src/tools/miscellaneous.ts:132-155 (registration)Full registration of the 'load_profile' MCP tool, including schema definition, handler function, and call to underlying AnkiConnect loadProfile method.// Tool: Load a specific profile server.tool( 'load_profile', { profileName: z.string().describe('Name of the profile to load'), }, async ({ profileName }) => { try { const result = await ankiClient.miscellaneous.loadProfile({ name: profileName }); return { content: [ { type: 'text', text: `Successfully loaded profile "${profileName}". Result: ${result}`, }, ], }; } catch (error) { throw new Error( `Failed to load profile: ${error instanceof Error ? error.message : String(error)}` ); } } );
- src/tools/miscellaneous.ts:138-154 (handler)The core handler logic for executing the 'load_profile' tool. Loads the Anki profile by name and formats the response.async ({ profileName }) => { try { const result = await ankiClient.miscellaneous.loadProfile({ name: profileName }); return { content: [ { type: 'text', text: `Successfully loaded profile "${profileName}". Result: ${result}`, }, ], }; } catch (error) { throw new Error( `Failed to load profile: ${error instanceof Error ? error.message : String(error)}` ); } }
- src/tools/miscellaneous.ts:135-137 (schema)Zod input schema defining the profileName parameter for the 'load_profile' tool.{ profileName: z.string().describe('Name of the profile to load'), },
- src/tools/miscellaneous.ts:140-140 (helper)Call to the underlying ankiClient helper method which proxies to AnkiConnect's loadProfile action.const result = await ankiClient.miscellaneous.loadProfile({ name: profileName });