INNER CODE UNIT · Python

error

Arthur-Ficial/apfel · mcp/calculator/server.py:192

def error(msg_id, code, message):
    send({"jsonrpc": "2.0", "id": msg_id, "error": {"code": code, "message": message}})


def handle(msg):
    method = msg.get("method", "")
    msg_id = msg.get("id")
    params = msg.get("params", {})

    if method == "initialize":
        respond(msg_id, {
            "protocolVersion": PROTOCOL_VERSION,
            "capabilities": {"tools": {}},
            "serverInfo": {"name": SERVER_NAME, "version": SERVER_VERSION}
        })
    elif method == "notifications/initialized":
        pass
    elif method == "tools/list":

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…