kibela_get_note_from_path
Retrieve a Kibela note's full content by providing its path (e.g., /notes/123). Access note data directly via this tool.
Instructions
Get note content by note path
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Note path (e.g. /notes/123) |
Implementation Reference
- src/tools/getNoteFromPath.ts:23-43 (handler)The handler function that executes the tool logic. Validates path argument, calls the GQL query getNoteFromPath, and returns the note content as JSON.
handler: async (args) => { if (!args.path) { throw new Error('Note path is required') } const response = await getNoteFromPath({ path: args.path }) if (!response.noteFromPath) { throw new Error('Note not found') } return { content: [ { type: 'text', text: JSON.stringify(response.noteFromPath, null, 2), }, ], } }, } - src/tools/getNoteFromPath.ts:12-21 (schema)Input schema for the tool. Defines 'path' as a required string parameter.
inputSchema: { type: 'object', properties: { path: { type: 'string', description: 'Note path (e.g. /notes/123)', }, }, required: ['path'], }, - GraphQL query definition and execution function for noteFromPath. Contains the query string and the async function that makes the GQL request.
const getNoteFromPathQuery: TypedDocumentNode<GetNoteFromPathResponse, GetNoteFromPathVariables> = gql` query GetNoteFromPath($path: String!) { noteFromPath(path: $path) { id title content } } ` export async function getNoteFromPath(variables: GetNoteFromPathVariables): Promise<GetNoteFromPathResponse> { return gqlRequest(getNoteFromPathQuery, variables) } - src/tools/index.ts:13-16 (registration)Registration of 'kibela_get_note_from_path' in the toolDefinitions map, mapping it to getNoteFromPathTool.
kibela_get_note_from_path: getNoteFromPathTool, kibela_update_note_content: updateNoteContentTool, kibela_create_note: createNoteTool, } as const