Skip to main content
Glama

Replace GitHub credential

replace_github_credential
Destructive

Apply a GitHub credential replacement: swap the selected GitOps usages from a deprecated OAuth credential to a GitHub App credential. Organisation admins only. Run plan_github_credential_replacement first and pass its eligible usages verbatim (resource_id, cluster_id, expected_repository, expected_branch, expected_source_credential_name) - drifted usages are blocked, not replaced.

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": {
      "credential_id": "<credential_id>",
      "target_credential_id": "<target_credential_id>",
      "usages": "<usages>"
    },
    "name": "replace_github_credential"
  }
}

Input Schema

NameRequiredDescriptionDefault
usagesYesThe usages to replace, copied from the plan's eligible_usages.
credential_idYesUUID of the source (deprecated) GitHub credential.
target_credential_idYesUUID of the target GitHub App credential.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true and idempotentHint=false; the description adds real value on top by naming the admin permission requirement, the mandatory plan step, and the drift-blocking failure mode. It stops short of saying whether a partial failure rolls back already-swapped usages or how the result is reported, which matters for a destructive multi-item mutation with no output schema.

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?

Front-loaded with the action and the swap semantics, then prerequisites, then the failure mode. Dense but every clause carries information; the parenthetical field list is slightly bulky but justified since it defines what 'verbatim' means.

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 destructive, non-idempotent mutation the definition covers permissions, the required predecessor tool, input provenance, and blocked-drift behavior. The remaining gap is atomicity/rollback behavior on partial failure, which the absence of an output schema makes more relevant.

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 per-field meanings are already documented. The description still adds non-obvious semantics: the usages array must be copied verbatim from the plan's eligible_usages, and the expected_* fields function as drift guards rather than free-form input — context the schema alone does not convey.

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 ('Apply a GitHub credential replacement') plus the exact transformation: swap selected GitOps usages from a deprecated OAuth credential to a GitHub App credential. This cleanly distinguishes it from the sibling plan_github_credential_replacement, which is named directly.

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

Usage Guidelines5/5

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

Explicitly states the prerequisite ('Run plan_github_credential_replacement first'), how to feed it ('pass its eligible usages verbatim'), the access gate ('Organisation admins only'), and the exclusion ('drifted usages are blocked, not replaced'). This is the when/when-not/alternative triad in compact form.

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.