kibela_like_note
Like a note in Kibela by specifying its note ID.
Instructions
Like a note
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| noteId | Yes | Note ID |
Implementation Reference
- src/kibela.ts:137-147 (schema)Schema/definition of the 'kibela_like_note' tool. Defines its name, description, and input schema requiring a 'noteId' string.
const LIKE_NOTE_TOOL: Tool = { name: "kibela_like_note", description: "Like a note", inputSchema: { type: "object", properties: { noteId: { type: "string", description: "Note ID" }, }, required: ["noteId"], }, }; - src/kibela.ts:206-221 (registration)Registration of the LIKE_NOTE_TOOL in the ListToolsRequestSchema handler, making it available to the client.
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, ], })); - src/kibela.ts:585-614 (handler)Handler logic for 'kibela_like_note' tool. Extracts noteId from args, executes a GraphQL 'like' mutation via the Kibela API, and returns the likers list.
case "kibela_like_note": { const noteId = args.noteId as string; const operation = ` mutation LikeNote($input: LikeInput!) { like(input: $input) { clientMutationId likers(first: 3) { nodes { id account realName } } } } `; const response = await client.request<LikeResponse>(operation, { input: { noteId }, }); return { content: [ { type: "text", text: JSON.stringify(response.like, null, 2), }, ], }; } - src/types.ts:121-128 (helper)TypeScript interface for the GraphQL response type 'LikeResponse' used by the like mutation.
export interface LikeResponse { like: { clientMutationId: string; likers: { nodes: KibelaUser[]; }; }; }