Skip to main content
Glama
parsers.py548 B
import json from typing import Dict, List def parse_pyright_output(output: str) -> List[Dict]: """ Parses the JSON output from Pyright, extracting the list of diagnostics from the 'generalDiagnostics' key. """ if not output.strip(): return [] data = json.loads(output) return data.get("generalDiagnostics", []) def parse_as_json_document(output: str) -> List[Dict]: """Parses a single JSON document (e.g., a list of issues).""" if not output.strip(): return [] return json.loads(output)

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/flothjl/lsp-mcp'

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