Skip to main content
Glama

env_group_list

List all environment groups with scopes, defaults, and environments for managing API testing configurations.

Instructions

Lista todos los grupos con sus scopes, default y entornos.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The tool handler for 'env_group_list'. It registers the tool via server.tool(), calls storage.listGroups() to get all groups, and returns them as a JSON string. If no groups exist, returns a message indicating none are configured.
    server.tool(
      'env_group_list',
      'Lista todos los grupos con sus scopes, default y entornos.',
      {},
      async () => {
        try {
          const groups = await storage.listGroups()
          if (groups.length === 0) {
            return {
              content: [{ type: 'text' as const, text: 'No hay grupos configurados. Usa env_group_create para crear uno.' }],
            }
          }
          return {
            content: [{ type: 'text' as const, text: JSON.stringify(groups, null, 2) }],
          }
        } catch (error) {
          const message = error instanceof Error ? error.message : String(error)
          return { content: [{ type: 'text' as const, text: `Error: ${message}` }], isError: true }
        }
      },
    )
  • The storage.listGroups() helper method. Reads all JSON files from the groups directory and returns them as EnvironmentGroup objects, filtering out null results.
    async listGroups(): Promise<EnvironmentGroup[]> {
      await this.ensureDir('groups')
      const files = await this.listJsonFiles(this.groupsDir)
      const groups = await Promise.all(
        files.map((file) => this.readJson<EnvironmentGroup>(join(this.groupsDir, file))),
      )
      return groups.filter((g): g is EnvironmentGroup => g !== null)
    }
  • The EnvironmentGroup interface defining the shape of group data returned by the tool: name, scopes, default environment, createdAt, and updatedAt.
    export interface EnvironmentGroup {
      name: string
      scopes: string[]
      default?: string
      createdAt: string
      updatedAt: string
    }
  • The tool is registered via server.tool() with the name 'env_group_list'. The registration is inside the registerEnvironmentTools() function defined in src/tools/environment.ts.
    server.tool(
      'env_group_list',
      'Lista todos los grupos con sus scopes, default y entornos.',
      {},
      async () => {
        try {
          const groups = await storage.listGroups()
          if (groups.length === 0) {
            return {
              content: [{ type: 'text' as const, text: 'No hay grupos configurados. Usa env_group_create para crear uno.' }],
            }
          }
          return {
            content: [{ type: 'text' as const, text: JSON.stringify(groups, null, 2) }],
          }
        } catch (error) {
          const message = error instanceof Error ? error.message : String(error)
          return { content: [{ type: 'text' as const, text: `Error: ${message}` }], isError: true }
        }
      },
    )
Behavior2/5

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

No annotations are provided, and the description does not disclose behavioral traits such as authentication requirements, rate limits, side effects, or pagination. It only states a read action, which is minimally transparent.

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, clear sentence that conveys the essential information without any extraneous words. It is front-loaded with the action.

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?

For a simple parameterless list operation, the description adequately explains what is returned (groups with scopes, default, and environments). No output schema exists, but the description covers the output fields. Some details like ordering or sorting are missing, but not critical for this tool.

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

Parameters4/5

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

The tool has zero parameters, so schema coverage is 100%. The description adds no parameter information, but none is needed. Per the baseline rule for 0 parameters, a score of 4 is appropriate.

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 (list) and resource (all groups) with specific attributes (scopes, default, environments). However, it does not explicitly differentiate from sibling tools like env_group_create or env_group_delete, though the context of siblings implies it is a read operation.

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 on when to use this tool versus alternatives. The description only states what it does, without mentioning prerequisites, exclusions, or when not to use it.

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