Skip to main content
Glama

Add to merge train

add_to_merge_train

Put a GitHub pull request in its repository's Ankra merge train, which tests it on top of the pull requests ahead of it and merges it when green. head_sha pins the head the train tests; a pull request already in the train answers its entry (already_in_train). You must be an organisation administrator, the pull request's author, or hold push access on the repository. Refused to a service account. Address the repository with exactly one of repository_id, application_id, or owner and repo. Needs pipelines.operate.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "pull_request_number": "<pull_request_number>"
    },
    "name": "add_to_merge_train"
  }
}

Input Schema

NameRequiredDescriptionDefault
repoNoRepository name, with owner.
ownerNoRepository owner (organisation or user), with repo, instead of repository_id.
head_shaNoFull commit sha the train must test and merge; default the head it reads first.
providerNoNarrows owner and repo when the same repository is connected on two providers.
repository_idNoThe connected repository's id, from list_pipeline_repositories.
application_idNoAn application whose linked repository to address, instead of repository_id.
pull_request_numberYesThe pull request to queue.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare readOnly=false, idempotent=false, destructive=false; the description goes well beyond them by disclosing the permission model, the service-account refusal, and the side effect that a PR already in the train returns an entry flagged already_in_train rather than erroring. Authorization requirements and the head_sha pinning behaviour are exactly the kind of context an agent needs before a mutating call.

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?

Purpose and effect are front-loaded in the first sentence, followed by parameter semantics, then permissions. Every sentence carries information, though the final three sentences pack addressing rules and authorization into a dense run-on paragraph that could be split for scanability.

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

Completeness5/5

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

With seven parameters, no output schema, and a mutating operation, the description covers the effect, authorization, addressing constraints, the already_in_train response case, and the required permission (pipelines.operate). Nothing an agent needs to invoke this correctly is missing.

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?

Schema coverage is 100%, so the baseline would be 3, but the description adds meaning the schema does not: the mutual exclusivity of repository_id, application_id, and owner+repo, and the fact that head_sha pins which head the train tests. It does not elaborate on the provider enum's disambiguation role beyond what the schema says.

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?

States a specific verb and resource ('Put a GitHub pull request in its repository's Ankra merge train') and immediately explains the mechanism ('tests it on top of the pull requests ahead of it and merges it when green'). That mechanism clearly separates it from siblings like remove_from_merge_train, enable_merge_when_green and scm_merge_pull_request.

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?

Gives concrete preconditions for calling it: caller must be an org admin, the PR author, or have push access, and service accounts are refused. It also states the repository-addressing rule ('exactly one of repository_id, application_id, or owner and repo'), which is real when-to-use guidance. It stops short of naming when to prefer a sibling such as enable_merge_when_green over this tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.