get_profiles
Extract user profile data from Anki MCP for analysis or integration, enabling streamlined access to structured profile information.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/miscellaneous.ts:89-105 (handler)The core handler logic for the 'get_profiles' MCP tool. It calls ankiClient.miscellaneous.getProfiles() to fetch Anki profiles and returns them formatted as text content in the MCP response format.server.tool('get_profiles', {}, async () => { try { const profiles = await ankiClient.miscellaneous.getProfiles(); return { content: [ { type: 'text', text: `Available profiles: ${JSON.stringify(profiles, null, 2)}`, }, ], }; } catch (error) { throw new Error( `Failed to get profiles: ${error instanceof Error ? error.message : String(error)}` ); } });
- src/tools/miscellaneous.ts:89-105 (registration)Registers the 'get_profiles' tool on the MCP server with no input parameters (empty schema) and the inline handler.server.tool('get_profiles', {}, async () => { try { const profiles = await ankiClient.miscellaneous.getProfiles(); return { content: [ { type: 'text', text: `Available profiles: ${JSON.stringify(profiles, null, 2)}`, }, ], }; } catch (error) { throw new Error( `Failed to get profiles: ${error instanceof Error ? error.message : String(error)}` ); } });
- src/tools/consolidated.ts:1144-1154 (helper)Helper implementation of get_profiles logic inside the 'anki_operations' consolidated tool's switch case, providing similar functionality as a sub-operation.case 'get_profiles': { const profiles = await ankiClient.miscellaneous.getProfiles(); return { content: [ { type: 'text', text: `Available profiles:\n${JSON.stringify(profiles, null, 2)}`, }, ], }; }
- src/tools/miscellaneous.ts:282-282 (helper)Lists 'getProfiles' as an available AnkiConnect action in the 'multi' tool's action enum.'getProfiles',