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
| Name | Required | Description | Default |
|---|---|---|---|
| kwargs | Yes |
Implementation Reference
- tools/tool_docs_tools.py:28-56 (handler)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}"}
- tools/tool_docs_tools.py:22-27 (schema)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."
- tools/tool_docs_tools.py:190-196 (registration)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)
- tools/tool_docs_tools.py:19-19 (helper)Defines the root path for documentation markdown files used by the tool.DOC_ROOT = Path(__file__).parent.parent / "resources" / "tool_docs"