diff --git a/server.py b/server.py index 82dfe69..0f5d41b 100644 --- a/server.py +++ b/server.py @@ -183,7 +183,7 @@ async def list_collection_documents( @mcp.tool() -async def outline_api_call(method: str, params: str = "{}") -> str: +async def outline_api_call(method: str, params: str = "") -> str: """Execute a raw Outline API call for any endpoint. Use the 'outline://api-reference' resource to discover available methods @@ -202,7 +202,7 @@ async def outline_api_call(method: str, params: str = "{}") -> str: - method='documents.delete', params='{"id": "document-uuid"}' """ try: - parsed_params = json.loads(params) if params else {} + parsed_params = json.loads(params) if params and params.strip() else {} except json.JSONDecodeError as e: return json.dumps({"ok": False, "error": f"Invalid JSON params: {str(e)}"})