Skip to main content
Glama

list_system_json

Retrieve a list of all system JSON files, including names, domains, and descriptions, to enhance structured data access and organization within the Advanced Reasoning MCP Server.

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

  • Main tool handler method in AdvancedReasoningServer class. Delegates to SystemJSON.listSystemJSON() and formats the MCP-compliant response with JSON content.
    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 }; } }
  • Core implementation logic in SystemJSON class that scans the filesystem directory for .json files, parses them, extracts metadata (name, domain, description), and returns sorted list.
    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: [] }; } }
  • src/index.ts:1274-1284 (registration)
    Tool object definition and registration including name, description, and empty input schema (no parameters required).
    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:1360-1362 (registration)
    Dispatch case in the main CallToolRequestSchema handler that routes 'list_system_json' calls to the handler method.
    case "list_system_json": return await reasoningServer.listSystemJSON();
  • Input schema definition for the tool (empty object, no input parameters).
    inputSchema: { type: "object", properties: {}, required: [] }

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