Skip to main content
Glama
gcorroto
by gcorroto

jenkins_get_pending_actions

Retrieve pending input actions for a Jenkins build to check for required approvals or parameters before proceeding with the CI/CD pipeline.

Instructions

Obtener las acciones pendientes de input de un build

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
appYesNombre de la aplicación
buildNumberYesNúmero del build
branchNoRama de Git (por defecto: main)

Implementation Reference

  • index.ts:198-228 (registration)
    MCP tool registration for 'jenkins_get_pending_actions', including input schema and handler function that calls JenkinsService and formats response.
    server.tool(
      "jenkins_get_pending_actions",
      "Obtener las acciones pendientes de input de un build",
      {
        app: z.string().describe("Nombre de la aplicación"),
        buildNumber: z.number().describe("Número del build"),
        branch: z.string().optional().describe("Rama de Git (por defecto: main)")
      },
      async (args) => {
        try {
          const result = await getJenkinsService().getPendingInputActions(args.app, args.buildNumber, args.branch || 'main');
          
          const pendingText = `⏳ **Acciones Pendientes - Build #${args.buildNumber}**\n\n` +
            `**ID:** ${result.id}\n` +
            `**Proceed URL:** ${result.proceedUrl}\n` +
            `**Abort URL:** ${result.abortUrl}\n` +
            (result.message ? `**Mensaje:** ${result.message}\n` : '') +
            (result.inputs && result.inputs.length > 0 ? 
              `**Inputs requeridos:**\n${result.inputs.map(input => `- ${input.name}: ${input.description || 'N/A'}`).join('\n')}`
              : '');
    
          return {
            content: [{ type: "text", text: pendingText }],
          };
        } catch (error: any) {
          return {
            content: [{ type: "text", text: `❌ **Error:** ${error.message}` }],
          };
        }
      }
    );
  • Core handler logic in JenkinsService: constructs Jenkins API URL for pending input actions and fetches data via Axios.
    async getPendingInputActions(app: string, buildNumber: number, branch: string = 'main'): Promise<PendingInputAction> {
      if (!validateAppName(app)) {
        throw new Error('Invalid app name.');
      }
    
      const pendingInputUrl = `${buildJobBuildUrl('', app, buildNumber, branch)}/wfapi/nextPendingInputAction`;
      
      try {
        const response: AxiosResponse<PendingInputAction> = await this.client.get(pendingInputUrl);
        return response.data;
      } catch (error: any) {
        throw handleHttpError(error, `Failed to get pending input actions for app: ${app}, build: ${buildNumber}, branch: ${branch}`);
      }
    }
  • Input schema using Zod for validating tool parameters: app, buildNumber, and optional branch.
      app: z.string().describe("Nombre de la aplicación"),
      buildNumber: z.number().describe("Número del build"),
      branch: z.string().optional().describe("Rama de Git (por defecto: main)")
    },
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves pending input actions, implying a read-only operation, but doesn't clarify aspects like authentication needs, rate limits, error handling, or what 'pending input actions' entail (e.g., user prompts, approvals). This leaves significant gaps in understanding the tool's behavior and constraints.

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, efficient sentence in Spanish that directly states the tool's purpose without unnecessary words. It's front-loaded and wastes no space, making it easy to parse quickly. This conciseness is effective for a straightforward retrieval tool.

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 complexity of a Jenkins tool with no annotations and no output schema, the description is insufficient. It lacks details on what the tool returns (e.g., format of pending actions), error conditions, or how it integrates with sibling tools. For a tool that likely interacts with build processes, more context is needed to ensure proper usage and understanding of results.

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% description coverage, with clear parameter definitions: 'app' (application name), 'buildNumber' (build number), and 'branch' (Git branch, defaulting to 'main'). The description doesn't add any semantic details beyond this, such as examples or usage context. Since the schema is comprehensive, a baseline score of 3 is appropriate, as the description doesn't compensate but also doesn't detract.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Obtener las acciones pendientes de input de un build' clearly states the purpose: to retrieve pending input actions for a build. It uses a specific verb ('Obtener') and resource ('acciones pendientes de input de un build'), making it understandable. However, it doesn't explicitly differentiate from sibling tools like 'jenkins_get_build_steps' or 'jenkins_submit_input_action', which could handle related actions.

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. It doesn't mention prerequisites, context, or exclusions, such as when to choose this over 'jenkins_get_build_steps' or how it relates to 'jenkins_submit_input_action'. Without such information, users must infer usage from the tool name and parameters 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/gcorroto/mcp-jenkins'

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