Skip to main content
Glama
echelon-ai-labs

ServiceNow MCP Server

update_catalog_item

Modify service catalog items in ServiceNow by updating attributes such as active status, category, description, name, order, price, and short description using specified item ID.

Instructions

Update a service catalog item.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Implementation Reference

  • Main handler function that performs the PATCH request to update a ServiceNow catalog item (sc_cat_item table) based on provided parameters.
    def update_catalog_item(
        config: ServerConfig, auth_manager: AuthManager, params: UpdateCatalogItemParams
    ) -> Dict:
        """
        Update a catalog item.
    
        Args:
            config: The server configuration
            auth_manager: The authentication manager
            params: The parameters for updating the catalog item
    
        Returns:
            A dictionary containing the result of the update operation
        """
        logger.info(f"Updating catalog item: {params.item_id}")
        
        try:
            # Build the request body with only the provided parameters
            body = {}
            if params.name is not None:
                body["name"] = params.name
            if params.short_description is not None:
                body["short_description"] = params.short_description
            if params.description is not None:
                body["description"] = params.description
            if params.category is not None:
                body["category"] = params.category
            if params.price is not None:
                body["price"] = params.price
            if params.active is not None:
                body["active"] = str(params.active).lower()
            if params.order is not None:
                body["order"] = str(params.order)
            
            # Make the API request
            url = f"{config.instance_url}/api/now/table/sc_cat_item/{params.item_id}"
            headers = auth_manager.get_headers()
            headers["Content-Type"] = "application/json"
            
            response = requests.patch(url, headers=headers, json=body)
            response.raise_for_status()
            
            return {
                "success": True,
                "message": "Catalog item updated successfully",
                "data": response.json()["result"],
            }
        
        except Exception as e:
            logger.error(f"Error updating catalog item: {e}")
            return {
                "success": False,
                "message": f"Error updating catalog item: {str(e)}",
                "data": None,
            }
  • Pydantic BaseModel defining the input schema/parameters for the update_catalog_item tool.
    class UpdateCatalogItemParams(BaseModel):
        """Parameters for updating a catalog item."""
    
        item_id: str
        name: Optional[str] = None
        short_description: Optional[str] = None
        description: Optional[str] = None
        category: Optional[str] = None
        price: Optional[str] = None
        active: Optional[bool] = None
        order: Optional[int] = None
  • Import of the update_catalog_item handler into the tools namespace, making it available for registration in the MCP server.
    from servicenow_mcp.tools.catalog_optimization import (
        get_optimization_recommendations,
        update_catalog_item,
    )
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states 'update' implies a mutation, but fails to mention required permissions, whether changes are reversible, rate limits, or what the response looks like. This is inadequate for a mutation tool with zero annotation coverage.

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 with no wasted words. It's appropriately sized for a basic tool definition, though this conciseness comes at the cost of detail.

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 tool's complexity (a mutation with 1 required and 7 optional parameters), no annotations, no output schema, and 0% schema description coverage, the description is severely incomplete. It doesn't explain what a 'service catalog item' is, what fields can be updated, or the behavioral implications, making it inadequate for effective use.

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

Parameters1/5

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

The schema description coverage is 0%, meaning all parameters are undocumented in the schema. The description adds no information about parameters beyond the tool name, not even hinting at the required 'item_id' or optional fields like 'active' or 'price'. It fails to compensate for the schema's lack of descriptions.

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

Purpose3/5

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

The description 'Update a service catalog item' clearly states the verb ('update') and resource ('service catalog item'), providing a basic understanding of the tool's function. However, it lacks specificity about what fields can be updated and doesn't differentiate from sibling tools like 'update_catalog_category' or 'update_article', making it somewhat vague.

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 (e.g., needing an existing catalog item), exclusions, or comparisons to sibling tools like 'create_catalog_category' or 'move_catalog_items', leaving the agent with no usage context.

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

Related 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/echelon-ai-labs/servicenow-mcp'

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