Skip to main content
Glama
delano
by delano

merge_environment_fork

Merge a forked environment back into its parent by specifying source and destination environment IDs. Optionally delete the source after merging.

Instructions

Merge a forked environment back into its parent

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
environmentIdYesEnvironment ID in format: {ownerId}-{environmentId}
sourceYesSource environment ID in format: {ownerId}-{environmentId}
destinationYesDestination environment ID in format: {ownerId}-{environmentId}
strategyNoMerge strategy options

Implementation Reference

  • The handler function that executes the merge_environment_fork tool logic. It POSTs to /environments/{environmentId}/merges with source, destination, and optional deleteSource strategy.
    async mergeEnvironmentFork(args: any): Promise<ToolCallResponse> {
      const response = await this.client.post(`/environments/${args.environmentId}/merges`, {
        source: args.source,
        destination: args.destination,
        deleteSource: args.strategy?.deleteSource
      });
      return this.createResponse(response.data);
    }
  • TypeScript interface MergeEnvironmentForkArgs defining the input type: environmentId, source, destination, and optional strategy with deleteSource.
    export interface MergeEnvironmentForkArgs {
      environmentId: string;
      source: string;
      destination: string;
      strategy?: {
        deleteSource?: boolean;
      };
    }
  • Registration in the switch-case handler routing: case 'merge_environment_fork' dispatches to mergeEnvironmentFork(args).
    case 'merge_environment_fork':
      return await this.mergeEnvironmentFork(args);
  • Tool definition registration with name, description, and inputSchema listing environmentId, source, destination (required), and strategy (optional).
    {
      name: 'merge_environment_fork',
      description: 'Merge a forked environment back into its parent',
      inputSchema: {
        type: 'object',
        properties: {
          environmentId: {
            type: 'string',
            description: 'Environment ID in format: {ownerId}-{environmentId}'
          },
          source: {
            type: 'string',
            description: 'Source environment ID in format: {ownerId}-{environmentId}'
          },
          destination: {
            type: 'string',
            description: 'Destination environment ID in format: {ownerId}-{environmentId}'
          },
          strategy: {
            type: 'object',
            description: 'Merge strategy options',
            properties: {
              deleteSource: { type: 'boolean', description: 'Whether to delete the source environment after merging' }
            }
          }
        },
        required: ['environmentId', 'source', 'destination']
      }
    },
Behavior2/5

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

No annotations are provided, so the description must convey behavioral traits. It only says 'merge', which implies a mutation, but does not disclose side effects such as whether the source is deleted, how conflicts are handled, or the impact on the parent environment.

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 sentence, extremely concise, and front-loaded with the main action. Every word is necessary and there is no redundancy.

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 lack of annotations and output schema, the description is incomplete. It does not explain the merge process, what happens to the source or destination, or any potential conflicts. A more complete description would mention the effect of the 'strategy' parameter and the outcome of the merge.

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, so the baseline is 3. The description does not add any meaning beyond the schema; it does not explain the role of the 'strategy' parameter or the difference between 'source', 'destination', and 'environmentId'.

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 verb 'merge' and the resource 'forked environment' with the goal 'back into its parent'. It is specific and distinguishes from sibling tools like 'merge_collection_fork' by focusing on environments.

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

Usage Guidelines3/5

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

Usage is implied by the description, but there is no explicit guidance on when to use this tool versus alternatives like 'pull_environment' or 'create_environment'. No when-not-to-use or prerequisite information is provided.

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