Skip to main content
Glama
delano
by delano

get_environment

Retrieve configuration details of a Postman environment using its unique identifier. Returns environment variables and metadata.

Instructions

Get details of a specific environment

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
environmentIdYesEnvironment ID in format: {ownerId}-{environmentId} (e.g., "31912785-b8cdb26a-0c58-4f35-9775-4945c39d7ee2")

Implementation Reference

  • The getEnvironment handler method that executes the tool logic. Makes a GET request to /environments/{environmentId} and returns the response.
    async getEnvironment(environmentId: string): Promise<ToolCallResponse> {
      const response = await this.client.get(`/environments/${environmentId}`);
      return this.createResponse(response.data);
    }
  • The handleToolCall dispatcher that routes the 'get_environment' tool name to the getEnvironment method.
    async handleToolCall(name: string, args: any): Promise<ToolCallResponse> {
      try {
        switch (name) {
          case 'list_environments':
            return await this.listEnvironments(args.workspace);
          case 'get_environment':
            return await this.getEnvironment(args.environmentId);
          case 'create_environment':
            return await this.createEnvironment(args);
          case 'update_environment':
            return await this.updateEnvironment(args);
          case 'delete_environment':
            return await this.deleteEnvironment(args.environmentId);
          case 'fork_environment':
            return await this.createEnvironmentFork(args);
          case 'get_environment_forks':
            return await this.getEnvironmentForks(args);
          case 'merge_environment_fork':
            return await this.mergeEnvironmentFork(args);
          case 'pull_environment':
            return await this.pullEnvironment(args);
          default:
            throw new McpError(ErrorCode.MethodNotFound, `Unknown tool: ${name}`);
        }
      } catch (error: any) {
        // Let base class interceptor handle API errors
        throw error;
      }
    }
  • The input schema definition for 'get_environment' specifying the environmentId parameter.
    {
      name: 'get_environment',
      description: 'Get details of a specific environment',
      inputSchema: {
        type: 'object',
        properties: {
          environmentId: {
            type: 'string',
            description: 'Environment ID in format: {ownerId}-{environmentId} (e.g., "31912785-b8cdb26a-0c58-4f35-9775-4945c39d7ee2")',
          },
        },
        required: ['environmentId'],
      },
    },
  • Type definition for GetEnvironmentForksArgs - not directly used by get_environment but relevant to the environments tool family.
    export interface GetEnvironmentForksArgs {
      environmentId: string;
      cursor?: string;
      direction?: 'asc' | 'desc';
      limit?: number;
      sort?: 'createdAt';
    }
Behavior2/5

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

With no annotations, the description carries the burden of behavioral disclosure but only states 'Get details'. It does not mention that this is a read-only operation, whether authentication is required, or what happens if the environment does not exist.

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 a single, direct sentence that efficiently communicates the tool's purpose without unnecessary words. It is well front-loaded and appropriate for a simple retrieval tool.

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 the low complexity (one parameter, no output schema), the description is functional but lacks details on return format, error scenarios, or prerequisites, making it minimally adequate.

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% coverage for the only parameter ('environmentId') with a description. The tool description does not add any additional meaning beyond what the schema provides, so the baseline score of 3 applies.

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 ('Get details') and the resource ('a specific environment'), distinguishing it from sibling tools like 'list_environments' (which lists all) and 'get_environment_forks' (which gets forks).

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 (e.g., 'list_environments' or 'get_environment_forks'), leaving the agent to infer context from the tool name alone.

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/delano/postman-mcp-server'

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