Skip to main content
Glama

create_note_type

Define and configure a new note type with custom description, agent instructions, and optional metadata schema for structured data organization in Flint Note.

Instructions

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

Input Schema

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

Input Schema (JSON Schema)

{ "properties": { "agent_instructions": { "description": "Optional custom agent instructions for this note type", "items": { "type": "string" }, "type": "array" }, "description": { "description": "Description of the note type purpose and usage", "type": "string" }, "metadata_schema": { "description": "Optional metadata schema definition for this note type", "properties": { "fields": { "items": { "properties": { "constraints": { "description": "Optional field constraints (min, max, options, etc.)", "type": "object" }, "default": { "description": "Optional default value for the field" }, "description": { "description": "Optional description of the field", "type": "string" }, "name": { "description": "Name of the metadata field", "type": "string" }, "required": { "description": "Whether this field is required", "type": "boolean" }, "type": { "description": "Type of the metadata field", "enum": [ "string", "number", "boolean", "date", "array", "select" ], "type": "string" } }, "required": [ "name", "type" ], "type": "object" }, "type": "array" }, "version": { "description": "Optional schema version", "type": "string" } }, "required": [ "fields" ], "type": "object" }, "type_name": { "description": "Name of the note type (filesystem-safe)", "type": "string" }, "vault_id": { "description": "Optional vault ID to operate on. If not provided, uses the current active vault.", "type": "string" } }, "required": [ "type_name", "description" ], "type": "object" }

Implementation Reference

  • MCP tool handler that validates input, resolves vault context, calls noteTypeManager.createNoteType, and returns success response
    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 in CallToolRequestSchema handler: routes 'create_note_type' tool calls to the handler method
    case 'create_note_type': return await this.noteTypeHandlers.handleCreateNoteType( args as unknown as CreateNoteTypeArgs );
  • Input schema definition for the create_note_type tool (matches the inline schema in server.ts ListTools response)
    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'] } },
  • Validation rules for create_note_type tool args used by validateToolArgs('create_note_type', args) in the handler
    create_note_type: [ { field: 'type_name', required: true, type: 'string', allowEmpty: false, customValidator: (value: any) => { // Check for filesystem-safe characters if (!/^[a-zA-Z0-9_-]+$/.test(value)) { return 'Invalid note type name'; } return null; } }, { field: 'description', required: true, type: 'string', allowEmpty: false }, { field: 'agent_instructions', required: false, type: 'array', arrayItemType: 'string', allowEmpty: true }, { field: 'metadata_schema', required: false, type: 'object' }, { field: 'vault_id', required: false, type: 'string', allowEmpty: false } ],
  • src/server.ts:314-396 (registration)
    Tool definition in ListToolsRequestSchema response, including name, description, and inputSchema (duplicated from tool-schemas.ts)
    { 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'] } },

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