Skip to main content
Glama
kj455
by kj455

kibela_search_notes

Search and retrieve Kibela notes using a specific query with the MCP Kibela server. Access stored information quickly to support note management and updates.

Instructions

Search Kibela notes by query

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query

Implementation Reference

  • The handler function that implements the core logic of the 'kibela_search_notes' tool. It validates the query input, fetches notes via the searchNotes GraphQL helper, processes the response to extract document nodes, and returns the notes as a JSON-formatted text content block.
    handler: async (args) => { if (!args.query) { throw new Error('Query is required') } const response = await searchNotes({ query: args.query }) const edges = response.search?.edges ?? [] const notes = edges .filter((edge): edge is NonNullable<(typeof edges)[number]> => edge != null) .filter((edge) => edge.node?.document != null) .map((edge) => edge.node?.document) return { content: [ { type: 'text', text: JSON.stringify(notes, null, 2), }, ], } },
  • The tool metadata including name, description, and input schema for validating the 'query' parameter.
    tool: { name: 'kibela_search_notes', description: 'Search Kibela notes by query', inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'Search query', }, }, required: ['query'], }, },
  • Registers 'kibela_search_notes' by mapping it to searchNotesTool in the central toolDefinitions object, enabling lookup and execution via handleToolRequest.
    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
  • Supporting GraphQL utility function called by the tool handler to perform the actual note search query.
    export async function searchNotes(variables: SearchNotesVariables): Promise<SearchNotesResponse> { return gqlRequest(searchNotesQuery, variables) }
  • GraphQL query document used by the searchNotes helper to fetch notes by query.
    const searchNotesQuery: TypedDocumentNode<SearchNotesResponse, SearchNotesVariables> = gql` query SearchNotes($query: String!) { search(query: $query, first: 15) { edges { node { document { ... on Note { id title url } } } } } } `

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