Skip to main content
Glama

get_item_config

Retrieve the configuration of a Jenkins item using its fullname to access its current settings.

Instructions

Get specific item config from Jenkins

Args: fullname: The fullname of the item

Returns: The config of the item

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fullnameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • MCP tool handler for 'get_item_config'. Annotated with @mcp.tool(tags=['read']). Calls jenkins(ctx).get_item_config(fullname=fullname) and returns the XML config string.
    @mcp.tool(tags=['read'])
    async def get_item_config(ctx: Context, fullname: str) -> str:
        """Get specific item config from Jenkins
    
        Args:
            fullname: The fullname of the item
    
        Returns:
            The config of the item
        """
        return jenkins(ctx).get_item_config(fullname=fullname)
  • REST client implementation of get_item_config. Parses the fullname into folder/name, makes a GET request to ITEM_CONFIG endpoint, and returns the response text (XML).
    def get_item_config(self, *, fullname: str) -> str:
        """Get item configuration by its fullname.
    
        Args:
            fullname: The full name of the item (e.g., "folder1/folder2/item").
    
        Returns:
            The item configuration as an XML string.
        """
        folder, name = self._parse_fullname(fullname)
        response = self.request('GET', rest_endpoint.ITEM_CONFIG(folder=folder, name=name))
        return response.text
  • REST endpoint template for item config: '{folder}job/{name}/config.xml'. Uses the RestEndpoint class which formats the URL template at call time.
    ITEM_CONFIG = RestEndpoint('{folder}job/{name}/config.xml')
  • The @mcp.tool(tags=['read']) decorator on the get_item_config function registers it as an MCP tool. The mcp instance is created in src/mcp_jenkins/server/__init__.py and item.py is imported there (line 34) to trigger registration.
    @mcp.tool(tags=['read'])
    async def get_item_config(ctx: Context, fullname: str) -> str:
  • Test for the get_item_config MCP tool handler. Mocks jenkins.get_item_config to return an XML string and asserts the handler returns it.
    @pytest.mark.asyncio
    async def test_get_item_config(mock_jenkins, mocker):
        mock_jenkins.get_item_config.return_value = '<xml>config</xml>'
    
        assert await item.get_item_config(mocker.Mock(), fullname='job1') == '<xml>config</xml>'
Behavior2/5

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

With no annotations, the description carries full burden. It only says returns config, omitting traits like read-only nature, permissions, or 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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Extremely concise: three lines covering purpose, parameter, and return value with no redundant content.

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?

Adequate for a simple getter with an output schema covering return details, though lacks usage context.

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?

Provides meaning for the 'fullname' parameter ('The fullname of the item') beyond the schema type, compensating for 0% schema coverage.

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?

Clearly states 'Get specific item config from Jenkins', identifying the verb, resource, and source. Distinguishable from siblings like get_item or get_all_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 like get_item or get_all_items. Lacks context for prerequisites or use cases.

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