get_note_info
Retrieve detailed note information including filenames for link creation in Flint Note's AI-collaborative vault system. Specify note title or filename to access metadata.
Instructions
Get detailed information about a note including filename for link creation
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title_or_filename | Yes | Note title or filename to look up | |
| type | No | Optional: note type to narrow search | |
| vault_id | No | Optional vault ID to operate on. If not provided, uses the current active vault. |
Implementation Reference
- src/server/note-handlers.ts:250-305 (handler)Core handler function that executes the get_note_info tool logic: validates args, searches notes by title_or_filename (optionally filtered by type), and returns structured note info including wikilink format or 'not found' message.handleGetNoteInfo = async (args: GetNoteInfoArgs) => { // Validate arguments validateToolArgs('get_note_info', args); const { noteManager } = await this.resolveVaultContext(args.vault_id); // Try to find the note by title or filename const searchResults = await noteManager.searchNotes({ query: args.title_or_filename, type_filter: args.type, limit: 5 }); if (searchResults.length === 0) { return { content: [ { type: 'text', text: JSON.stringify( { found: false, message: `No note found with title or filename: ${args.title_or_filename}` }, null, 2 ) } ] }; } // Return the best match with filename info const bestMatch = searchResults[0]; const filename = bestMatch.filename.replace('.md', ''); return { content: [ { type: 'text', text: JSON.stringify( { found: true, filename: filename, title: bestMatch.title, type: bestMatch.type, path: bestMatch.path, wikilink_format: `${bestMatch.type}/${filename}`, suggested_wikilink: `[[${bestMatch.type}/${filename}|${bestMatch.title}]]` }, null, 2 ) } ] }; };
- src/server.ts:1296-1299 (registration)Tool registration in the main MCP server switch statement that routes 'get_note_info' calls to the noteHandlers.handleGetNoteInfo method.case 'get_note_info': return await this.noteHandlers.handleGetNoteInfo( args as unknown as GetNoteInfoArgs );
- src/server.ts:982-1004 (schema)Input schema definition for the get_note_info tool provided to MCP clients via ListToolsRequest, defining title_or_filename as required with optional type filter and vault_id.name: 'get_note_info', description: 'Get detailed information about a note including filename for link creation', inputSchema: { type: 'object', properties: { title_or_filename: { type: 'string', description: 'Note title or filename to look up' }, type: { type: 'string', description: 'Optional: note type to narrow search' }, vault_id: { type: 'string', description: 'Optional vault ID to operate on. If not provided, uses the current active vault.' } }, required: ['title_or_filename'] } },
- src/server/types.ts:154-158 (schema)TypeScript interface defining the input arguments for the get_note_info handler.export interface GetNoteInfoArgs { title_or_filename: string; type?: string; vault_id?: string; }
- src/server/validation.ts:537-556 (helper)Validation rules used by validateToolArgs('get_note_info', args) to ensure required fields and types before handler execution.get_note_info: [ { field: 'title_or_filename', required: true, type: 'string', allowEmpty: false }, { field: 'type', required: false, type: 'string', allowEmpty: false }, { field: 'vault_id', required: false, type: 'string', allowEmpty: false } ],