Skip to main content
Glama
notes-list.ts858 B
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { NotesCache } from "../cache"; export function registerNotesListResource(server: McpServer, cache: NotesCache): void { server.registerResource( "notes", "minote://notes", { title: "全部笔记", description: "列出所有小米笔记的基础信息", mimeType: "text/plain", }, async () => { const items = cache.getNotesListItems().map((item, index) => { const modify = new Date(item.modifyDate).toISOString(); return `${index + 1}. [${item.id}] ${item.title} (${modify})`; }); const body = items.length > 0 ? items.join("\n") : "暂无笔记"; return { contents: [ { uri: "minote://notes", text: body, }, ], }; } ); }

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/LaelLuo/mi_note_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server