kibela_get_my_notes
Fetches your recent notes from Kibela, with an optional limit on the number returned.
Instructions
Get my latest notes from Kibela
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of notes to fetch |
Implementation Reference
- src/tools/getMyNotes.ts:8-43 (handler)Tool definition with handler for kibela_get_my_notes. Calls getMyNotes GraphQL query and returns notes as JSON text content.
export const getMyNotesTool: ToolDefinition<GetMyNotesArgs> = { 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, }, }, }, }, 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:4-22 (schema)Input type definition for the tool (optional limit parameter).
export type GetMyNotesArgs = { limit?: number } export const getMyNotesTool: ToolDefinition<GetMyNotesArgs> = { 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)Tool registration mapping the name 'kibela_get_my_notes' to getMyNotesTool.
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 - GraphQL query function that fetches the current user's latest notes from Kibela API.
export async function getMyNotes(variables: GetMyNotesVariables): Promise<GetMyNotesResponse> { return gqlRequest(getMyNotesQuery, variables) } - Type definitions for the GraphQL query variables and response shape.
type GetMyNotesResponse = { currentUser: { latestNotes: { totalCount: number edges: { node: { id: string title: string url: string } }[] } } } type GetMyNotesVariables = { limit: number }