Tools API

Individual tool implementations and their parameters.

Tool Structure

Each tool in the Zscaler Integrations MCP Server follows a consistent structure:

def tool_name(
    action: Literal["read", "read_lite", "create", "update", "delete"],
    # Tool-specific parameters
    param1: Optional[str] = None,
    param2: Optional[int] = None,
    service: str = "service_name",
) -> Union[dict, List[dict]]:
    """
    Tool description and usage examples.
    """
    # Implementation
    pass

Common Parameters

All tools share common parameters:

Common Tool Parameters

Parameter

Type

Description

action

Literal

Operation to perform (read, read_lite, create, update, delete)

service

str

The service to use (default: service-specific)

Action Types

Read Actions

  • read: Retrieve full details of resources

  • read_lite: Retrieve minimal details for faster performance

Write Actions

  • create: Create new resources

  • update: Update existing resources

  • delete: Delete resources

Tool Categories

ZCC Tools

ZIA Tools

ZPA Tools

ZDX Tools

ZTW Tools

ZIdentity Tools

EASM Tools

External Attack Surface Management (EASM) tools for monitoring your organization’s internet-facing assets.

Note

EASM tools are read-only. EASM does not require ZSCALER_CUSTOMER_ID.

Tool Usage Examples

Basic Tool Usage

from zscaler_mcp.tools.zia.list_users import zia_user_manager

# List all users
users = zia_user_manager(action="read")

# List users with search
users = zia_user_manager(action="read", search="admin")

# Get specific user
user = zia_user_manager(action="read", user_id="12345")

Advanced Tool Usage

from zscaler_mcp.tools.zpa.application_segments import zpa_application_segment_manager

# Create new application segment
segment = zpa_application_segment_manager(
    action="create",
    name="New App Segment",
    domain_names=["example.com"],
    server_groups=["server-group-id"]
)

# Update existing segment
updated_segment = zpa_application_segment_manager(
    action="update",
    segment_id="segment-id",
    name="Updated App Segment"
)

Error Handling

All tools return consistent error information:

try:
    result = tool_function(action="read")
except Exception as e:
    print(f"Error: {e}")
    # Handle error appropriately