Skip to main content
Glama

get_cards_info

Retrieve detailed information for specific Anki cards by providing their unique IDs, enabling efficient data access and management.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cardIdsYesArray of card IDs to get information for

Implementation Reference

  • Handler function that fetches detailed card information using ankiClient and returns it as JSON-formatted text content.
    try { const cardsInfo = await ankiClient.card.cardsInfo({ cards: cardIds }); return { content: [ { type: 'text', text: `Card information: ${JSON.stringify(cardsInfo, null, 2)}`, }, ], }; } catch (error) { throw new Error( `Failed to get cards info: ${error instanceof Error ? error.message : String(error)}` ); } } );
  • Zod input schema defining cardIds as an array of numbers.
    cardIds: z.array(z.number()).describe('Array of card IDs to get information for'), }, async ({ cardIds }) => {
  • Registration of the 'get_cards_info' MCP tool using server.tool, including schema and inline handler.
    'get_cards_info', { cardIds: z.array(z.number()).describe('Array of card IDs to get information for'), }, async ({ cardIds }) => { try { const cardsInfo = await ankiClient.card.cardsInfo({ cards: cardIds }); return { content: [ { type: 'text', text: `Card information: ${JSON.stringify(cardsInfo, null, 2)}`, }, ], }; } catch (error) { throw new Error( `Failed to get cards info: ${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