Skip to main content
Glama
j3k0

Elasticsearch Knowledge Graph for MCP

by j3k0

create_zone

Define and organize memory zones in the Elasticsearch Knowledge Graph for MCP, enabling structured storage and retrieval of detailed information with custom descriptions and names.

Instructions

Create a new memory zone with optional description.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
descriptionNoFull zone description. Make it very descriptive and detailed.
nameYesZone name (cannot be 'default')
shortDescriptionNoShort description of the zone.

Implementation Reference

  • Tool schema definition for 'create_zone' including input validation schema, registered in the listTools response.
    {
      name: "create_zone",
      description: "Create a new memory zone with optional description.",
      inputSchema: {
        type: "object",
        properties: {
          name: {
            type: "string",
            description: "Zone name (cannot be 'default')"
          },
          shortDescription: {
            type: "string",
            description: "Short description of the zone."
          },
          description: {
            type: "string",
            description: "Full zone description. Make it very descriptive and detailed."
          }
        },
        required: ["name"]
      }
    },
  • MCP tool handler for 'create_zone': extracts name and description parameters, calls kgClient.addMemoryZone, and formats success/error response.
    else if (toolName === "create_zone") {
      const name = params.name;
      const description = params.description;
      
      try {
        await kgClient.addMemoryZone(name, description);
        
        return formatResponse({
          success: true,
          zone: name,
          message: `Zone "${name}" created successfully`
        });
      } catch (error) {
        return formatResponse({
          success: false,
          error: `Failed to create zone: ${(error as Error).message}`
        });
      }
  • Core implementation of zone creation: validates name, initializes index, saves metadata, updates cache.
    async addMemoryZone(
      zone: string, 
      description?: string,
      config?: Record<string, any>
    ): Promise<boolean> {
      if (!zone || zone === 'default') {
        throw new Error('Invalid zone name. Cannot be empty or "default".');
      }
      
      // Initialize the index for this zone
      await this.initialize(zone);
      
      // Add to metadata
      await this.saveZoneMetadata(zone, description, config);
      
      // Update the cache
      this.existingZonesCache[zone] = true;
      
      return true;
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool creates a new zone but lacks details on permissions needed, whether the operation is idempotent, what happens on failure, or any rate limits. This is inadequate for a mutation tool with zero annotation coverage.

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

Conciseness5/5

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

The description is a single, efficient sentence that is front-loaded with the core purpose. It wastes no words and is appropriately sized for the tool's complexity.

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

Completeness2/5

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

Given the tool is a mutation (create operation) with no annotations and no output schema, the description is incomplete. It doesn't explain what the tool returns, error conditions, or behavioral traits, leaving significant gaps for an AI agent to use it correctly.

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 fully documents all three parameters. The description adds minimal value by noting the description is optional but doesn't provide additional meaning beyond what's in the schema, such as usage examples or constraints not covered.

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 action ('Create') and resource ('new memory zone'), specifying what the tool does. However, it doesn't differentiate from sibling tools like 'create_entities' or 'merge_zones', which also create resources, so it misses full sibling distinction.

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?

No guidance is provided on when to use this tool versus alternatives like 'merge_zones' or 'create_entities', nor any context on prerequisites or exclusions. The description only mentions optional parameters without usage context.

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

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/j3k0/mcp-brain-tools'

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