Skip to main content
Glama
vparlapalli490

ServiceNow MCP Server

update_group

Modify an existing ServiceNow group by updating its name, description, manager, parent group, type, email, or active status using the group ID.

Instructions

Update an existing group in ServiceNow

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
group_idYesGroup ID or sys_id to update
nameNoName of the group
descriptionNoDescription of the group
managerNoManager of the group (sys_id or username)
parentNoParent group (sys_id or name)
typeNoType of the group
emailNoEmail address for the group
activeNoWhether the group is active

Implementation Reference

  • The main handler function that executes the update_group tool logic by sending a PATCH request to the ServiceNow 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 BaseModel defining the input schema (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")
  • Registers the 'update_group' tool in the central tool_definitions dictionary, associating the handler function, input schema, return type hint, description, and serialization method.
    "update_group": (
        update_group_tool,
        UpdateGroupParams,
        Dict[str, Any],  # Expects dict
        "Update an existing group in ServiceNow",
        "raw_dict",
    ),
  • Imports the update_group function into the tools package namespace, making it available for further registration.
    from servicenow_mcp.tools.user_tools import (
        create_user,
        update_user,
        get_user,
        list_users,
        create_group,
        update_group,
        add_group_members,
        remove_group_members,
        list_groups,
    )
    from servicenow_mcp.tools.workflow_tools import (
        activate_workflow,
        add_workflow_activity,
        create_workflow,
        deactivate_workflow,
        delete_workflow_activity,
        get_workflow_activities,
        get_workflow_details,
        list_workflow_versions,
        list_workflows,
        reorder_workflow_activities,
        update_workflow,
        update_workflow_activity,
    )
    
    # from servicenow_mcp.tools.problem_tools import create_problem, update_problem
    # from servicenow_mcp.tools.request_tools import create_request, update_request
    
    __all__ = [
        # Incident tools
        "create_incident",
        "update_incident",
        "add_comment",
        "resolve_incident",
        "list_incidents",
        
        # Catalog tools
        "list_catalog_items",
        "get_catalog_item",
        "list_catalog_categories",
        "create_catalog_category",
        "update_catalog_category",
        "move_catalog_items",
        "get_optimization_recommendations",
        "update_catalog_item",
        "create_catalog_item_variable",
        "list_catalog_item_variables",
        "update_catalog_item_variable",
        
        # Change management tools
        "create_change_request",
        "update_change_request",
        "list_change_requests",
        "get_change_request_details",
        "add_change_task",
        "submit_change_for_approval",
        "approve_change",
        "reject_change",
        
        # Workflow management tools
        "list_workflows",
        "get_workflow_details",
        "list_workflow_versions",
        "get_workflow_activities",
        "create_workflow",
        "update_workflow",
        "activate_workflow",
        "deactivate_workflow",
        "add_workflow_activity",
        "update_workflow_activity",
        "delete_workflow_activity",
        "reorder_workflow_activities",
        
        # Changeset tools
        "list_changesets",
        "get_changeset_details",
        "create_changeset",
        "update_changeset",
        "commit_changeset",
        "publish_changeset",
        "add_file_to_changeset",
        
        # Script Include tools
        "list_script_includes",
        "get_script_include",
        "create_script_include",
        "update_script_include",
        "delete_script_include",
        
        # Knowledge Base tools
        "create_knowledge_base",
        "list_knowledge_bases",
        "create_category",
        "list_categories",
        "create_article",
        "update_article",
        "publish_article",
        "list_articles",
        "get_article",
        
        # User management tools
        "create_user",
        "update_user",
        "get_user",
        "list_users",
        "create_group",
        "update_group",
  • Imports the update_group handler from user_tools.py with an alias for use in tool registration.
        update_group as update_group_tool,
    )
Behavior2/5

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

With no annotations provided, the description carries full responsibility for behavioral disclosure. 'Update an existing group' implies a mutation operation, but the description doesn't specify required permissions, whether changes are reversible, what happens to unspecified fields, or any rate limits. For a mutation tool with zero annotation coverage, this leaves critical behavioral aspects undocumented.

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 that communicates the core purpose without any wasted words. It's appropriately sized and front-loaded, making it easy for an agent to parse quickly.

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 mutation tool with 8 parameters and no annotations or output schema, the description is insufficient. It doesn't explain what happens during the update, what the response contains, error conditions, or how this operation fits within the broader ServiceNow context. The agent lacks critical information needed to use this tool effectively.

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 schema description coverage is 100%, providing complete documentation for all 8 parameters. The description adds no parameter-specific information beyond what's already in the schema. According to the scoring rules, when schema coverage is high (>80%), the baseline score is 3 even with no param info in the description.

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 clearly states the verb ('Update') and resource ('an existing group in ServiceNow'), making the purpose immediately understandable. However, it doesn't distinguish this tool from its sibling 'create_group' or other update tools like 'update_user' or 'update_workflow', which would require more specific differentiation.

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. There's no mention of prerequisites (like needing an existing group), when to choose 'create_group' instead, or how this differs from other update operations. The agent must infer usage from the tool name 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/vparlapalli490/MCP'

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