Skip to main content
Glama
angrysky56

Advanced Reasoning MCP Server

create_system_json

Create structured JSON files to store searchable data, instructions, and workflows for any domain with organized parameters and tags.

Instructions

Create a new system JSON file for storing coherent detailed searchable data or instructions and workflows for any domain or action.

Parameters:

  • name: Name for the system JSON file (required) - alphanumeric, underscore, hyphen only

  • domain: Domain or category for the data (required)

  • description: Description of what this system JSON contains (required)

  • data: The structured data to store (required) - can be any JSON-serializable object

  • tags: Optional array of tags for searchability

Returns success status and confirmation message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName for the system JSON file (alphanumeric, underscore, hyphen only)
domainYesDomain or category for the data
descriptionYesDescription of what this system JSON contains
dataYesThe structured data to store
tagsNoOptional array of tags for searchability

Implementation Reference

  • Core handler function in SystemJSON class that validates the name, checks for existing files, generates searchable content, and performs atomic file write to create the system JSON file.
    async createSystemJSON(
      name: string,
      domain: string,
      description: string,
      data: Record<string, unknown>,
      tags: string[] = []
    ): Promise<{ success: boolean; message: string }> {
      try {
        // Validate name (alphanumeric, underscore, hyphen only)
        if (!/^[a-zA-Z0-9_-]+$/.test(name)) {
          return { success: false, message: 'Name must contain only letters, numbers, underscores, and hyphens' };
        }
    
        const fileName = `${name}.json`;
        const filePath = path.join(this.systemJsonPath, fileName);
    
        // Check if file already exists
        try {
          await fs.access(filePath);
          return { success: false, message: `System JSON "${name}" already exists` };
        } catch {
          // File doesn't exist, which is what we want
        }
    
        // Create searchable content from data
        const searchable_content = this.createSearchableContent(data, description, tags);
    
        const systemData: SystemJSONData = {
          name,
          domain,
          description,
          data,
          searchable_content,
          tags,
          created: Date.now(),
          modified: Date.now()
        };
    
        // Atomic write
        const tempPath = path.join(this.systemJsonPath, `${fileName}.tmp`);
        const jsonContent = JSON.stringify(systemData, null, 2);
        await fs.writeFile(tempPath, jsonContent, 'utf-8');
    
        // Validate JSON before committing
        try {
          JSON.parse(jsonContent);
          await fs.rename(tempPath, filePath);
        } catch (parseError) {
          await fs.unlink(tempPath).catch(() => { });
          throw new Error(`JSON validation failed: ${parseError}`);
        }
    
        return { success: true, message: `Created system JSON: ${name}` };
      } catch (error) {
        return { success: false, message: `Failed to create system JSON: ${error}` };
      }
    }
  • Wrapper handler in AdvancedReasoningServer that delegates to SystemJSON.createSystemJSON and formats the MCP tool response.
    public async createSystemJSON(
      name: string,
      domain: string,
      description: string,
      data: Record<string, unknown>,
      tags: string[] = []
    ): Promise<{ content: Array<{ type: string; text: string }>; isError?: boolean }> {
      try {
        const result = await this.systemJson.createSystemJSON(name, domain, description, data, tags);
    
        return {
          content: [{
            type: "text",
            text: JSON.stringify({
              name,
              domain,
              description,
              success: result.success,
              message: result.message,
              tags,
              created: Date.now()
            }, 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
        };
      }
  • Schema and metadata definition for the create_system_json tool, including input validation schema.
    const CREATE_SYSTEM_JSON_TOOL: Tool = {
      name: "create_system_json",
      description: `Create a new system JSON file for storing coherent detailed searchable data or instructions and workflows for any domain or action.
    
    Parameters:
    - name: Name for the system JSON file (required) - alphanumeric, underscore, hyphen only
    - domain: Domain or category for the data (required)
    - description: Description of what this system JSON contains (required)
    - data: The structured data to store (required) - can be any JSON-serializable object
    - tags: Optional array of tags for searchability
    
    Returns success status and confirmation message.`,
      inputSchema: {
        type: "object",
        properties: {
          name: { type: "string", description: "Name for the system JSON file (alphanumeric, underscore, hyphen only)" },
          domain: { type: "string", description: "Domain or category for the data" },
          description: { type: "string", description: "Description of what this system JSON contains" },
          data: { type: "object", description: "The structured data to store" },
          tags: { type: "array", items: { type: "string" }, description: "Optional array of tags for searchability" }
        },
        required: ["name", "domain", "description", "data"]
      }
    };
  • src/index.ts:1394-1407 (registration)
    Registration of create_system_json tool (as CREATE_SYSTEM_JSON_TOOL) in the list of available tools for ListToolsRequest.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      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
      ],
    }));
  • src/index.ts:1434-1442 (registration)
    Tool call dispatcher in CallToolRequestSchema handler that routes calls to the createSystemJSON method.
    case "create_system_json":
      const { name: sysJsonName, domain, description, data, tags } = args as {
        name: string;
        domain: string;
        description: string;
        data: Record<string, unknown>;
        tags?: string[]
      };
      return await reasoningServer.createSystemJSON(sysJsonName, domain, description, data, tags);
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses that the tool creates a new file (a write operation) and returns success status, which covers basic behavior. However, it lacks details on permissions, error conditions, rate limits, or whether the operation is idempotent. The description doesn't contradict annotations, but it's insufficient for a mutation tool without annotation support.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded, starting with the core purpose. The parameter list is organized but could be more integrated into the flow. Sentences are efficient, though the return statement is somewhat redundant given the schema coverage. Overall, it avoids unnecessary verbosity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 5 parameters with 100% schema coverage and no output schema, the description provides adequate context for a creation tool. It covers the action and parameters but lacks behavioral details like error handling or side effects. Without annotations, it should ideally include more about the mutation's impact, but it's minimally complete for basic use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description lists parameters with brief notes (e.g., 'required', 'optional'), but adds minimal semantic value beyond what's in the schema. It doesn't explain interactions between parameters or provide examples, so it meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool creates a new system JSON file for storing data or instructions, specifying the resource (system JSON file) and action (create). It distinguishes from siblings like list_system_json and get_system_json by focusing on creation rather than retrieval. However, it doesn't explicitly differentiate from create_memory_library, which might be a similar creation tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to choose create_system_json over create_memory_library or other creation tools, nor does it specify prerequisites or exclusions. Usage context is implied through the tool name but not explicitly stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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