get_note
Retrieve specific notes by identifier from your Flint Note vault to access organized markdown files with semantic types for AI collaboration.
Instructions
Retrieve a specific note by identifier
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| identifier | Yes | Note identifier in format "type/filename" or full path | |
| vault_id | No | Optional vault ID to operate on. If not provided, uses the current active vault. | |
| fields | No | Optional array of field names to include in response. Supports dot notation for nested fields (e.g. "metadata.tags") and wildcard patterns (e.g. "metadata.*"). If not specified, all fields are returned. |
Implementation Reference
- src/server/note-handlers.ts:110-129 (handler)The handleGetNote method implements the core logic for the 'get_note' tool. It validates input arguments, resolves the vault context, fetches the note using noteManager.getNote(args.identifier), optionally filters fields using filterNoteFields, and returns the result as a JSON text content block.handleGetNote = async (args: GetNoteArgs) => { // Validate arguments validateToolArgs('get_note', args); const { noteManager } = await this.resolveVaultContext(args.vault_id); const note = await noteManager.getNote(args.identifier); // Apply field filtering if specified const filteredNote = note ? filterNoteFields(note, args.fields) : null; return { content: [ { type: 'text', text: JSON.stringify(filteredNote, null, 2) } ] }; };
- src/server/tool-schemas.ts:152-177 (schema)The JSON schema definition for the 'get_note' tool input parameters, used for validation. Requires 'identifier' (string), optional 'vault_id' (string) and 'fields' (array of strings for field selection).name: 'get_note', description: 'Retrieve a specific note by identifier with optional field filtering', inputSchema: { type: 'object', properties: { identifier: { type: 'string', description: 'Note identifier in type/filename format' }, vault_id: { type: 'string', description: 'Optional vault ID to search in. If not provided, uses the current active vault.' }, fields: { type: 'array', items: { type: 'string' }, description: 'Optional list of fields to include in response (id, title, content, type, filename, path, created, updated, size, metadata)' } }, required: ['identifier'] } },
- src/server.ts:1240-1246 (registration)Registration of the 'get_note' tool handler in the MCP server's CallToolRequestSchema dispatch switch statement, mapping tool calls to this.noteHandlers.handleGetNote.case 'get_note': return await this.noteHandlers.handleGetNote(args as unknown as GetNoteArgs); case 'get_notes': return await this.noteHandlers.handleGetNotes( args as unknown as GetNotesArgs ); case 'update_note':
- src/server/types.ts:38-42 (schema)TypeScript interface defining the input arguments for the get_note handler, used for type safety.export interface GetNoteArgs { identifier: string; vault_id?: string; fields?: string[]; }