get_system_json
Retrieve complete system JSON data by specifying the file name to access metadata and content on the Advanced Reasoning MCP Server.
Instructions
Retrieve a system JSON file by name.
Parameters:
name: Name of the system JSON file to retrieve (required)
Returns the complete system JSON data including metadata and content.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name of the system JSON file to retrieve |
Implementation Reference
- src/index.ts:160-174 (handler)Core handler implementation in SystemJSON class that reads the JSON file from disk, parses it, and returns the data or handles errors like file not found.async getSystemJSON(name: string): Promise<{ success: boolean; data?: SystemJSONData; message: string }> { try { const fileName = `${name}.json`; const filePath = path.join(this.systemJsonPath, fileName); const jsonContent = await fs.readFile(filePath, 'utf-8'); const data = JSON.parse(jsonContent) as SystemJSONData; return { success: true, data, message: `Retrieved system JSON: ${name}` }; } catch (error) { if ((error as NodeJS.ErrnoException).code === 'ENOENT') { return { success: false, message: `System JSON "${name}" not found` }; } return { success: false, message: `Failed to retrieve system JSON: ${error}` }; }
- src/index.ts:951-979 (handler)Tool-specific handler in AdvancedReasoningServer that delegates to SystemJSON.getSystemJSON and formats the MCP-compliant response.public async getSystemJSON(name: string): Promise<{ content: Array<{ type: string; text: string }>; isError?: boolean }> { try { const result = await this.systemJson.getSystemJSON(name); return { content: [{ type: "text", text: JSON.stringify({ name, success: result.success, message: result.message, data: result.data || null }, null, 2) }], isError: !result.success }; } 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:1352-1354 (registration)Dispatch handler in the main CallToolRequestSchema switch statement that routes tool calls to the appropriate method.case "get_system_json": const { name: getSysJsonName } = args as { name: string }; return await reasoningServer.getSystemJSON(getSysJsonName);
- src/index.ts:1240-1255 (registration)Tool registration: defines the tool metadata, description, and input schema, registered in ListToolsRequestHandler.const GET_SYSTEM_JSON_TOOL: Tool = { name: "get_system_json", description: `Retrieve a system JSON file by name. Parameters: - name: Name of the system JSON file to retrieve (required) Returns the complete system JSON data including metadata and content.`, inputSchema: { type: "object", properties: { name: { type: "string", description: "Name of the system JSON file to retrieve" } }, required: ["name"] } };
- src/index.ts:1248-1254 (schema)Input schema definition for the get_system_json tool, specifying the required 'name' parameter.inputSchema: { type: "object", properties: { name: { type: "string", description: "Name of the system JSON file to retrieve" } }, required: ["name"] }