Skip to main content
Glama
dstreefkerk

ms-sentinel-mcp-server

by dstreefkerk

sentinel_metadata_list

Lists all Microsoft Sentinel metadata in your current workspace to help you manage and organize security monitoring resources.

Instructions

List all Sentinel metadata in the current workspace.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kwargsYes

Implementation Reference

  • SentinelMetadataListTool class: the core handler implementation for the 'sentinel_metadata_list' tool. Inherits from MCPToolBase, defines the tool name, description, and the async run() method that fetches and returns metadata list from the Sentinel workspace using the Azure SecurityInsights client.
    class SentinelMetadataListTool(MCPToolBase):
        """
        Tool for listing all Sentinel metadata in the current workspace.
        """
    
        name = "sentinel_metadata_list"
        description = "List all Sentinel metadata in the current workspace."
    
        async def run(self, ctx: Context, **kwargs):
            """
            List all metadata in the current Sentinel workspace.
    
            Parameters:
                None required. (Context is extracted from MCP or environment.)
            Returns:
                dict: {
                    'metadata': list[dict],
                    'valid': bool,
                    'errors': list[str],
                    'error': str (optional, present only if an error occurs)
                }
            Output Fields:
                - metadata: List of metadata objects (id, name, kind, 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
            workspace_name, resource_group, subscription_id = self.get_azure_context(ctx)
            result = {
                "metadata": [],
                "valid": False,
                "errors": [],
            }
            try:
                client = self.get_securityinsight_client(subscription_id)
                metadata_objs = client.metadata.list(resource_group, workspace_name)
                metadata_list = []
                for meta in metadata_objs:
                    metadata_list.append(
                        {
                            "id": getattr(meta, "id", None),
                            "name": getattr(meta, "name", None),
                            "kind": getattr(meta, "kind", None),
                            "content_id": getattr(meta, "content_id", None),
                            "version": getattr(meta, "version", None),
                            "parent_id": getattr(meta, "parent_id", None),
                            "author": getattr(meta, "author", None),
                            "source": getattr(meta, "source", None),
                            "support": getattr(meta, "support", None),
                            "categories": getattr(meta, "categories", None),
                            "dependencies": getattr(meta, "dependencies", None),
                            "created": str(getattr(meta, "created", "")),
                            "last_modified": str(getattr(meta, "last_modified", "")),
                        }
                    )
                result["metadata"] = metadata_list
                result["valid"] = True
            except Exception as ex:
                error_msg = "Error listing metadata: %s" % ex
                logger.exception("%s", error_msg)
                result["error"] = error_msg
                result["errors"].append(error_msg)
            return result
  • The register_tools function registers SentinelMetadataListTool (among others) with the MCP server instance via SentinelMetadataListTool.register(mcp).
    def register_tools(mcp):
        """Register all Sentinel workspace-related tools with the MCP server instance."""
        SentinelWorkspaceGetTool.register(mcp)
        SentinelSourceControlsListTool.register(mcp)
        SentinelSourceControlGetTool.register(mcp)
        SentinelMetadataListTool.register(mcp)
        SentinelMetadataGetTool.register(mcp)
        SentinelMLAnalyticsSettingsListTool.register(mcp)
        SentinelMLAnalyticsSettingGetTool.register(mcp)
  • Tool schema definition: includes name, description, and detailed docstring specifying input parameters (none) and output schema (metadata list, valid flag, errors, optional error).
    """
    Tool for listing all Sentinel metadata in the current workspace.
    """
    
    name = "sentinel_metadata_list"
    description = "List all Sentinel metadata in the current workspace."
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states this is a list operation but doesn't disclose behavioral traits like pagination, rate limits, authentication requirements, or what 'all' means in practice (e.g., completeness guarantees).

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, clear sentence with no wasted words. It's appropriately sized and front-loaded with the essential action and resource.

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 tool with no annotations, 0% schema coverage, and no output schema, the description is incomplete. It doesn't explain the parameter, return format, or behavioral constraints, leaving significant gaps for an AI agent.

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

Parameters2/5

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

Schema description coverage is 0%, with one undocumented parameter 'kwargs'. The description adds no parameter information beyond what's in the schema, failing to compensate for the coverage gap.

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 ('List all') and resource ('Sentinel metadata'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'sentinel_metadata_get' or explain what 'metadata' specifically refers to in this context.

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 like 'sentinel_metadata_get' or other list tools. The description mentions 'current workspace' but doesn't explain prerequisites or exclusions.

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