check_card_suspended
Verify if a specific card ID is suspended on the Anki MCP server using the check_card_suspended tool. Input the card ID to instantly determine its suspension status.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cardId | Yes | Card ID to check |
Implementation Reference
- src/tools/cards.ts:217-232 (handler)Handler function that executes the tool logic: checks if a specific card is suspended via ankiClient and returns the status.try { const isSuspended = await ankiClient.card.suspended({ card: cardId }); return { content: [ { type: 'text', text: `Card ${cardId} is ${isSuspended ? 'suspended' : 'not suspended'}`, }, ], }; } catch (error) { throw new Error( `Failed to check if card is suspended: ${error instanceof Error ? error.message : String(error)}` ); } }
- src/tools/cards.ts:214-216 (schema)Input schema definition using Zod for the cardId parameter.cardId: z.number().describe('Card ID to check'), }, async ({ cardId }) => {
- src/tools/cards.ts:212-233 (registration)Registration of the 'check_card_suspended' tool with the MCP server, including schema and inline handler.'check_card_suspended', { cardId: z.number().describe('Card ID to check'), }, async ({ cardId }) => { try { const isSuspended = await ankiClient.card.suspended({ card: cardId }); return { content: [ { type: 'text', text: `Card ${cardId} is ${isSuspended ? 'suspended' : 'not suspended'}`, }, ], }; } catch (error) { throw new Error( `Failed to check if card is suspended: ${error instanceof Error ? error.message : String(error)}` ); } } );