Skip to main content
Glama

YST KPI Daily Report Collector

by Xuzan9396

clear_saved_cookies

Remove stored authentication cookies to reset browser session state and resolve login issues when collecting KPI daily reports.

Instructions

清除已保存的 Cookie

Returns: 清除结果

Input Schema

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

{ "properties": {}, "type": "object" }

Implementation Reference

  • The tool handler function for 'clear_saved_cookies'. Decorated with @mcp.tool() for registration. Creates CookieManager and calls its clear_cookies() method, returning success or error message.
    @mcp.tool() async def clear_saved_cookies() -> str: """ 清除已保存的 Cookie Returns: 清除结果 """ manager = CookieManager() try: if manager.clear_cookies(): return safe_text("✓ Cookie 已清除") else: return safe_text("❌ 清除失败") except Exception as e: return safe_text(f"清除失败: {str(e)}")
  • The supporting CookieManager.clear_cookies() method that performs the actual file deletion of the saved cookies.json file.
    def clear_cookies(self) -> bool: """ 清除保存的 Cookie Returns: 是否清除成功 """ if os.path.exists(self.cookie_file): try: os.remove(self.cookie_file) return True except Exception as e: print(f"清除 Cookie 失败: {e}") return False return True

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/Xuzan9396/yst_mcp'

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