Skip to main content
Glama

create_note_type

Define custom note types with structured metadata schemas and agent instructions for organized AI-assisted note-taking in Flint Note.

Instructions

Create a new note type with description, agent instructions, and metadata schema

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
type_nameYesName of the note type (filesystem-safe)
descriptionYesDescription of the note type purpose and usage
agent_instructionsNoOptional custom agent instructions for this note type
metadata_schemaNoOptional metadata schema definition for this note type
vault_idNoOptional vault ID to operate on. If not provided, uses the current active vault.

Implementation Reference

  • The primary handler function for the 'create_note_type' MCP tool. Validates input arguments using validateToolArgs('create_note_type', args) and delegates to noteTypeManager.createNoteType to perform the actual creation.
    handleCreateNoteType = async (args: CreateNoteTypeArgs) => { // Validate arguments validateToolArgs('create_note_type', args); const { noteTypeManager } = await this.resolveVaultContext(args.vault_id); await noteTypeManager.createNoteType( args.type_name, args.description, args.agent_instructions, args.metadata_schema ); return { content: [ { type: 'text', text: JSON.stringify( { success: true, message: `Created note type '${args.type_name}' successfully`, type_name: args.type_name }, null, 2 ) } ] }; };
  • Registration of the tool handler in the MCP server's CallToolRequestSchema request handler switch statement.
    case 'create_note_type': return await this.noteTypeHandlers.handleCreateNoteType( args as unknown as CreateNoteTypeArgs );
  • MCP tool schema definition including inputSchema, properties, and required fields for create_note_type.
    name: 'create_note_type', description: 'Create a new note type with description, agent instructions, and metadata schema', inputSchema: { type: 'object', properties: { type_name: { type: 'string', description: 'Name of the note type (filesystem-safe)' }, description: { type: 'string', description: 'Description of the note type purpose and usage' }, agent_instructions: { type: 'array', items: { type: 'string' }, description: 'Optional custom agent instructions for this note type' }, metadata_schema: { type: 'object', properties: { fields: { type: 'array', items: { type: 'object', properties: { name: { type: 'string', description: 'Name of the metadata field' }, type: { type: 'string', enum: ['string', 'number', 'boolean', 'date', 'array', 'select'], description: 'Type of the metadata field' }, description: { type: 'string', description: 'Optional description of the field' }, required: { type: 'boolean', description: 'Whether this field is required' }, constraints: { type: 'object', description: 'Optional field constraints (min, max, options, etc.)' }, default: { description: 'Optional default value for the field' } }, required: ['name', 'type'] } }, version: { type: 'string', description: 'Optional schema version' } }, required: ['fields'], description: 'Optional metadata schema definition for this note type' }, vault_id: { type: 'string', description: 'Optional vault ID to operate on. If not provided, uses the current active vault.' } }, required: ['type_name', 'description'] }
  • src/server.ts:314-396 (registration)
    Tool metadata and schema registration in the ListToolsRequestSchema handler, which is served to MCP clients.
    { name: 'create_note_type', description: 'Create a new note type with description, agent instructions, and metadata schema', inputSchema: { type: 'object', properties: { type_name: { type: 'string', description: 'Name of the note type (filesystem-safe)' }, description: { type: 'string', description: 'Description of the note type purpose and usage' }, agent_instructions: { type: 'array', items: { type: 'string' }, description: 'Optional custom agent instructions for this note type' }, metadata_schema: { type: 'object', properties: { fields: { type: 'array', items: { type: 'object', properties: { name: { type: 'string', description: 'Name of the metadata field' }, type: { type: 'string', enum: [ 'string', 'number', 'boolean', 'date', 'array', 'select' ], description: 'Type of the metadata field' }, description: { type: 'string', description: 'Optional description of the field' }, required: { type: 'boolean', description: 'Whether this field is required' }, constraints: { type: 'object', description: 'Optional field constraints (min, max, options, etc.)' }, default: { description: 'Optional default value for the field' } }, required: ['name', 'type'] } }, version: { type: 'string', description: 'Optional schema version' } }, required: ['fields'], description: 'Optional metadata schema definition for this note type' }, vault_id: { type: 'string', description: 'Optional vault ID to operate on. If not provided, uses the current active vault.' } }, required: ['type_name', 'description'] } },
  • TypeScript interface defining the expected arguments for the create_note_type tool.
    export interface CreateNoteTypeArgs { type_name: string; description: string; agent_instructions?: string[]; metadata_schema?: MetadataSchema; 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