Skip to main content
Glama

env_group_create

Creates a new environment group for organizing API testing environments. Directories can then be added as scopes to group related resources.

Instructions

Crea un nuevo grupo de entornos. Luego añade scopes (directorios) con env_group_add_scope.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesNombre del grupo (ej: cocaxcode, optimizatusol)

Implementation Reference

  • Tool handler for env_group_create. Registers the 'env_group_create' tool on the MCP server, accepts a 'name' parameter (z.string), and calls storage.createGroup(params.name). Returns success message or error.
    // ── env_group_create ──
    server.tool(
      'env_group_create',
      'Crea un nuevo grupo de entornos. Luego añade scopes (directorios) con env_group_add_scope.',
      {
        name: z.string().describe('Nombre del grupo (ej: cocaxcode, optimizatusol)'),
      },
      async (params) => {
        try {
          await storage.createGroup(params.name)
          return {
            content: [{ type: 'text' as const, text: `Grupo '${params.name}' creado. Usa env_group_add_scope para añadir directorios.` }],
          }
        } catch (error) {
          const message = error instanceof Error ? error.message : String(error)
          return { content: [{ type: 'text' as const, text: `Error: ${message}` }], isError: true }
        }
      },
    )
  • The tool is registered inside the registerEnvironmentTools function, which creates all environment-related tools (env_create, env_group_create, etc.) on the MCP server.
    export function registerEnvironmentTools(server: McpServer, storage: Storage): void {
  • Storage.createGroup() creates a new EnvironmentGroup with the given name. Checks if group already exists (throws if so), creates the group object with empty scopes and timestamps, then saves it as a JSON file in the groups directory.
    async createGroup(name: string): Promise<EnvironmentGroup> {
      await this.ensureDir('groups')
      const existing = await this.getGroup(name)
      if (existing) {
        throw new Error(`El grupo '${name}' ya existe`)
      }
      const now = new Date().toISOString()
      const group: EnvironmentGroup = { name, scopes: [], createdAt: now, updatedAt: now }
      await this.saveGroup(group)
      return group
    }
  • TypeScript interface for EnvironmentGroup, which is the data type that env_group_create produces. Contains name, scopes, optional default, createdAt, and updatedAt fields.
    export interface EnvironmentGroup {
      name: string
      scopes: string[]
      default?: string
      createdAt: string
      updatedAt: string
    }
Behavior2/5

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

No annotations are provided, so the description must cover behavioral traits. It only states what the tool does, without mentioning idempotency, side effects, permissions, or error conditions (e.g., duplicate name). This is a significant gap.

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?

Two concise sentences, front-loaded with the core action, and zero wasted words. Every sentence serves a purpose.

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

Completeness4/5

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

Given the low complexity (1 parameter, no output schema), the description adequately covers the purpose and follow-up step. It is complete for its scope, though it could benefit from stating whether the group is created empty or with default settings.

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?

The input schema has 100% description coverage for the single parameter 'name', including an example. The description adds no additional semantic value beyond restating the context, so baseline 3 is appropriate.

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

Purpose5/5

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

The description clearly states the action ('Crea un nuevo grupo de entornos') with a specific verb and resource, and distinguishes from siblings by noting the subsequent step with env_group_add_scope.

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

Usage Guidelines4/5

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

Provides explicit context for post-creation action ('Luego añade scopes con env_group_add_scope'), guiding the agent to use another tool next. Does not include when-not-to-use or alternatives, but the context is clear.

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/cocaxcode/api-testing-mcp'

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