Skip to main content
Glama
dstreefkerk

ms-sentinel-mcp-server

by dstreefkerk

tool_docs_get

Retrieve raw markdown documentation from the Microsoft Sentinel MCP server for specific paths to access technical content and implementation details.

Instructions

Return the raw markdown for a given documentation path.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kwargsYes

Implementation Reference

  • The ToolDocsGetTool class defines and implements the 'tool_docs_get' tool. It includes the name, description, and the core async run() method that extracts the 'path' parameter, validates it, reads the markdown file from the DOC_ROOT directory, and returns the content or an error.
    class ToolDocsGetTool(MCPToolBase):
        """Tool for retrieving the raw markdown for a given documentation path."""
    
        name = "tool_docs_get"
        description = "Return the raw markdown for a given documentation path."
    
        async def run(self, ctx, **kwargs) -> Any:
            """
            Return the raw markdown for a given documentation path.
    
            Args:
                ctx: The tool context (unused).
                **kwargs: Should include:
                    - path (str): Relative path to the markdown doc (as returned by list_docs).
    
            Returns:
                dict: {
                    'content': raw markdown content of the file,
                    'error': error message if file does not exist or is outside the docs directory,
                    'available_docs': list of available docs if file not found
                }
            """
    
            # Defensive: handle string, None, or dict for kwargs
    
            # Extract path parameter using the centralized parameter extraction from MCPToolBase
            path = self._extract_param(kwargs, "path")
    
            # Check if path is a string
            if path is not None and not isinstance(path, str):
                return {"error": "Invalid path type. Expected a string."}
    
            if not path:
                return {"error": "Missing required parameter: path"}
    
            try:
                file = DOC_ROOT / path
                file.resolve().relative_to(DOC_ROOT.resolve())
                if not file.exists():
                    # Suggest available docs
                    available = [
                        str(p.relative_to(DOC_ROOT)) for p in DOC_ROOT.rglob("*.md")
                    ]
                    return {"error": f"Doc not found: {path}", "available_docs": available}
                content = file.read_text(encoding="utf-8")
                return {"content": content}
            except Exception as e:
                return {"error": f"Failed to read doc: {e}"}
  • The register_tools function registers the ToolDocsGetTool (along with related tools) with the MCP server instance by calling its register method.
    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)
  • DOC_ROOT constant defines the base path for tool documentation markdown files, used by the tool handler.
    DOC_ROOT = Path(__file__).parent.parent / "resources" / "tool_docs"
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool returns raw markdown but doesn't cover critical aspects like error handling, rate limits, authentication needs, or what happens if the path is invalid. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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 directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, with every part contributing essential information, making it highly concise and well-structured.

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?

Given the tool has no annotations, no output schema, and low parameter coverage, the description is incomplete. It lacks details on return values, error cases, and behavioral traits, making it inadequate for an agent to fully understand how to use this tool effectively in context.

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?

The input schema has 1 parameter with 0% description coverage, and the description doesn't add any semantic details about the 'kwargs' parameter. It fails to explain what 'documentation path' means, its format, or examples, leaving the parameter's meaning unclear and not compensating for the low schema coverage.

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 verb ('Return') and resource ('raw markdown for a given documentation path'), making the purpose specific and understandable. However, it doesn't distinguish this tool from its sibling 'tool_docs_list' or 'tool_docs_search', which appear to be related documentation tools, so it misses full sibling differentiation.

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 like 'tool_docs_list' or 'tool_docs_search'. It lacks context about prerequisites, exclusions, or specific scenarios, leaving the agent with no usage direction beyond the basic purpose.

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