Skip to main content
Glama
kj455
by kj455
getMyNotes.ts1.02 kB
import { getMyNotes } from '../graphql' import { ToolDefinition } from './types' 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, }, }, }, }, 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), }, ], } }, }

Implementation Reference

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/kj455/mcp-kibela'

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