github_secrets_list
List GitHub Actions secrets for a repository to manage CI/CD workflows and secure environment variables.
Instructions
List GitHub Actions secrets for a repository
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools.js:284-300 (handler)The handler function for the 'github_secrets_list' tool. It runs 'gh secret list' with an optional repository flag, formats the output into a markdown-like text response, handles cases with no secrets or errors, and returns a structured content object.export async function githubSecretsList({ repo }) { const repoFlag = repo ? `-R ${repo}` : ""; const repoSecrets = await commandRunner(`gh secret list ${repoFlag}`); let output = "REPOSITORY SECRETS\n==================\n"; if (repoSecrets.success && repoSecrets.stdout) { output += repoSecrets.stdout + "\n"; } else if (repoSecrets.success) { output += "No repository secrets configured.\n"; } else { output += `Error: ${repoSecrets.stderr || repoSecrets.error}\n`; output += "\nMake sure you're authenticated: gh auth login\n"; } return { content: [{ type: "text", text: output }] }; }
- src/tools.js:576-598 (registration)The registration of all tools, including 'githubSecretsList', in the exported 'tools' object used for MCP tool registration.export const tools = { // Git gitStatusExplained, gitBranchExplained, gitCommitGuided, // Docker dockerCheckSetup, dockerAnalyzeProject, dockerBuild, // GitHub githubSecretsList, githubSecretsSet, // Azure azureCheckCli, azureAcrSetup, azureContainerAppsDeploy, // SonarCloud sonarcloudSetupGuide, sonarcloudCreateConfig, // Onboarding devOnboardingCheck, };