Skip to main content
Glama

list_system_json

Retrieve all available system JSON files with their names, domains, and descriptions to access structured data for enhanced reasoning and memory storage.

Instructions

List all available system JSON files.

Returns list of all system JSON files with their names, domains, and descriptions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core handler implementation in SystemJSON class that lists all system JSON files by reading the storage directory, parsing each JSON, and extracting name, domain, description. Sorts alphabetically and handles errors gracefully.
    async listSystemJSON(): Promise<{ files: Array<{ name: string; domain: string; description: string }> }> { try { const files = await fs.readdir(this.systemJsonPath); const systemFiles = []; for (const file of files) { if (file.endsWith('.json') && !file.endsWith('.tmp')) { try { const filePath = path.join(this.systemJsonPath, file); const jsonContent = await fs.readFile(filePath, 'utf-8'); const data = JSON.parse(jsonContent) as SystemJSONData; systemFiles.push({ name: data.name, domain: data.domain, description: data.description }); } catch (error) { // Skip corrupted files console.error(`Skipping corrupted system JSON file: ${file}`, error); } } } return { files: systemFiles.sort((a, b) => a.name.localeCompare(b.name)) }; } catch (error) { console.error('Failed to list system JSON files:', error); return { files: [] }; } }
  • Tool handler wrapper in AdvancedReasoningServer that calls SystemJSON.listSystemJSON(), formats the result as MCP-standard content response, and handles errors.
    public async listSystemJSON(): Promise<{ content: Array<{ type: string; text: string }>; isError?: boolean }> { try { const result = await this.systemJson.listSystemJSON(); return { content: [{ type: "text", text: JSON.stringify({ files: result.files, totalFiles: result.files.length, 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:1452-1453 (registration)
    Dispatch registration in the CallToolRequestHandler switch statement that routes 'list_system_json' tool calls to the reasoningServer handler.
    case "list_system_json": return await reasoningServer.listSystemJSON();
  • Tool definition including name, description, and input schema (no required parameters).
    const LIST_SYSTEM_JSON_TOOL: Tool = { name: "list_system_json", description: `List all available system JSON files. Returns list of all system JSON files with their names, domains, and descriptions.`, inputSchema: { type: "object", properties: {}, required: [] } };
  • src/index.ts:1405-1405 (registration)
    Registration of the LIST_SYSTEM_JSON_TOOL in the tools array returned by ListToolsRequestHandler.
    LIST_SYSTEM_JSON_TOOL

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