kibela_get_my_notes
Retrieve your most recent notes from Kibela, with customizable limits, using the MCP Kibela server to streamline access and organization of information.
Instructions
Get my latest notes from Kibela
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of notes to fetch |
Implementation Reference
- src/tools/getMyNotes.ts:23-42 (handler)The async handler function that processes input arguments, fetches the user's latest notes via GraphQL query, filters and maps the response, and returns the notes as a formatted JSON string in a tool response content block.handler: async (args) => { const limit = args.limit ?? 10 const response = await getMyNotes({ limit }) const edges = response.currentUser?.latestNotes?.edges ?? [] const notes = edges .filter((edge): edge is NonNullable<(typeof edges)[number]> => edge != null) .filter((edge) => edge.node != null) .map((edge) => edge.node) return { content: [ { type: 'text', text: JSON.stringify(notes, null, 2), }, ], } },
- src/tools/getMyNotes.ts:9-22 (schema)The tool schema definition, including the name 'kibela_get_my_notes', description, and input schema for the optional 'limit' parameter with default 10.tool: { name: 'kibela_get_my_notes', description: 'Get my latest notes from Kibela', inputSchema: { type: 'object', properties: { limit: { type: 'number', description: 'Maximum number of notes to fetch', default: 10, }, }, }, },
- src/tools/index.ts:9-16 (registration)Registration of all tools, including 'kibela_get_my_notes' mapped to getMyNotesTool, in the toolDefinitions object used for dispatching tool requests.const toolDefinitions = { kibela_search_notes: searchNotesTool, kibela_get_my_notes: getMyNotesTool, kibela_get_note_content: getNoteContentTool, kibela_get_note_from_path: getNoteFromPathTool, kibela_update_note_content: updateNoteContentTool, kibela_create_note: createNoteTool, } as const
- Helper function that executes the GraphQL query for fetching the current user's latest notes, used by the tool handler.export async function getMyNotes(variables: GetMyNotesVariables): Promise<GetMyNotesResponse> { return gqlRequest(getMyNotesQuery, variables) }