Skip to main content
Glama
Sentinel-One

Purple AI MCP Server

Official
by Sentinel-One

iso_to_unix_timestamp

Convert ISO 8601 datetime strings to UNIX timestamps in milliseconds (UTC) for use in SentinelOne API queries. Automatically handles timezone conversion.

Instructions

Convert an ISO 8601 datetime string to a UNIX timestamp in milliseconds (UTC).

This tool accepts datetime strings in ISO 8601 format and converts them to UNIX timestamps (milliseconds since epoch: January 1, 1970 00:00:00 UTC). This is essential for datetime filter queries in Purple Alert, Vulnerability, Misconfiguration, and Inventory searches.

IMPORTANT: You should provide datetime inputs in the user's preferred timezone. This tool will automatically convert them to UTC timestamps for use in API queries. For example, if the user asks for "October 30, 2024 at 8 AM Eastern Time", you should submit "2024-10-30T08:00:00-04:00" (not convert it yourself to UTC).

Args: iso_datetime (str): An ISO 8601 formatted datetime string. Examples: - "2025-10-30T12:00:00Z" (UTC with 'Z' suffix) - "2025-10-30T12:00:00+00:00" (UTC with explicit offset) - "2025-10-30T08:00:00-04:00" (Eastern Time with offset) - "2025-10-30T17:00:00+05:00" (IST/Pakistan Time with offset) - "2025-10-30T12:00:00" (no timezone - treated as UTC)

Returns: str: The UNIX timestamp in milliseconds (UTC) as a JSON number string. Example: "1761825600000"

Common Use Cases: - Converting user-friendly datetime inputs to UNIX timestamps for API queries - Handling datetimes across different time zones automatically - Preparing datetime filters for Alert, Vulnerability, Misconfiguration, and Inventory searches

Examples: Input: "2025-10-30T12:00:00Z" (noon UTC) Output: "1761825600000"

Input: "2025-10-30T08:00:00-04:00" (8 AM EDT = noon UTC)
Output: "1761825600000"

Input: "2025-10-30T17:00:00+05:00" (5 PM PKT = noon UTC)
Output: "1761825600000"

Raises: ValueError: If the input string is not a valid ISO 8601 datetime format.

Notes: - All timestamps are returned in milliseconds (not seconds or nanoseconds) - All timestamps represent UTC time regardless of input timezone - If no timezone is specified in input, UTC is assumed - The tool handles timezone conversion automatically - provide times in the user's local timezone

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
iso_datetimeYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations, the description fully discloses behavior: it returns milliseconds, converts timezones automatically, assumes UTC if omitted, and raises ValueError for invalid input. This is comprehensive and transparent.

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

Conciseness4/5

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

The description is well-structured with sections like Args, Returns, Examples, and Notes, making it easy to scan. However, it is somewhat lengthy; a more streamlined version could retain all value while being more concise.

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

Completeness5/5

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

Given the tool's simplicity (one parameter, no annotations) and the presence of an output schema (though not shown), the description covers all necessary aspects: purpose, usage, behavior, and examples. It is complete for an AI agent to use effectively.

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

Parameters5/5

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

The schema has 0% description coverage, but the description compensates thoroughly by detailing the parameter 'iso_datetime' with format, examples, and timezone handling. This adds significant meaning beyond the schema.

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?

The description clearly states the tool's purpose: 'Convert an ISO 8601 datetime string to a UNIX timestamp in milliseconds (UTC).' This is specific and distinguishes it from siblings like get_timestamp_range, which likely handles range queries rather than single conversions.

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

Usage Guidelines4/5

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

The description includes explicit usage guidance, such as providing datetime in the user's timezone and not converting manually. It lists common use cases but does not mention when not to use the tool or alternatives, which would elevate it to a 5.

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/Sentinel-One/purple-mcp'

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