tool_docs_list
Lists available Microsoft Sentinel documentation markdown files to help users locate and access server 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:22-57 (handler)The `ToolDocsListTool` class defines and implements the `tool_docs_list` tool, including the `run` method which lists all `*.md` files under `resources/tool_docs`, optionally filtered by `prefix`, returning a list of relative paths or an error.class ToolDocsListTool(MCPToolBase): """Tool for enumerating available Sentinel server documentation markdown paths.""" name = "tool_docs_list" description = "Enumerate available Sentinel server documentation markdown paths." 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:190-196 (registration)`register_tools` function registers the `ToolDocsListTool` (among other doc tools) with the MCP server instance via `ToolDocsListTool.register(mcp)`.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)