get_active_profile
Retrieve the currently active profile configuration from Anki MCP, enabling users to manage and monitor profile settings effectively.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/miscellaneous.ts:70-86 (handler)This is the core handler implementation for the MCP tool 'get_active_profile'. It registers the tool with an empty input schema and executes logic to fetch the active Anki profile name via the ankiClient library, returning a formatted text response or throwing an error if failed.server.tool('get_active_profile', {}, async () => { try { const profileName = await ankiClient.miscellaneous.getActiveProfile(); return { content: [ { type: 'text', text: `Active profile: ${profileName}`, }, ], }; } catch (error) { throw new Error( `Failed to get active profile: ${error instanceof Error ? error.message : String(error)}` ); } });