Skip to main content
Glama
dstreefkerk

ms-sentinel-mcp-server

by dstreefkerk

sentinel_source_control_get

Retrieve details for a specific Microsoft Sentinel source control configuration using its unique ID to manage security monitoring data sources.

Instructions

Get details for a specific Sentinel source control by ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kwargsYes

Implementation Reference

  • The SentinelSourceControlGetTool class implements the tool handler. It defines the tool name, description, and the async run method which extracts the source_control_id, retrieves the source control using the Azure Security Insights client, formats the response, and handles errors.
    class SentinelSourceControlGetTool(MCPToolBase):
        """
        Tool for retrieving details for a specific Sentinel source control by ID.
        """
    
        name = "sentinel_source_control_get"
        description = "Get details for a specific Sentinel source control by ID."
    
        async def run(self, ctx: Context, **kwargs):
            """
            Get details for a specific source control by ID.
    
            Parameters:
                source_control_id (str, required): The ID of the source control to
                    retrieve.
            Returns:
                dict: {
                    'source_control': dict,
                    'valid': bool,
                    'errors': list[str],
                    'error': str (optional, present only if an error occurs)
                }
            Output Fields:
                - source_control: Source control object (id, name, repo, etc.)
                - valid: True if successful, False otherwise
                - errors: List of error messages (empty if none)
                - error: Error message if an error occurs (optional)
            Error cases will always include an 'error' key for testability.
            """
            logger = self.logger
            # Extract parameters using the base class method
            source_control_id = self._extract_param(kwargs, "source_control_id")
            result = {
                "source_control": {},
                "valid": False,
                "errors": [],
            }
            if not source_control_id:
                error_msg = "Missing required parameter: source_control_id"
                logger.error("%s", error_msg)
                result["error"] = error_msg
                result["errors"].append(error_msg)
                return result
            workspace_name, resource_group, subscription_id = self.get_azure_context(ctx)
            try:
                client = self.get_securityinsight_client(subscription_id)
                ctrl = client.source_controls.get(
                    resource_group, workspace_name, source_control_id
                )
                result["source_control"] = {
                    "id": getattr(ctrl, "id", None),
                    "name": getattr(ctrl, "name", None),
                    "repo_type": getattr(ctrl, "repo_type", None),
                    "repo_url": getattr(ctrl, "repo_url", None),
                    "description": getattr(ctrl, "description", None),
                    "content_types": getattr(ctrl, "content_types", None),
                    "created_time_utc": str(getattr(ctrl, "created_time_utc", "")),
                    "last_modified_time_utc": str(
                        getattr(ctrl, "last_modified_time_utc", "")
                    ),
                }
                result["valid"] = True
            except Exception as ex:
                error_msg = "Error retrieving source control: %s" % ex
                logger.exception("%s", error_msg)
                result["error"] = error_msg
                result["errors"].append(error_msg)
            return result
  • Registers the SentinelSourceControlGetTool with the MCP server instance.
    SentinelSourceControlGetTool.register(mcp)
Behavior1/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. It states this is a 'Get' operation but doesn't disclose whether it's read-only, requires specific permissions, has rate limits, returns structured data or errors, or what happens if the ID doesn't exist. This is inadequate for a tool with zero annotation coverage.

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 gets straight to the point with no wasted words. It's appropriately sized for a simple lookup tool and front-loads the essential information.

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?

Given the complexity of a security tool (Sentinel), zero annotations, no output schema, and undocumented parameters, the description is severely incomplete. It doesn't explain what 'details' are returned, error conditions, authentication requirements, or how this fits into the broader Sentinel context with its many sibling tools.

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?

The schema has 0% description coverage with one parameter named 'kwargs' of type string. The description mentions 'by ID' but doesn't specify that this ID should be passed in 'kwargs', what format it should have, or provide any examples. With low schema coverage, the description fails to compensate for the undocumented parameter.

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 action ('Get details') and resource ('a specific Sentinel source control by ID'), making the purpose understandable. However, it doesn't distinguish this tool from similar siblings like 'sentinel_connectors_get' or 'sentinel_watchlist_get' which follow the same 'get by ID' pattern for different Sentinel resources.

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. It doesn't mention the sibling 'sentinel_source_controls_list' for listing all source controls, nor does it specify prerequisites like needing a specific ID format or authentication context. Usage is implied but not explicitly defined.

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