Skip to main content
Glama

stop_build

Stop a Jenkins build using the job's full name and build number.

Instructions

Stop a specific build in Jenkins

Args: fullname: The fullname of the job number: The number of the build to stop

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fullnameYes
numberYes

Implementation Reference

  • MCP tool handler that stops a Jenkins build by delegating to the REST client.
    @mcp.tool(tags=['write'])
    async def stop_build(ctx: Context, fullname: str, number: int) -> None:
        """Stop a specific build in Jenkins
    
        Args:
            fullname: The fullname of the job
            number: The number of the build to stop
        """
        return jenkins(ctx).stop_build(fullname=fullname, number=number)
  • The @mcp.tool decorator registers 'stop_build' as an MCP tool with 'write' tag.
    @mcp.tool(tags=['write'])
  • REST client helper that sends a POST request to the Jenkins stop build endpoint.
    def stop_build(self, *, fullname: str, number: int) -> None:
        """Stop a running Jenkins build.
    
        Args:
            fullname: The fullname of the job.
            number: The build number.
        """
        folder, name = self._parse_fullname(fullname)
        self.request('POST', rest_endpoint.BUILD_STOP(folder=folder, name=name, number=number))
  • RestEndpoint definition for the Jenkins stop build API URL template.
    BUILD_STOP = RestEndpoint('{folder}job/{name}/{number}/stop')
Behavior2/5

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

No annotations provided, so description carries full burden. It only restates parameter names and types, without disclosing behavior (e.g., what happens if build is already stopped, permission requirements, side effects).

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?

Very short and front-loaded with the main action. The parameter descriptions follow immediately. No extraneous content, but lacks some helpful details without being verbose.

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?

For a tool with no annotations and no output schema, the description omits crucial context: return values, error conditions, whether the build must be running, and expected behavior after stopping. Incomplete for reliable agent use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so description must compensate. It adds 'The fullname of the job' and 'The number of the build to stop', which only slightly clarifies the obvious parameter names. No format or constraint hints.

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 tool's action ('Stop a specific build') and context ('in Jenkins'), with a specific verb and resource. It distinguishes from sibling tools like build_item (starts builds) and cancel_queue_item (cancels queued items).

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?

No guidance on when to use this tool versus alternatives, such as cancel_queue_item. No prerequisites or conditions mentioned (e.g., build must be running).

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/lanbaoshen/mcp-jenkins'

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