Skip to main content
Glama
echelon-ai-labs

ServiceNow MCP Server

update_group

Modify group details such as name, description, email, manager, and type in ServiceNow using the Group ID. Manage group attributes and hierarchy efficiently.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Implementation Reference

  • Implementation of the update_group tool handler that performs a PATCH request to update a group in ServiceNow's sys_user_group table.
    def update_group(
        config: ServerConfig,
        auth_manager: AuthManager,
        params: UpdateGroupParams,
    ) -> GroupResponse:
        """
        Update an existing group in ServiceNow.
    
        Args:
            config: Server configuration.
            auth_manager: Authentication manager.
            params: Parameters for updating the group.
    
        Returns:
            Response with the updated group details.
        """
        api_url = f"{config.api_url}/table/sys_user_group/{params.group_id}"
    
        # Build request data
        data = {}
        if params.name:
            data["name"] = params.name
        if params.description:
            data["description"] = params.description
        if params.manager:
            data["manager"] = params.manager
        if params.parent:
            data["parent"] = params.parent
        if params.type:
            data["type"] = params.type
        if params.email:
            data["email"] = params.email
        if params.active is not None:
            data["active"] = str(params.active).lower()
    
        # Make request
        try:
            response = requests.patch(
                api_url,
                json=data,
                headers=auth_manager.get_headers(),
                timeout=config.timeout,
            )
            response.raise_for_status()
    
            result = response.json().get("result", {})
    
            return GroupResponse(
                success=True,
                message="Group updated successfully",
                group_id=result.get("sys_id"),
                group_name=result.get("name"),
            )
    
        except requests.RequestException as e:
            logger.error(f"Failed to update group: {e}")
            return GroupResponse(
                success=False,
                message=f"Failed to update group: {str(e)}",
            )
  • Pydantic model defining the input parameters for the update_group tool.
    class UpdateGroupParams(BaseModel):
        """Parameters for updating a group."""
    
        group_id: str = Field(..., description="Group ID or sys_id to update")
        name: Optional[str] = Field(None, description="Name of the group")
        description: Optional[str] = Field(None, description="Description of the group")
        manager: Optional[str] = Field(None, description="Manager of the group (sys_id or username)")
        parent: Optional[str] = Field(None, description="Parent group (sys_id or name)")
        type: Optional[str] = Field(None, description="Type of the group")
        email: Optional[str] = Field(None, description="Email address for the group")
        active: Optional[bool] = Field(None, description="Whether the group is active")
  • Registration of the update_group tool in the tool definitions dictionary used by the MCP server.
    "update_group": (
        update_group_tool,
        UpdateGroupParams,
        Dict[str, Any],  # Expects dict
        "Update an existing group in ServiceNow",
        "raw_dict",
    ),
  • Re-export of the update_group function in the tools package __init__.
    update_group,
Behavior1/5

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

Tool has no description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness1/5

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

Tool has no description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool has no description.

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?

Tool has no description.

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

Purpose1/5

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

Tool has no description.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Tool has no description.

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