Skip to main content
Glama
dstreefkerk

ms-sentinel-mcp-server

by dstreefkerk

sentinel_ti_indicator_get

Retrieve specific threat intelligence indicators from Microsoft Sentinel to analyze security threats and enhance monitoring capabilities.

Instructions

Get a specific Sentinel threat intelligence indicator

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kwargsYes

Implementation Reference

  • The `run` method of the `SentinelThreatIntelligenceIndicatorGetTool` class implements the core logic for the `sentinel_ti_indicator_get` tool. It extracts the `indicator_name` parameter, validates Azure context, constructs the REST API URL for the specific indicator, calls the API, processes the response properties into a structured dictionary, and returns the indicator details or an error.
    async def run(self, ctx: Context, **kwargs):
        """
        Get a specific Sentinel Threat Intelligence indicator.
    
        Args:
            ctx (Context): The MCP tool context.
            **kwargs: Indicator name as 'indicator_name' parameter.
    
        Returns:
            dict: Results as described in the class docstring.
        """
        indicator_name = self._extract_param(kwargs, "indicator_name")
        if not indicator_name:
            return {"error": "indicator_name parameter is required", "valid": False}
        workspace_name, resource_group, subscription_id = self.get_azure_context(ctx)
        valid = self.validate_azure_context(
            True, workspace_name, resource_group, subscription_id, self.logger
        )
        if not valid:
            return {"error": "Missing required Azure context", "valid": False}
        try:
            url = (
                f"https://management.azure.com/subscriptions/{subscription_id}/"
                f"resourceGroups/{resource_group}/providers/Microsoft.OperationalInsights/"
                f"workspaces/{workspace_name}/providers/Microsoft.SecurityInsights/"
                f"threatIntelligence/main/indicators/{indicator_name}?"
                f"api-version=2024-01-01-preview"
            )
            indicator = await self.call_api(ctx, "GET", url, name="get_ti_indicator")
            if not indicator:
                return {
                    "error": "Threat intelligence indicator '%s' not found"
                    % indicator_name,
                    "valid": False,
                }
            props = indicator.get("properties", {})
            details = {
                "id": indicator.get("id"),
                "name": indicator.get("name"),
                "type": indicator.get("type"),
                "displayName": props.get("displayName"),
                "patternType": props.get("patternType"),
                "pattern": props.get("pattern"),
                "source": props.get("source"),
                "created": props.get("createdTimeUtc"),
                "confidence": props.get("confidence"),
                "threatTypes": props.get("threatTypes"),
                "validFrom": props.get("validFrom"),
                "validUntil": props.get("validUntil"),
                "description": props.get("description"),
                "killChainPhases": props.get("killChainPhases"),
                "labels": props.get("labels"),
            }
            return {"indicator": details, "valid": True}
        except Exception as e:
            self.logger.error(
                "Error retrieving threat intelligence indicator %s: %s",
                indicator_name,
                e,
            )
            return {
                "error": "Error retrieving threat intelligence indicator %s: %s"
                % (indicator_name, e),
                "valid": False,
            }
  • The `register_tools` function registers the `sentinel_ti_indicator_get` tool (via `SentinelThreatIntelligenceIndicatorGetTool.register(mcp)`) along with other threat intelligence tools to the MCP server instance.
    def register_tools(mcp: FastMCP):
        """
        Register all Sentinel Threat Intelligence tools with the given MCP instance.
    
        Args:
            mcp (FastMCP): The MCP instance to register tools with.
        """
        SentinelThreatIntelligenceIndicatorGetTool.register(mcp)
        SentinelThreatIntelligenceIndicatorMetricsCollectTool.register(mcp)
        SentinelIPGeodataGetTool.register(mcp)
        SentinelDomainWhoisGetTool.register(mcp)
  • The `SentinelThreatIntelligenceIndicatorGetTool` class definition, including the tool `name`, `description`, and output schema description in the docstring, which defines the tool for MCP.
    class SentinelThreatIntelligenceIndicatorGetTool(MCPToolBase):
        """
        Tool to get a specific Sentinel Threat Intelligence indicator.
    
        Returns:
            dict: {
                'indicator': dict,  # Indicator details as returned by the API
                'valid': bool,      # True if successful
                'error': str (optional)
            }
        """
    
        name = "sentinel_ti_indicator_get"
        description = "Get a specific Sentinel threat intelligence indicator"
  • Class docstring describing the tool's input (indicator_name parameter) and output format (indicator dict with specific fields, valid bool, optional error). Serves as the schema definition.
    """
    Tool to get a specific Sentinel Threat Intelligence indicator.
    
    Returns:
        dict: {
            'indicator': dict,  # Indicator details as returned by the API
            'valid': bool,      # True if successful
            'error': str (optional)
        }
    """
Behavior2/5

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

With no annotations, the description carries full burden but only states the action without behavioral details. It doesn't disclose if this is a read-only operation, requires authentication, has rate limits, or what the output looks like, which is insufficient for a tool with unknown behavior.

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 front-loaded and appropriately sized for the minimal information it conveys.

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 no annotations, 0% schema coverage, and no output schema, the description is incomplete. It lacks details on parameters, behavior, and output, making it inadequate for a tool that likely interacts with threat intelligence data.

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?

Schema description coverage is 0%, and the description adds no parameter information. The single parameter 'kwargs' is undocumented in both schema and description, leaving its meaning and usage completely unclear.

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 ('Get') and resource ('specific Sentinel threat intelligence indicator'), making the purpose understandable. It doesn't distinguish from siblings like 'sentinel_ti_indicator_metrics_collect', but the specificity is adequate.

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?

No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites, context, or differences from related tools like 'sentinel_incident_get' or 'sentinel_hunting_query_get', leaving usage ambiguous.

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/dstreefkerk/ms-sentinel-mcp-server'

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