kibela_get_folder_notes
Retrieve all notes from a specified folder in Kibela using folder ID. Optionally set a limit on the number of notes returned.
Instructions
Get notes in a folder
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| folderId | Yes | Folder ID | |
| limit | No | Number of notes to fetch (default 100) |
Implementation Reference
- src/kibela.ts:528-559 (handler)Handler for kibela_get_folder_notes: extracts folderId and optional limit (default 100), executes a GraphQL query GetFolderNotes against the folder's notes sorted by content updated time, and returns the notes as JSON.
case "kibela_get_folder_notes": { const { folderId, limit = 100 } = args as { folderId: string; limit?: number }; const operation = ` query GetFolderNotes($folderId: ID!, $limit: Int!) { folder(id: $folderId) { notes(first: $limit, active: true, orderBy: { field: CONTENT_UPDATED_AT, direction: DESC }) { nodes { id title contentUpdatedAt publishedAt author { account realName } } } } } `; const response = await client.request<FolderNotesResponse>(operation, { folderId, limit }); return { content: [ { type: "text", text: JSON.stringify(response.folder.notes.nodes, null, 2), }, ], }; } - src/kibela.ts:111-126 (schema)Schema definition for kibela_get_folder_notes tool, declaring folderId (required string) and limit (optional number, default 100) as input parameters.
const GET_FOLDER_NOTES_TOOL: Tool = { name: "kibela_get_folder_notes", description: "Get notes in a folder", inputSchema: { type: "object", properties: { folderId: { type: "string", description: "Folder ID" }, limit: { type: "number", description: "Number of notes to fetch (default 100)", default: 100, }, }, required: ["folderId"], }, }; - src/types.ts:183-198 (schema)TypeScript type definition for the GraphQL response of GetFolderNotes query, describing the shape of folder notes data.
export interface FolderNotesResponse { folder: { notes: { nodes: { id: string; title: string; contentUpdatedAt: string; publishedAt: string; author: { account: string; realName: string; }; }[]; }; }; } - src/kibela.ts:206-221 (registration)Registration of GET_FOLDER_NOTES_TOOL in the list of available tools exposed via ListToolsRequestSchema handler.
server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [ SEARCH_NOTES_TOOL, GET_MY_NOTES_TOOL, GET_NOTE_CONTENT_TOOL, GET_GROUPS_TOOL, GET_GROUP_FOLDERS_TOOL, GET_GROUP_NOTES_TOOL, GET_FOLDER_NOTES_TOOL, GET_USERS_TOOL, LIKE_NOTE_TOOL, UNLIKE_NOTE_TOOL, GET_RECENTLY_VIEWED_NOTES_TOOL, GET_NOTE_FROM_PATH_TOOL, ], }));