Skip to main content
Glama
kj455
by kj455
createNote.ts2.26 kB
import { createNote } from '../graphql/queries/createNote' import { uuid } from '../utils' import { ToolDefinition } from './types' export type CreateNoteArgs = { title: string content: string groupIds: string[] coediting: boolean folders?: string[] authorId?: string draft?: boolean } export const createNoteTool: ToolDefinition<CreateNoteArgs> = { tool: { name: 'kibela_create_note', description: 'Create a new note in Kibela.', inputSchema: { type: 'object', properties: { title: { type: 'string', description: 'required: Title of the note', }, content: { type: 'string', description: 'required: Content of the note in markdown format', }, groupIds: { type: 'array', items: { type: 'string', }, description: 'required: IDs of the groups to create the note in.', }, folders: { type: 'array', items: { type: 'string', }, description: 'IDs of the folders to add the note to.', }, authorId: { type: 'string', description: 'ID of the author of the note. If not specified, the note will be created by the authenticated user.', }, coediting: { type: 'boolean', description: 'required: Whether to enable co-editing for the note', }, draft: { type: 'boolean', description: 'Whether to create the note as a draft', }, }, required: ['title', 'content'], }, }, handler: async ({ title, content, groupIds, folders, authorId, coediting, draft }) => { if (!title || !content || !groupIds || !coediting) { throw new Error('Title, content, groupIds, and coediting are required') } const response = await createNote({ input: { clientMutationId: uuid(), title, content, groupIds, folders, authorId, coediting, draft, }, }) return { content: [ { type: 'text', text: JSON.stringify(response.createNote, 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