Skip to main content
Glama
dstreefkerk

ms-sentinel-mcp-server

by dstreefkerk

tool_docs_list

Lists available documentation markdown paths for Microsoft Sentinel to help users access and navigate security monitoring resources.

Instructions

Enumerate available Sentinel server documentation markdown paths.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kwargsYes

Implementation Reference

  • The async run method implementing the tool logic: lists .md files under DOC_ROOT, filters by optional 'prefix' parameter, returns paths or error.
    async def run(self, ctx, **kwargs) -> Any: """ Enumerate available Sentinel server documentation markdown paths. Args: ctx: The tool context (unused). **kwargs: Optional arguments. May include: - prefix (str, optional): Only include docs whose relative path starts with this prefix. Returns: dict: { 'paths': list of relative markdown doc paths, 'error': error message if directory cannot be read } """ # Defensive: handle string, None, or dict for kwargs # Extract prefix parameter using the centralized parameter extraction from MCPToolBase prefix = self._extract_param(kwargs, "prefix") try: paths = [str(p.relative_to(DOC_ROOT)) for p in DOC_ROOT.rglob("*.md")] if prefix: paths = [p for p in paths if p.startswith(prefix)] return {"paths": paths} except Exception as e: return {"error": f"Failed to list docs: {e}"}
  • Tool class definition with name 'tool_docs_list' and description, inheriting MCPToolBase which provides base schema/validation.
    class ToolDocsListTool(MCPToolBase): """Tool for enumerating available Sentinel server documentation markdown paths.""" name = "tool_docs_list" description = "Enumerate available Sentinel server documentation markdown paths."
  • Function to register all tool docs tools including ToolDocsListTool with the MCP server.
    def register_tools(mcp): """Register all documentation tools with the given MCP server instance.""" ToolDocsListTool.register(mcp) ToolDocsGetTool.register(mcp) ToolDocsSearchTool.register(mcp) LLMInstructionsGetTool.register(mcp)
  • Defines the root path for documentation markdown files used by the tool.
    DOC_ROOT = Path(__file__).parent.parent / "resources" / "tool_docs"

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