get_note
Retrieve a specific note by its identifier from the Flint Note vault. Specify optional fields or vault ID to customize the returned data for efficient note management.
Instructions
Retrieve a specific note by identifier
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| 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. | |
| 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. |
Input Schema (JSON Schema)
{
"properties": {
"fields": {
"description": "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.",
"items": {
"type": "string"
},
"type": "array"
},
"identifier": {
"description": "Note identifier in format \"type/filename\" or full path",
"type": "string"
},
"vault_id": {
"description": "Optional vault ID to operate on. If not provided, uses the current active vault.",
"type": "string"
}
},
"required": [
"identifier"
],
"type": "object"
}
Implementation Reference
- src/server/note-handlers.ts:110-129 (handler)The handleGetNote method that executes the core logic of the 'get_note' tool: validates input, retrieves the note by identifier from the noteManager, applies optional field filtering, and returns the note as JSON.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)MCP tool schema definition for 'get_note', including input schema with properties for identifier, optional vault_id, and fields.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-1241 (registration)Registration of the 'get_note' tool handler in the CallToolRequestSchema switch statement, mapping the tool name to NoteHandlers.handleGetNote.case 'get_note': return await this.noteHandlers.handleGetNote(args as unknown as GetNoteArgs);
- src/server/types.ts:38-42 (schema)TypeScript interface GetNoteArgs defining the input parameters for the get_note handler.export interface GetNoteArgs { identifier: string; vault_id?: string; fields?: string[]; }
- src/server.ts:460-484 (registration)Inline schema registration for 'get_note' tool in the ListToolsRequestSchema handler response.name: 'get_note', description: 'Retrieve a specific note by identifier', inputSchema: { type: 'object', properties: { identifier: { type: 'string', description: 'Note identifier in format "type/filename" or full path' }, vault_id: { type: 'string', description: 'Optional vault ID to operate on. If not provided, uses the current active vault.' }, fields: { type: 'array', items: { type: 'string' }, description: '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.' } }, required: ['identifier'] }