@ankimcp/anki-mcp-server
Version:
Model Context Protocol server for Anki - enables AI assistants to interact with your Anki flashcards
124 lines (123 loc) • 4.13 kB
TypeScript
import { AnkiConnectClient } from "../../../clients/anki-connect.client.js";
import { NoteInfo } from "../../../types/anki.types.js";
export declare class NotesInfoTool {
private readonly ankiClient;
private readonly logger;
constructor(ankiClient: AnkiConnectClient);
notesInfo({ notes }: {
notes: number[];
}): Promise<{
[x: string]: unknown;
content: ({
type: "text";
text: string;
annotations?: {
audience?: ("user" | "assistant")[] | undefined;
priority?: number | undefined;
lastModified?: string | undefined;
} | undefined;
_meta?: {
[x: string]: unknown;
} | undefined;
} | {
type: "image";
data: string;
mimeType: string;
annotations?: {
audience?: ("user" | "assistant")[] | undefined;
priority?: number | undefined;
lastModified?: string | undefined;
} | undefined;
_meta?: {
[x: string]: unknown;
} | undefined;
} | {
type: "audio";
data: string;
mimeType: string;
annotations?: {
audience?: ("user" | "assistant")[] | undefined;
priority?: number | undefined;
lastModified?: string | undefined;
} | undefined;
_meta?: {
[x: string]: unknown;
} | undefined;
} | {
uri: string;
name: string;
type: "resource_link";
description?: string | undefined;
mimeType?: string | undefined;
size?: number | undefined;
annotations?: {
audience?: ("user" | "assistant")[] | undefined;
priority?: number | undefined;
lastModified?: string | undefined;
} | undefined;
_meta?: {
[x: string]: unknown;
} | undefined;
icons?: {
src: string;
mimeType?: string | undefined;
sizes?: string[] | undefined;
theme?: "light" | "dark" | undefined;
}[] | undefined;
title?: string | undefined;
} | {
type: "resource";
resource: {
uri: string;
text: string;
mimeType?: string | undefined;
_meta?: {
[x: string]: unknown;
} | undefined;
} | {
uri: string;
blob: string;
mimeType?: string | undefined;
_meta?: {
[x: string]: unknown;
} | undefined;
};
annotations?: {
audience?: ("user" | "assistant")[] | undefined;
priority?: number | undefined;
lastModified?: string | undefined;
} | undefined;
_meta?: {
[x: string]: unknown;
} | undefined;
})[];
_meta?: {
[x: string]: unknown;
"io.modelcontextprotocol/serverInfo"?: {
version: string;
name: string;
websiteUrl?: string | undefined;
description?: string | undefined;
icons?: {
src: string;
mimeType?: string | undefined;
sizes?: string[] | undefined;
theme?: "light" | "dark" | undefined;
}[] | undefined;
title?: string | undefined;
} | undefined;
} | undefined;
structuredContent?: unknown;
isError?: boolean | undefined;
} | {
success: boolean;
notes: NoteInfo[];
count: number;
notFound: number;
requestedIds: number[];
message: string;
models: string[];
cssNote: string;
hint: string;
}>;
}