Skip to main content
Glama

create_note

Generate single or multiple notes with specified types, titles, content, and metadata. Organize notes in markdown format for efficient AI collaboration, using a structured vault system for storage and retrieval.

Instructions

Create one or more notes of the specified type(s)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentNoContent of the note in markdown format - only used for single note creation
metadataNoAdditional metadata fields for the note (validated against note type schema) - only used for single note creation
notesNoArray of notes to create - used for batch creation
titleNoTitle of the note - only used for single note creation
typeNoNote type (must exist) - only used for single note creation
vault_idNoOptional vault ID to operate on. If not provided, uses the current active vault.

Implementation Reference

  • Main handler function for the 'create_note' MCP tool. Validates input, resolves vault context, handles both single note and batch creation using noteManager, retrieves agent instructions, and returns formatted JSON response.
    handleCreateNote = async (args: CreateNoteArgs) => { // Validate arguments validateToolArgs('create_note', args); const { noteManager, noteTypeManager } = await this.resolveVaultContext( args.vault_id ); // Handle batch creation if notes array is provided if (args.notes) { const result = await noteManager.batchCreateNotes(args.notes); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2) } ] }; } // Handle single note creation if (!args.type || !args.title || !args.content) { throw new Error('Single note creation requires type, title, and content'); } const noteInfo = await noteManager.createNote( args.type, args.title, args.content, args.metadata || {} ); // Get agent instructions for this note type let agentInstructions: string[] = []; let nextSuggestions = ''; try { const typeInfo = await noteTypeManager.getNoteTypeDescription(args.type); agentInstructions = typeInfo.parsed.agentInstructions; if (agentInstructions.length > 0) { nextSuggestions = `Consider following these guidelines for ${args.type} notes: ${agentInstructions.join(', ')}`; } } catch { // Ignore errors getting type info, continue without instructions } return { content: [ { type: 'text', text: JSON.stringify( { ...noteInfo, agent_instructions: agentInstructions, next_suggestions: nextSuggestions }, null, 2 ) } ] }; };
  • MCP input schema definition for the create_note tool, supporting both single note and batch creation modes with validation rules.
    name: 'create_note', description: 'Create one or more notes of the specified type(s)', inputSchema: { type: 'object', properties: { type: { type: 'string', description: 'Type of note to create' }, title: { type: 'string', description: 'Title of the note' }, content: { type: 'string', description: 'Content of the note in markdown format', default: '' }, metadata: { type: 'object', description: 'Additional metadata for the note' }, vault_id: { type: 'string', description: 'Optional vault ID to create the note in. If not provided, uses the current active vault.' }, notes: { type: 'array', items: { type: 'object', properties: { type: { type: 'string', description: 'Type of note to create' }, title: { type: 'string', description: 'Title of the note' }, content: { type: 'string', description: 'Content of the note in markdown format', default: '' }, metadata: { type: 'object', description: 'Additional metadata for the note' } }, required: ['type', 'title'] }, description: 'Array of notes to create in batch (alternative to single note creation)' } }, oneOf: [ { required: ['type', 'title'] }, { required: ['notes'] } ] }
  • Registration/dispatch of the create_note tool in the MCP CallToolRequestSchema handler switch statement, mapping to NoteHandlers.handleCreateNote.
    return await this.noteHandlers.handleCreateNote( args as unknown as CreateNoteArgs );
  • TypeScript interface definition for CreateNoteArgs used by the create_note handler.
    export interface CreateNoteArgs { type?: string; title?: string; content?: string; metadata?: Record<string, unknown>; notes?: Array<{ type: string; title: string; content: string; metadata?: Record<string, unknown>; }>; vault_id?: string; }

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/disnet/flint-note'

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