Skip to main content
Glama

open_URL_with_authorization

Open Moodle-protected URLs in a browser by handling authentication automatically, allowing access to course materials and resources without manual login.

Instructions

Open a URL in a new authorized browser window after Moodle login (show to user).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesTarget URL to open after Moodle login

Implementation Reference

  • main.py:161-182 (handler)
    The primary handler function for the 'open_URL_with_authorization' tool. It instantiates MUSTerClientWithHead, calls openUrl on the input URL, retrieves the current URL and page title from the Selenium driver, and returns a structured success response or error dictionary.
    def tool_open_URL_with_authorization(url: str) -> Dict[str, Any]:
        try:
            muster_client_with_head = MUSTerClientWithHead()
            driver = muster_client_with_head.openUrl(url)
    
            if driver:
                current_url = driver.current_url
                page_title = driver.title
    
                return {
                    "success": True,
                    "message": "URL opened successfully with Moodle authorization",
                    "opened_url": url,
                    "current_url": current_url,
                    "page_title": page_title,
                    "note": "A new browser window is now open and logged in. It will remain open until manually closed.",
                }
            else:
                return {"error": "Failed to open URL - driver not initialized"}
    
        except Exception as e:
            return {"error": f"Failed to open URL with authorization: {str(e)}"}
  • main.py:68-81 (registration)
    Tool registration within the list_muster_tools() function, returned by the @server.list_tools() handler. Defines the tool name, description, and JSON input schema for MCP protocol compliance.
    Tool(
        name="open_URL_with_authorization",
        description="Open a URL in a new authorized browser window after Moodle login (show to user).",
        inputSchema={
            "type": "object",
            "properties": {
                "url": {
                    "type": "string",
                    "description": "Target URL to open after Moodle login",
                }
            },
            "required": ["url"],
        },
    ),
  • main.py:215-216 (registration)
    Dispatch routing in the @server.call_tool() handler that matches the tool name and invokes the corresponding tool handler function with parsed arguments.
    if name == "open_URL_with_authorization":
        return _wrap_json(tool_open_URL_with_authorization(args["url"]))
  • Supporting utility method in the MUSTerClientWithHead class. Ensures the user is logged into Moodle via Selenium WebDriver (headed browser), navigates to the provided URL, and returns the driver instance for further inspection.
    def openUrl(self, url: str):
        if not self.logged_in:
            if not self.login():
                raise Exception("Failed to login to Moodle")
        self.driver.get(url)
        return self.driver
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 discloses that the action opens a browser window and involves Moodle login, but lacks details on behavioral traits like whether it requires specific permissions, handles errors, or has side effects (e.g., session management). For a tool with user interaction and authentication, this is a significant gap in transparency.

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 front-loads the core action ('Open a URL') and includes all necessary context ('authorized browser window', 'after Moodle login', 'show to user'). There is zero waste, and every phrase earns its place by clarifying the tool's purpose and usage.

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's complexity (involving user interaction and authentication), lack of annotations, and no output schema, the description is incomplete. It doesn't explain what happens on success/failure, return values, or potential errors. For a tool that likely has behavioral nuances, more context is needed to be fully helpful to an agent.

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

Parameters3/5

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

Schema description coverage is 100%, with the single parameter 'url' documented in the schema as 'Target URL to open after Moodle login'. The description adds no additional parameter semantics beyond this, as it doesn't elaborate on URL format, constraints, or examples. Baseline 3 is appropriate since the schema handles the parameter documentation adequately.

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 ('Open a URL') and the resource ('authorized browser window'), specifying it happens 'after Moodle login' and is 'show[n] to user'. It distinguishes from siblings like download_resource or get_course_content by focusing on browser navigation rather than data retrieval. However, it doesn't explicitly contrast with all siblings (e.g., get_current_time).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context ('after Moodle login', 'show to user'), suggesting this tool is for user-facing navigation post-authentication. It doesn't provide explicit when-not-to-use guidance or name alternatives among siblings. The context is clear but lacks explicit exclusions or comparative guidance with other tools.

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/Cosmostima/MUSTer_MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server