Skip to main content
Glama

get_note_info

Retrieve detailed note data, including filename for link creation, by specifying the title or filename. Optionally filter by note type or vault ID to enhance search precision.

Instructions

Get detailed information about a note including filename for link creation

Input Schema

NameRequiredDescriptionDefault
title_or_filenameYesNote title or filename to look up
typeNoOptional: note type to narrow search
vault_idNoOptional vault ID to operate on. If not provided, uses the current active vault.

Input Schema (JSON Schema)

{ "properties": { "title_or_filename": { "description": "Note title or filename to look up", "type": "string" }, "type": { "description": "Optional: note type to narrow search", "type": "string" }, "vault_id": { "description": "Optional vault ID to operate on. If not provided, uses the current active vault.", "type": "string" } }, "required": [ "title_or_filename" ], "type": "object" }

Implementation Reference

  • The core handler function `handleGetNoteInfo` that implements the logic for the 'get_note_info' tool. It validates arguments, resolves the vault context, searches for notes matching the title_or_filename (optionally filtered by type), and returns structured information including filename, wikilink formats, and suggested wikilinks.
    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 ) } ] }; };
  • Registration of the 'get_note_info' tool in the MCP server's CallToolRequestHandler switch statement, mapping the tool name to the NoteHandlers.handleGetNoteInfo method.
    case 'get_note_info': return await this.noteHandlers.handleGetNoteInfo( args as unknown as GetNoteInfoArgs );
  • MCP tool schema definition for 'get_note_info' provided in the ListTools response, defining input parameters: title_or_filename (required), type (optional), vault_id (optional).
    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'] } },
  • TypeScript interface defining the input arguments for the get_note_info handler.
    export interface GetNoteInfoArgs { title_or_filename: string; type?: string; vault_id?: string; }
  • Validation rules for get_note_info tool arguments used by validateToolArgs function.
    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 } ],

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