Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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 }; } }
  • 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 ], }));

Other Tools

Related Tools

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/angrysky56/advanced-reasoning-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server