get_current_library_info
Retrieve details about the active memory library, including its name, node count, sessions, and metadata, to support structured reasoning and memory storage.
Instructions
Get information about the currently active memory library.
Shows current library name, number of nodes, sessions, and other metadata.
Returns current library information.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:851-875 (handler)The core handler function that executes the tool logic: retrieves the current library name and memory statistics, formats them as JSON, and returns a structured response with error handling.public getCurrentLibraryInfo(): { content: Array<{ type: string; text: string }>; isError?: boolean } { try { return { content: [{ type: "text", text: JSON.stringify({ currentLibrary: this.memory.getCurrentLibraryName(), memoryStats: this.memory.getMemoryStats(), status: 'success' }, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: JSON.stringify({ error: error instanceof Error ? error.message : String(error), status: 'failed' }, null, 2) }], isError: true }; } }
- src/index.ts:1201-1213 (schema)Tool schema definition including name, description, and input schema (empty object, no required parameters). The output type is defined in the handler method signature.const GET_LIBRARY_INFO_TOOL: Tool = { name: "get_current_library_info", description: `Get information about the currently active memory library. Shows current library name, number of nodes, sessions, and other metadata. Returns current library information.`, inputSchema: { type: "object", properties: {}, required: [] } };
- src/index.ts:1339-1341 (registration)Registration in the CallToolRequestHandler switch statement, which dispatches tool calls to the appropriate handler method.case "get_current_library_info": return reasoningServer.getCurrentLibraryInfo();
- src/index.ts:1303-1315 (registration)Registration of the tool object in the ListToolsRequestHandler response, making it discoverable to clients.tools: [ ADVANCED_REASONING_TOOL, QUERY_MEMORY_TOOL, CREATE_LIBRARY_TOOL, LIST_LIBRARIES_TOOL, SWITCH_LIBRARY_TOOL, GET_LIBRARY_INFO_TOOL, CREATE_SYSTEM_JSON_TOOL, GET_SYSTEM_JSON_TOOL, SEARCH_SYSTEM_JSON_TOOL, LIST_SYSTEM_JSON_TOOL ], }));