Skip to main content
Glama
kiwamizamurai

Kibela MCP Server

kibela_search_notes

Retrieve notes from Kibela by specifying a search query and applying filters for co-editing, archive, sort, users, or folders.

Instructions

Search Kibela notes with given query

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query
coeditingNoFilter by co-editing status
isArchivedNoFilter by archive status
sortByNoSort by (RELEVANT, CONTENT_UPDATED_AT)
userIdsNoFilter by user IDs
folderIdsNoFilter by folder IDs

Implementation Reference

  • The handler case for 'kibela_search_notes' in the CallToolRequestSchema. It extracts query parameters, executes the GraphQL search query via the client, filters out null documents, and returns the results as JSON.
    case "kibela_search_notes": {
      const { query, coediting, isArchived, sortBy, userIds, folderIds } = args as {
        query: string;
        coediting?: boolean;
        isArchived?: boolean;
        sortBy?: string;
        userIds?: string[];
        folderIds?: string[];
      };
    
      const operation = `
        query SearchNotes(
          $query: String!,
          $coediting: Boolean,
          $isArchived: Boolean,
          $sortBy: SearchSortKind,
          $userIds: [ID!],
          $folderIds: [ID!]
        ) {
          search(
            query: $query,
            first: 15,
            coediting: $coediting,
            isArchived: $isArchived,
            sortBy: $sortBy,
            userIds: $userIds,
            folderIds: $folderIds
          ) {
            edges {
              node {
                document {
                  ... on Note {
                    id
                    title
                    url
                    contentUpdatedAt
                    author {
                      id
                      account
                      realName
                    }
                    groups {
                      id
                      name
                    }
                  }
                }
              }
            }
          }
        }
      `;
    
      const response = await client.request<SearchResponse>(operation, {
        query,
        coediting,
        isArchived,
        sortBy,
        userIds,
        folderIds,
      });
    
      const notes = response.search.edges
        .filter((edge) => edge.node.document !== null)
        .map((edge) => edge.node.document);
    
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(notes, null, 2),
          },
        ],
      };
    }
  • The SEARCH_NOTES_TOOL definition with name 'kibela_search_notes', description, and inputSchema (query, coediting, isArchived, sortBy, userIds, folderIds).
    const SEARCH_NOTES_TOOL: Tool = {
      name: "kibela_search_notes",
      description: "Search Kibela notes with given query",
      inputSchema: {
        type: "object",
        properties: {
          query: { type: "string", description: "Search query" },
          coediting: { type: "boolean", description: "Filter by co-editing status" },
          isArchived: { type: "boolean", description: "Filter by archive status" },
          sortBy: { type: "string", description: "Sort by (RELEVANT, CONTENT_UPDATED_AT)" },
          userIds: { type: "array", items: { type: "string" }, description: "Filter by user IDs" },
          folderIds: { type: "array", items: { type: "string" }, description: "Filter by folder IDs" },
        },
        required: ["query"],
      },
    };
  • src/kibela.ts:206-221 (registration)
    Tool registration in ListToolsRequestSchema handler, where SEARCH_NOTES_TOOL is listed in the tools array.
    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,
      ],
    }));
  • The SearchResponse type definition used as the response type for the search GraphQL query.
    export interface SearchResponse {
      search: {
        edges: Array<{
          node: {
            document: KibelaNote | null;
          };
        }>;
      };
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, and the description does not disclose any behavioral traits such as pagination, rate limits, or side effects. It does not even state that it is a read operation, leaving the agent without critical context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence, but it lacks any additional structure or detail. It is efficient but could include more context without being verbose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite having 6 parameters and no output schema, the description fails to explain the return format or search behavior. It is incomplete for a tool of this complexity, as it does not describe what results look like or how filtering works.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all six parameters. The description adds no additional meaning beyond the schema, earning the baseline score of 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool searches Kibela notes with a query, using a specific verb and resource. It distinguishes itself from siblings like kibela_get_note_content which retrieves a single note, and kibela_get_my_notes which is personal.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for searching notes but provides no guidance on when to use this tool versus alternatives like kibela_get_note_content or kibela_get_my_notes. No exclusions or context are given.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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

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