{
  "openapi": "3.1.0",
  "info": {
    "title": "MYOPL Public and Personal MCP APIs",
    "description": "Free, unauthenticated public lookups through MYOPL's existing MCP endpoint: published player ratings and rating-card totals, public court/club/open-play directory listings, officially licensed 2026 USA Pickleball rulebook evidence, MYOPL Help Center and website information. No account, API key or OAuth token is required for these five read-only tools. Requests are rate limited. This contract describes JSON-RPC over HTTP POST, not separate REST GET routes. Private account data and actions are outside this public contract. The separately scoped /mcp/personal operation requires OAuth, an eligible MYOPL Plus or higher account, and the tool-specific scopes. Its four named scopes are declared here for least-privilege discovery.",
    "version": "1.0.0",
    "termsOfService": "https://myopl.net/terms-and-conditions/",
    "contact": {
      "name": "MYOPL Support",
      "url": "https://myopl.net",
      "email": "support@myopl.net"
    }
  },
  "servers": [
    {
      "url": "https://api.myopl.net",
      "description": "MYOPL production API"
    }
  ],
  "security": [],
  "externalDocs": {
    "description": "English and Spanish public MCP integration guides",
    "url": "https://ai.myopl.net/integration.md"
  },
  "paths": {
    "/mcp": {
      "post": {
        "summary": "Call MYOPL public MCP tools",
        "operationId": "callMyoplPublicMcp",
        "description": "Initialize, list the tools, then call a named tool with its arguments. Send Content-Type: application/json and Accept: application/json, text/event-stream. After initialization send MCP-Protocol-Version: 2025-11-25. The service is stateless, returns JSON, and does not require a session ID or offer a persistent SSE stream. Browser calls are subject to the API Origin policy; wildcard CORS on the specification document does not change that policy. MCP Apps clients can list and read the public rating-card resource. One card displays singles and doubles together; clients without MCP Apps support can use the text and structured result.",
        "security": [],
        "parameters": [
          {
            "name": "MCP-Protocol-Version",
            "in": "header",
            "required": false,
            "description": "Send after initialization; unsupported values are rejected.",
            "schema": {
              "type": "string",
              "enum": [
                "2025-11-25"
              ]
            }
          }
        ],
        "x-max-request-body-bytes": 16384,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/McpRequest"
              },
              "examples": {
                "initialize": {
                  "value": {
                    "jsonrpc": "2.0",
                    "id": 1,
                    "method": "initialize",
                    "params": {
                      "protocolVersion": "2025-11-25",
                      "capabilities": {},
                      "clientInfo": {
                        "name": "myopl-public-api-client",
                        "version": "1.0.0"
                      }
                    }
                  }
                },
                "listTools": {
                  "value": {
                    "jsonrpc": "2.0",
                    "id": 1,
                    "method": "tools/list"
                  }
                },
                "browseChoices": {
                  "value": {
                    "jsonrpc": "2.0",
                    "id": 1,
                    "method": "tools/call",
                    "params": {
                      "name": "prepare_pickleball_browse",
                      "arguments": {
                        "location": "Jupiter, FL",
                        "language": "en"
                      }
                    }
                  }
                },
                "playerRating": {
                  "value": {
                    "jsonrpc": "2.0",
                    "id": 1,
                    "method": "tools/call",
                    "params": {
                      "name": "get_public_player_rating",
                      "arguments": {
                        "username": "example_player"
                      }
                    }
                  }
                },
                "rules": {
                  "value": {
                    "jsonrpc": "2.0",
                    "id": 1,
                    "method": "tools/call",
                    "params": {
                      "name": "search_pickleball_rules",
                      "arguments": {
                        "query": "non-volley zone",
                        "language": "en"
                      }
                    }
                  }
                },
                "help": {
                  "value": {
                    "jsonrpc": "2.0",
                    "id": 1,
                    "method": "tools/call",
                    "params": {
                      "name": "search_myopl_help",
                      "arguments": {
                        "query": "RSVP",
                        "language": "en"
                      }
                    }
                  }
                },
                "websiteSpanish": {
                  "value": {
                    "jsonrpc": "2.0",
                    "id": 1,
                    "method": "tools/call",
                    "params": {
                      "name": "search_myopl_website",
                      "arguments": {
                        "query": "valoración OPL",
                        "language": "es"
                      }
                    }
                  }
                },
                "initialized": {
                  "value": {
                    "jsonrpc": "2.0",
                    "method": "notifications/initialized"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC result or protocol error. Tool failures also use HTTP 200, with result.isError=true; a missing public player returns found=false, not HTTP 404.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpResponse"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Effective per-minute request budget.",
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests remaining in the current budget.",
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "RateLimit-Policy": {
                "description": "IETF structured quota policy (draft-ietf-httpapi-ratelimit-headers-11): q is the request allowance and w the window in seconds. The reported policy is the currently tightest applicable budget.",
                "schema": {
                  "type": "string"
                },
                "example": "\"myopl\";q=20;w=60"
              },
              "RateLimit": {
                "description": "IETF structured current quota: r requests remaining and t seconds until reset. Advisory; Retry-After controls a 429 retry. No account, address or token identifiers are included.",
                "schema": {
                  "type": "string"
                },
                "example": "\"myopl\";r=19;t=60"
              },
              "X-RateLimit-Reset": {
                "description": "Compatibility field: Unix timestamp when the reported quota resets.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "202": {
            "description": "Notification accepted; no response body and no tool execution.",
            "headers": {
              "RateLimit-Policy": {
                "description": "IETF structured quota policy (draft-ietf-httpapi-ratelimit-headers-11): q is the request allowance and w the window in seconds. The reported policy is the currently tightest applicable budget.",
                "schema": {
                  "type": "string"
                },
                "example": "\"myopl\";q=20;w=60"
              },
              "RateLimit": {
                "description": "IETF structured current quota: r requests remaining and t seconds until reset. Advisory; Retry-After controls a 429 retry. No account, address or token identifiers are included.",
                "schema": {
                  "type": "string"
                },
                "example": "\"myopl\";r=19;t=60"
              },
              "X-RateLimit-Reset": {
                "description": "Compatibility field: Unix timestamp when the reported quota resets.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "description": "Unsupported MCP-Protocol-Version header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "headers": {
              "RateLimit-Policy": {
                "description": "IETF structured quota policy (draft-ietf-httpapi-ratelimit-headers-11): q is the request allowance and w the window in seconds. The reported policy is the currently tightest applicable budget.",
                "schema": {
                  "type": "string"
                },
                "example": "\"myopl\";q=20;w=60"
              },
              "RateLimit": {
                "description": "IETF structured current quota: r requests remaining and t seconds until reset. Advisory; Retry-After controls a 429 retry. No account, address or token identifiers are included.",
                "schema": {
                  "type": "string"
                },
                "example": "\"myopl\";r=19;t=60"
              },
              "X-RateLimit-Reset": {
                "description": "Compatibility field: Unix timestamp when the reported quota resets.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "403": {
            "description": "Browser Origin is not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "headers": {
              "RateLimit-Policy": {
                "description": "IETF structured quota policy (draft-ietf-httpapi-ratelimit-headers-11): q is the request allowance and w the window in seconds. The reported policy is the currently tightest applicable budget.",
                "schema": {
                  "type": "string"
                },
                "example": "\"myopl\";q=20;w=60"
              },
              "RateLimit": {
                "description": "IETF structured current quota: r requests remaining and t seconds until reset. Advisory; Retry-After controls a 429 retry. No account, address or token identifiers are included.",
                "schema": {
                  "type": "string"
                },
                "example": "\"myopl\";r=19;t=60"
              },
              "X-RateLimit-Reset": {
                "description": "Compatibility field: Unix timestamp when the reported quota resets.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "405": {
            "description": "Only HTTP POST is supported; GET does not open an SSE stream.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "headers": {
              "RateLimit-Policy": {
                "description": "IETF structured quota policy (draft-ietf-httpapi-ratelimit-headers-11): q is the request allowance and w the window in seconds. The reported policy is the currently tightest applicable budget.",
                "schema": {
                  "type": "string"
                },
                "example": "\"myopl\";q=20;w=60"
              },
              "RateLimit": {
                "description": "IETF structured current quota: r requests remaining and t seconds until reset. Advisory; Retry-After controls a 429 retry. No account, address or token identifiers are included.",
                "schema": {
                  "type": "string"
                },
                "example": "\"myopl\";r=19;t=60"
              },
              "X-RateLimit-Reset": {
                "description": "Compatibility field: Unix timestamp when the reported quota resets.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "406": {
            "description": "The Accept header does not permit application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "headers": {
              "RateLimit-Policy": {
                "description": "IETF structured quota policy (draft-ietf-httpapi-ratelimit-headers-11): q is the request allowance and w the window in seconds. The reported policy is the currently tightest applicable budget.",
                "schema": {
                  "type": "string"
                },
                "example": "\"myopl\";q=20;w=60"
              },
              "RateLimit": {
                "description": "IETF structured current quota: r requests remaining and t seconds until reset. Advisory; Retry-After controls a 429 retry. No account, address or token identifiers are included.",
                "schema": {
                  "type": "string"
                },
                "example": "\"myopl\";r=19;t=60"
              },
              "X-RateLimit-Reset": {
                "description": "Compatibility field: Unix timestamp when the reported quota resets.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "413": {
            "description": "Request body exceeds 16,384 bytes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "headers": {
              "RateLimit-Policy": {
                "description": "IETF structured quota policy (draft-ietf-httpapi-ratelimit-headers-11): q is the request allowance and w the window in seconds. The reported policy is the currently tightest applicable budget.",
                "schema": {
                  "type": "string"
                },
                "example": "\"myopl\";q=20;w=60"
              },
              "RateLimit": {
                "description": "IETF structured current quota: r requests remaining and t seconds until reset. Advisory; Retry-After controls a 429 retry. No account, address or token identifiers are included.",
                "schema": {
                  "type": "string"
                },
                "example": "\"myopl\";r=19;t=60"
              },
              "X-RateLimit-Reset": {
                "description": "Compatibility field: Unix timestamp when the reported quota resets.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "415": {
            "description": "Content-Type must be application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "headers": {
              "RateLimit-Policy": {
                "description": "IETF structured quota policy (draft-ietf-httpapi-ratelimit-headers-11): q is the request allowance and w the window in seconds. The reported policy is the currently tightest applicable budget.",
                "schema": {
                  "type": "string"
                },
                "example": "\"myopl\";q=20;w=60"
              },
              "RateLimit": {
                "description": "IETF structured current quota: r requests remaining and t seconds until reset. Advisory; Retry-After controls a 429 retry. No account, address or token identifiers are included.",
                "schema": {
                  "type": "string"
                },
                "example": "\"myopl\";r=19;t=60"
              },
              "X-RateLimit-Reset": {
                "description": "Compatibility field: Unix timestamp when the reported quota resets.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "description": "Temporary request limit. Wait for Retry-After seconds, then retry; do not disconnect.",
            "headers": {
              "Retry-After": {
                "description": "Required delay in seconds.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Effective per-minute request budget.",
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests remaining in the current budget.",
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "RateLimit-Policy": {
                "description": "IETF structured quota policy (draft-ietf-httpapi-ratelimit-headers-11): q is the request allowance and w the window in seconds. The reported policy is the currently tightest applicable budget.",
                "schema": {
                  "type": "string"
                },
                "example": "\"myopl\";q=20;w=60"
              },
              "RateLimit": {
                "description": "IETF structured current quota: r requests remaining and t seconds until reset. Advisory; Retry-After controls a 429 retry. No account, address or token identifiers are included.",
                "schema": {
                  "type": "string"
                },
                "example": "\"myopl\";r=19;t=60"
              },
              "X-RateLimit-Reset": {
                "description": "Compatibility field: Unix timestamp when the reported quota resets.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonRpcError"
                }
              }
            }
          },
          "503": {
            "description": "Public agent service is not enabled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "headers": {
              "RateLimit-Policy": {
                "description": "IETF structured quota policy (draft-ietf-httpapi-ratelimit-headers-11): q is the request allowance and w the window in seconds. The reported policy is the currently tightest applicable budget.",
                "schema": {
                  "type": "string"
                },
                "example": "\"myopl\";q=20;w=60"
              },
              "RateLimit": {
                "description": "IETF structured current quota: r requests remaining and t seconds until reset. Advisory; Retry-After controls a 429 retry. No account, address or token identifiers are included.",
                "schema": {
                  "type": "string"
                },
                "example": "\"myopl\";r=19;t=60"
              },
              "X-RateLimit-Reset": {
                "description": "Compatibility field: Unix timestamp when the reported quota resets.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "default": {
            "description": "Unexpected infrastructure or HTTP error. Do not interpret it as a successful tool result.",
            "headers": {
              "RateLimit-Policy": {
                "description": "IETF structured quota policy (draft-ietf-httpapi-ratelimit-headers-11): q is the request allowance and w the window in seconds. The reported policy is the currently tightest applicable budget.",
                "schema": {
                  "type": "string"
                },
                "example": "\"myopl\";q=20;w=60"
              },
              "RateLimit": {
                "description": "IETF structured current quota: r requests remaining and t seconds until reset. Advisory; Retry-After controls a 429 retry. No account, address or token identifiers are included.",
                "schema": {
                  "type": "string"
                },
                "example": "\"myopl\";r=19;t=60"
              },
              "X-RateLimit-Reset": {
                "description": "Compatibility field: Unix timestamp when the reported quota resets.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    },
    "/mcp/server-card": {
      "get": {
        "operationId": "getMyoplPublicMcpServerCard",
        "summary": "Discover MYOPL public MCP without authentication",
        "description": "Existing read-only JSON discovery endpoint. Use the returned remote URL for JSON-RPC tool calls. No account, API key or OAuth is required.",
        "security": [],
        "responses": {
          "200": {
            "description": "Public MYOPL server identity and Streamable HTTP endpoint.",
            "headers": {
              "RateLimit-Policy": {
                "description": "IETF structured quota policy (draft-ietf-httpapi-ratelimit-headers-11): q is the request allowance and w the window in seconds. The reported policy is the currently tightest applicable budget.",
                "schema": {
                  "type": "string"
                },
                "example": "\"myopl\";q=20;w=60"
              },
              "RateLimit": {
                "description": "IETF structured current quota: r requests remaining and t seconds until reset. Advisory; Retry-After controls a 429 retry. No account, address or token identifiers are included.",
                "schema": {
                  "type": "string"
                },
                "example": "\"myopl\";r=19;t=60"
              },
              "X-RateLimit-Reset": {
                "description": "Compatibility field: Unix timestamp when the reported quota resets.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/mcp-server-card+json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "name",
                    "title",
                    "version",
                    "remotes"
                  ],
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "version": {
                      "type": "string"
                    },
                    "remotes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "type",
                          "url"
                        ],
                        "properties": {
                          "type": {
                            "const": "streamable-http"
                          },
                          "url": {
                            "type": "string",
                            "format": "uri"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Temporary quota exhausted; wait Retry-After seconds.",
            "headers": {
              "RateLimit-Policy": {
                "description": "IETF structured quota policy (draft-ietf-httpapi-ratelimit-headers-11): q is the request allowance and w the window in seconds. The reported policy is the currently tightest applicable budget.",
                "schema": {
                  "type": "string"
                },
                "example": "\"myopl\";q=20;w=60"
              },
              "RateLimit": {
                "description": "IETF structured current quota: r requests remaining and t seconds until reset. Advisory; Retry-After controls a 429 retry. No account, address or token identifiers are included.",
                "schema": {
                  "type": "string"
                },
                "example": "\"myopl\";r=19;t=60"
              },
              "X-RateLimit-Reset": {
                "description": "Compatibility field: Unix timestamp when the reported quota resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/mcp/personal": {
      "post": {
        "operationId": "callMyoplPersonalMcp",
        "summary": "Call MYOPL tools for the consenting account",
        "description": "Stateless MCP Streamable HTTP, JSON-RPC 2.0. Initialize before subsequent calls. Each tool additionally requires its declared scope. The operation does not require all scopes at once. Read tool metadata for the authorized UI resource. Do not call prepare_my_rsvp unless the user requests RSVP preparation.",
        "security": [
          {
            "myoplOAuth": []
          }
        ],
        "parameters": [
          {
            "name": "MCP-Protocol-Version",
            "in": "header",
            "description": "Required except for initialize.",
            "schema": {
              "const": "2025-11-25"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "object",
                    "required": [
                      "jsonrpc",
                      "id",
                      "method",
                      "params"
                    ],
                    "properties": {
                      "jsonrpc": {
                        "const": "2.0"
                      },
                      "id": {
                        "type": [
                          "integer",
                          "string"
                        ]
                      },
                      "method": {
                        "const": "tools/call"
                      },
                      "params": {
                        "type": "object",
                        "required": [
                          "name"
                        ],
                        "properties": {
                          "name": {
                            "const": "get_my_rating"
                          },
                          "arguments": {
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {},
                            "required": []
                          }
                        }
                      }
                    },
                    "description": "Read the consenting player published OPL ratings",
                    "x-required-oauth-scopes": [
                      "myopl:rating:read"
                    ]
                  },
                  {
                    "type": "object",
                    "required": [
                      "jsonrpc",
                      "id",
                      "method",
                      "params"
                    ],
                    "properties": {
                      "jsonrpc": {
                        "const": "2.0"
                      },
                      "id": {
                        "type": [
                          "integer",
                          "string"
                        ]
                      },
                      "method": {
                        "const": "tools/call"
                      },
                      "params": {
                        "type": "object",
                        "required": [
                          "name"
                        ],
                        "properties": {
                          "name": {
                            "const": "get_my_next_session"
                          },
                          "arguments": {
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                              "league": {
                                "type": "string",
                                "pattern": "^[A-Za-z0-9_-]{1,150}$"
                              }
                            },
                            "required": [
                              "league"
                            ]
                          }
                        }
                      }
                    },
                    "description": "Find the consenting player league sessions",
                    "x-required-oauth-scopes": [
                      "myopl:sessions:read"
                    ]
                  },
                  {
                    "type": "object",
                    "required": [
                      "jsonrpc",
                      "id",
                      "method",
                      "params"
                    ],
                    "properties": {
                      "jsonrpc": {
                        "const": "2.0"
                      },
                      "id": {
                        "type": [
                          "integer",
                          "string"
                        ]
                      },
                      "method": {
                        "const": "tools/call"
                      },
                      "params": {
                        "type": "object",
                        "required": [
                          "name"
                        ],
                        "properties": {
                          "name": {
                            "const": "prepare_my_rsvp"
                          },
                          "arguments": {
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                              "league": {
                                "type": "string",
                                "pattern": "^[A-Za-z0-9_-]{1,150}$"
                              },
                              "response": {
                                "type": "string",
                                "enum": [
                                  "yes",
                                  "maybe",
                                  "no"
                                ]
                              }
                            },
                            "required": [
                              "league",
                              "response"
                            ]
                          }
                        }
                      }
                    },
                    "description": "Prepare RSVP for explicit confirmation in MYOPL; does not submit attendance",
                    "x-required-oauth-scopes": [
                      "myopl:rsvp:write"
                    ]
                  },
                  {
                    "type": "object",
                    "required": [
                      "jsonrpc",
                      "id",
                      "method",
                      "params"
                    ],
                    "properties": {
                      "jsonrpc": {
                        "const": "2.0"
                      },
                      "id": {
                        "type": [
                          "integer",
                          "string"
                        ]
                      },
                      "method": {
                        "const": "tools/call"
                      },
                      "params": {
                        "type": "object",
                        "required": [
                          "name"
                        ],
                        "properties": {
                          "name": {
                            "const": "get_my_action_status"
                          },
                          "arguments": {
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                              "action_id": {
                                "type": "string",
                                "pattern": "^[A-Za-z0-9]{64}$"
                              }
                            },
                            "required": [
                              "action_id"
                            ]
                          }
                        }
                      }
                    },
                    "description": "Prepare RSVP for explicit confirmation in MYOPL; does not submit attendance",
                    "x-required-oauth-scopes": [
                      "myopl:rsvp:write"
                    ]
                  },
                  {
                    "type": "object",
                    "required": [
                      "jsonrpc",
                      "id",
                      "method",
                      "params"
                    ],
                    "properties": {
                      "jsonrpc": {
                        "const": "2.0"
                      },
                      "id": {
                        "type": [
                          "integer",
                          "string"
                        ]
                      },
                      "method": {
                        "const": "tools/call"
                      },
                      "params": {
                        "type": "object",
                        "required": [
                          "name"
                        ],
                        "properties": {
                          "name": {
                            "const": "get_my_statistics_card"
                          },
                          "arguments": {
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {},
                            "required": []
                          }
                        }
                      }
                    },
                    "description": "Read own statistics cards without a paid upgrade",
                    "x-required-oauth-scopes": [
                      "myopl:statistics:read"
                    ]
                  },
                  {
                    "type": "object",
                    "required": [
                      "jsonrpc",
                      "method"
                    ],
                    "properties": {
                      "jsonrpc": {
                        "const": "2.0"
                      },
                      "id": {
                        "type": [
                          "integer",
                          "string"
                        ]
                      },
                      "method": {
                        "enum": [
                          "initialize",
                          "ping",
                          "tools/list",
                          "resources/list",
                          "resources/read",
                          "notifications/initialized"
                        ]
                      },
                      "params": {
                        "type": "object"
                      }
                    },
                    "description": "Initialize with protocolVersion, clientInfo and capabilities. resources/read requires uri. Notifications omit id."
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC result or protocol error; tool failures can use result.isError.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "headers": {
              "RateLimit-Policy": {
                "description": "IETF structured quota policy (draft-ietf-httpapi-ratelimit-headers-11): q is the request allowance and w the window in seconds. The reported policy is the currently tightest applicable budget.",
                "schema": {
                  "type": "string"
                },
                "example": "\"myopl\";q=20;w=60"
              },
              "RateLimit": {
                "description": "IETF structured current quota: r requests remaining and t seconds until reset. Advisory; Retry-After controls a 429 retry. No account, address or token identifiers are included.",
                "schema": {
                  "type": "string"
                },
                "example": "\"myopl\";r=19;t=60"
              },
              "X-RateLimit-Reset": {
                "description": "Compatibility field: Unix timestamp when the reported quota resets.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "202": {
            "description": "Notification accepted; no body.",
            "headers": {
              "RateLimit-Policy": {
                "description": "IETF structured quota policy (draft-ietf-httpapi-ratelimit-headers-11): q is the request allowance and w the window in seconds. The reported policy is the currently tightest applicable budget.",
                "schema": {
                  "type": "string"
                },
                "example": "\"myopl\";q=20;w=60"
              },
              "RateLimit": {
                "description": "IETF structured current quota: r requests remaining and t seconds until reset. Advisory; Retry-After controls a 429 retry. No account, address or token identifiers are included.",
                "schema": {
                  "type": "string"
                },
                "example": "\"myopl\";r=19;t=60"
              },
              "X-RateLimit-Reset": {
                "description": "Compatibility field: Unix timestamp when the reported quota resets.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "description": "Invalid transport request or unsupported protocol version.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "headers": {
              "RateLimit-Policy": {
                "description": "IETF structured quota policy (draft-ietf-httpapi-ratelimit-headers-11): q is the request allowance and w the window in seconds. The reported policy is the currently tightest applicable budget.",
                "schema": {
                  "type": "string"
                },
                "example": "\"myopl\";q=20;w=60"
              },
              "RateLimit": {
                "description": "IETF structured current quota: r requests remaining and t seconds until reset. Advisory; Retry-After controls a 429 retry. No account, address or token identifiers are included.",
                "schema": {
                  "type": "string"
                },
                "example": "\"myopl\";r=19;t=60"
              },
              "X-RateLimit-Reset": {
                "description": "Compatibility field: Unix timestamp when the reported quota resets.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "401": {
            "description": "Missing, expired or invalid OAuth access; use the advertised resource metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Policy": {
                "description": "IETF structured quota policy (draft-ietf-httpapi-ratelimit-headers-11): q is the request allowance and w the window in seconds. The reported policy is the currently tightest applicable budget.",
                "schema": {
                  "type": "string"
                },
                "example": "\"myopl\";q=20;w=60"
              },
              "RateLimit": {
                "description": "IETF structured current quota: r requests remaining and t seconds until reset. Advisory; Retry-After controls a 429 retry. No account, address or token identifiers are included.",
                "schema": {
                  "type": "string"
                },
                "example": "\"myopl\";r=19;t=60"
              },
              "X-RateLimit-Reset": {
                "description": "Compatibility field: Unix timestamp when the reported quota resets.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope or unavailable access.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Policy": {
                "description": "IETF structured quota policy (draft-ietf-httpapi-ratelimit-headers-11): q is the request allowance and w the window in seconds. The reported policy is the currently tightest applicable budget.",
                "schema": {
                  "type": "string"
                },
                "example": "\"myopl\";q=20;w=60"
              },
              "RateLimit": {
                "description": "IETF structured current quota: r requests remaining and t seconds until reset. Advisory; Retry-After controls a 429 retry. No account, address or token identifiers are included.",
                "schema": {
                  "type": "string"
                },
                "example": "\"myopl\";r=19;t=60"
              },
              "X-RateLimit-Reset": {
                "description": "Compatibility field: Unix timestamp when the reported quota resets.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "405": {
            "description": "Use POST.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "headers": {
              "RateLimit-Policy": {
                "description": "IETF structured quota policy (draft-ietf-httpapi-ratelimit-headers-11): q is the request allowance and w the window in seconds. The reported policy is the currently tightest applicable budget.",
                "schema": {
                  "type": "string"
                },
                "example": "\"myopl\";q=20;w=60"
              },
              "RateLimit": {
                "description": "IETF structured current quota: r requests remaining and t seconds until reset. Advisory; Retry-After controls a 429 retry. No account, address or token identifiers are included.",
                "schema": {
                  "type": "string"
                },
                "example": "\"myopl\";r=19;t=60"
              },
              "X-RateLimit-Reset": {
                "description": "Compatibility field: Unix timestamp when the reported quota resets.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "406": {
            "description": "Accept application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "headers": {
              "RateLimit-Policy": {
                "description": "IETF structured quota policy (draft-ietf-httpapi-ratelimit-headers-11): q is the request allowance and w the window in seconds. The reported policy is the currently tightest applicable budget.",
                "schema": {
                  "type": "string"
                },
                "example": "\"myopl\";q=20;w=60"
              },
              "RateLimit": {
                "description": "IETF structured current quota: r requests remaining and t seconds until reset. Advisory; Retry-After controls a 429 retry. No account, address or token identifiers are included.",
                "schema": {
                  "type": "string"
                },
                "example": "\"myopl\";r=19;t=60"
              },
              "X-RateLimit-Reset": {
                "description": "Compatibility field: Unix timestamp when the reported quota resets.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "413": {
            "description": "Request exceeds 16384 bytes.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "headers": {
              "RateLimit-Policy": {
                "description": "IETF structured quota policy (draft-ietf-httpapi-ratelimit-headers-11): q is the request allowance and w the window in seconds. The reported policy is the currently tightest applicable budget.",
                "schema": {
                  "type": "string"
                },
                "example": "\"myopl\";q=20;w=60"
              },
              "RateLimit": {
                "description": "IETF structured current quota: r requests remaining and t seconds until reset. Advisory; Retry-After controls a 429 retry. No account, address or token identifiers are included.",
                "schema": {
                  "type": "string"
                },
                "example": "\"myopl\";r=19;t=60"
              },
              "X-RateLimit-Reset": {
                "description": "Compatibility field: Unix timestamp when the reported quota resets.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "415": {
            "description": "Use application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "headers": {
              "RateLimit-Policy": {
                "description": "IETF structured quota policy (draft-ietf-httpapi-ratelimit-headers-11): q is the request allowance and w the window in seconds. The reported policy is the currently tightest applicable budget.",
                "schema": {
                  "type": "string"
                },
                "example": "\"myopl\";q=20;w=60"
              },
              "RateLimit": {
                "description": "IETF structured current quota: r requests remaining and t seconds until reset. Advisory; Retry-After controls a 429 retry. No account, address or token identifiers are included.",
                "schema": {
                  "type": "string"
                },
                "example": "\"myopl\";r=19;t=60"
              },
              "X-RateLimit-Reset": {
                "description": "Compatibility field: Unix timestamp when the reported quota resets.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "description": "Temporary request limit; retry after the Retry-After seconds without disconnecting.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              "RateLimit-Policy": {
                "description": "IETF structured quota policy (draft-ietf-httpapi-ratelimit-headers-11): q is the request allowance and w the window in seconds. The reported policy is the currently tightest applicable budget.",
                "schema": {
                  "type": "string"
                },
                "example": "\"myopl\";q=20;w=60"
              },
              "RateLimit": {
                "description": "IETF structured current quota: r requests remaining and t seconds until reset. Advisory; Retry-After controls a 429 retry. No account, address or token identifiers are included.",
                "schema": {
                  "type": "string"
                },
                "example": "\"myopl\";r=19;t=60"
              },
              "X-RateLimit-Reset": {
                "description": "Compatibility field: Unix timestamp when the reported quota resets.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "prepare_pickleball_browseArguments": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "location": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "language": {
            "type": "string",
            "enum": [
              "en",
              "es"
            ],
            "default": "en"
          },
          "category": {
            "type": "string",
            "enum": [
              "courts",
              "clubs",
              "sessions",
              "leaderboards"
            ]
          }
        },
        "required": [
          "location"
        ],
        "description": "No category default is applied. Omitting category returns choice_required. The trimmed location must be a named city, state or country; unsupported punctuation is rejected."
      },
      "search_pickleball_rulesArguments": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "query": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1000
          },
          "language": {
            "type": "string",
            "enum": [
              "en",
              "es"
            ],
            "default": "en"
          }
        },
        "required": [
          "query"
        ],
        "description": "The live tool advertises en and es. Use en: es currently produces an isError tool response because the evidence is English."
      },
      "search_myopl_helpArguments": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "query": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1000
          },
          "language": {
            "type": "string",
            "enum": [
              "en",
              "es"
            ],
            "default": "en"
          }
        },
        "required": [
          "query"
        ]
      },
      "search_myopl_websiteArguments": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "query": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1000
          },
          "language": {
            "type": "string",
            "enum": [
              "en",
              "es"
            ],
            "default": "en"
          }
        },
        "required": [
          "query"
        ]
      },
      "get_public_player_ratingArguments": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "username": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_.-]{1,64}$",
            "maxLength": 64
          }
        },
        "required": [
          "username"
        ]
      },
      "PlayerRating": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "found": {
                "const": false
              },
              "spoken_reply": {
                "type": "string"
              },
              "source": {
                "const": "MYOPL"
              },
              "source_url": {
                "type": "string",
                "format": "uri"
              },
              "retrieved_at": {
                "type": "string",
                "format": "date-time",
                "description": "UTC retrieval timestamp when supplied by the card-capable server."
              }
            },
            "required": [
              "found",
              "spoken_reply",
              "source",
              "source_url"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "found": {
                "const": true
              },
              "username": {
                "type": "string"
              },
              "sport": {
                "const": "pickleball"
              },
              "singles_opl": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Published decimal string or null; do not estimate a missing rating."
              },
              "doubles_opl": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "guidance": {
                "type": "string"
              },
              "spoken_reply": {
                "type": "string"
              },
              "source": {
                "const": "MYOPL"
              },
              "source_url": {
                "type": "string",
                "format": "uri"
              },
              "retrieved_at": {
                "type": "string",
                "format": "date-time",
                "description": "UTC retrieval timestamp when supplied by the card-capable server."
              },
              "singles": {
                "$ref": "#/components/schemas/PublicRatingSummary"
              },
              "doubles": {
                "$ref": "#/components/schemas/PublicRatingSummary"
              },
              "messenger_url": {
                "type": "string",
                "format": "uri"
              }
            },
            "required": [
              "found",
              "username",
              "sport",
              "singles_opl",
              "doubles_opl",
              "guidance",
              "spoken_reply",
              "source",
              "source_url",
              "singles",
              "doubles",
              "messenger_url"
            ],
            "additionalProperties": false
          }
        ]
      },
      "BrowseChoices": {
        "type": "object",
        "properties": {
          "version": {
            "const": 1
          },
          "location": {
            "type": "string"
          },
          "language": {
            "type": "string",
            "enum": [
              "en",
              "es"
            ]
          },
          "sport": {
            "const": "pickleball"
          },
          "spoken_reply": {
            "type": "string"
          },
          "choices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "enum": [
                    "courts",
                    "clubs",
                    "sessions"
                  ]
                },
                "label": {
                  "type": "string"
                },
                "browse_section": {
                  "enum": [
                    "courts",
                    "clubs",
                    "opls"
                  ]
                }
              },
              "required": [
                "id",
                "label",
                "browse_section"
              ],
              "additionalProperties": false
            },
            "minItems": 3,
            "maxItems": 3
          },
          "status": {
            "enum": [
              "choice_required",
              "results",
              "no_results"
            ]
          },
          "guidance": {
            "type": "string"
          },
          "selection": {
            "type": "object",
            "properties": {
              "category": {
                "enum": [
                  "courts",
                  "clubs",
                  "sessions",
                  "leaderboards"
                ]
              },
              "browse_section": {
                "enum": [
                  "courts",
                  "clubs",
                  "opls"
                ]
              },
              "query": {
                "type": "string"
              },
              "sport": {
                "const": "pickleball"
              }
            },
            "required": [
              "category",
              "browse_section",
              "query",
              "sport"
            ],
            "additionalProperties": false
          },
          "source": {
            "const": "MYOPL"
          },
          "source_url": {
            "type": "string",
            "format": "uri"
          },
          "results": {
            "type": "array",
            "maxItems": 5,
            "items": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "entity_type": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sport_type": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "slug": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "city": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "region": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "country": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "access": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "surface": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "nets": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "court_count": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": 0
                },
                "indoor_courts": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": 0
                },
                "outdoor_courts": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": 0
                },
                "amenities": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "type": "string"
                  }
                },
                "public_url": {
                  "type": "string",
                  "format": "uri"
                },
                "source": {
                  "const": "MYOPL"
                },
                "location": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "city": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "region": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "country": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "public_url": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uri"
                    }
                  }
                },
                "locations": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "city": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "region": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "country": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "public_url": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "uri"
                      }
                    }
                  }
                },
                "leaderboard_url": {
                  "type": "null"
                },
                "leaderboard_status": {
                  "const": "not_published"
                },
                "session_availability_checked": {
                  "const": false
                }
              }
            }
          },
          "has_more": {
            "type": "boolean"
          }
        },
        "required": [
          "version",
          "location",
          "language",
          "sport",
          "spoken_reply",
          "choices",
          "status",
          "guidance",
          "source",
          "source_url"
        ],
        "additionalProperties": false
      },
      "RuleEvidence": {
        "type": "object",
        "properties": {
          "rule": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "text": {
            "type": "string",
            "maxLength": 4000
          },
          "truncated": {
            "type": "boolean"
          },
          "authority": {
            "type": "string"
          },
          "rule_number": {
            "type": "string"
          },
          "official_text": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 4000,
            "description": "Verbatim excerpt, or null if redaction was necessary. Read truncated before treating this as complete."
          },
          "canonical_url": {
            "type": "string",
            "format": "uri"
          },
          "canonical_url_type": {
            "const": "rulebook_guide"
          }
        },
        "required": [
          "rule",
          "title",
          "text",
          "truncated",
          "authority",
          "rule_number",
          "official_text",
          "canonical_url",
          "canonical_url_type"
        ],
        "additionalProperties": false
      },
      "RulesSearch": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string"
          },
          "governing_body": {
            "type": "string"
          },
          "edition": {
            "type": "string"
          },
          "language": {
            "type": "string"
          },
          "source_url": {
            "type": "string",
            "format": "uri"
          },
          "myopl_url": {
            "type": "string",
            "format": "uri"
          },
          "evidence": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RuleEvidence"
            },
            "maxItems": 5
          },
          "clarification": {
            "type": [
              "string",
              "null"
            ]
          },
          "guidance": {
            "type": "string"
          },
          "answer": {
            "type": "string",
            "description": "Present when the server resolver is enabled. Preserve qualifications and requests for clarification."
          },
          "spoken_reply": {
            "type": "string"
          }
        },
        "required": [
          "source",
          "governing_body",
          "edition",
          "language",
          "source_url",
          "myopl_url",
          "evidence",
          "clarification",
          "guidance"
        ],
        "additionalProperties": false
      },
      "DocumentSearch": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string"
          },
          "results": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string",
                  "format": "uri"
                },
                "title": {
                  "type": "string"
                },
                "language": {
                  "type": "string",
                  "enum": [
                    "en",
                    "es"
                  ]
                },
                "excerpt": {
                  "type": "string",
                  "maxLength": 1800
                },
                "truncated": {
                  "type": "boolean"
                }
              },
              "required": [
                "url",
                "title",
                "language",
                "excerpt",
                "truncated"
              ],
              "additionalProperties": false
            },
            "maxItems": 5
          },
          "clarification": {
            "type": [
              "string",
              "null"
            ]
          },
          "guidance": {
            "type": "string"
          },
          "myopl_url": {
            "type": "string",
            "format": "uri"
          }
        },
        "required": [
          "source",
          "results",
          "clarification",
          "guidance"
        ],
        "additionalProperties": false
      },
      "TextContent": {
        "type": "object",
        "properties": {
          "type": {
            "const": "text"
          },
          "text": {
            "type": "string"
          }
        },
        "required": [
          "type",
          "text"
        ],
        "additionalProperties": false
      },
      "BrowseChoicesResult": {
        "type": "object",
        "properties": {
          "content": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TextContent"
            },
            "minItems": 1
          },
          "structuredContent": {
            "$ref": "#/components/schemas/BrowseChoices"
          },
          "isError": {
            "const": false
          }
        },
        "required": [
          "content",
          "structuredContent",
          "isError"
        ],
        "additionalProperties": false
      },
      "DocumentSearchResult": {
        "type": "object",
        "properties": {
          "content": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TextContent"
            },
            "minItems": 1
          },
          "structuredContent": {
            "$ref": "#/components/schemas/DocumentSearch"
          },
          "isError": {
            "const": false
          }
        },
        "required": [
          "content",
          "structuredContent",
          "isError"
        ],
        "additionalProperties": false
      },
      "PlayerRatingResult": {
        "type": "object",
        "properties": {
          "content": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TextContent"
            },
            "minItems": 1
          },
          "structuredContent": {
            "$ref": "#/components/schemas/PlayerRating"
          },
          "isError": {
            "const": false
          }
        },
        "required": [
          "content",
          "structuredContent",
          "isError"
        ],
        "additionalProperties": false
      },
      "RulesSearchResult": {
        "type": "object",
        "properties": {
          "content": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TextContent"
            },
            "minItems": 1
          },
          "structuredContent": {
            "$ref": "#/components/schemas/RulesSearch"
          },
          "isError": {
            "const": false
          }
        },
        "required": [
          "content",
          "structuredContent",
          "isError"
        ],
        "additionalProperties": false
      },
      "ToolErrorResult": {
        "type": "object",
        "properties": {
          "content": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TextContent"
            },
            "minItems": 1
          },
          "structuredContent": {
            "type": "object",
            "properties": {
              "error": {
                "type": "string"
              }
            },
            "required": [
              "error"
            ],
            "additionalProperties": false
          },
          "isError": {
            "const": true
          }
        },
        "required": [
          "content",
          "structuredContent",
          "isError"
        ],
        "additionalProperties": false
      },
      "InitializeResult": {
        "type": "object",
        "properties": {
          "protocolVersion": {
            "const": "2025-11-25"
          },
          "capabilities": {
            "type": "object",
            "properties": {
              "tools": {
                "type": "object",
                "properties": {
                  "listChanged": {
                    "const": false
                  }
                },
                "required": [
                  "listChanged"
                ],
                "additionalProperties": false
              },
              "resources": {
                "type": "object",
                "properties": {
                  "subscribe": {
                    "const": false
                  },
                  "listChanged": {
                    "const": false
                  }
                },
                "required": [
                  "subscribe",
                  "listChanged"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "tools"
            ],
            "additionalProperties": false
          },
          "serverInfo": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "version": {
                "type": "string"
              }
            },
            "required": [
              "name",
              "version"
            ],
            "additionalProperties": false
          },
          "instructions": {
            "type": "string"
          }
        },
        "required": [
          "protocolVersion",
          "capabilities",
          "serverInfo",
          "instructions"
        ],
        "additionalProperties": false
      },
      "ToolDefinition": {
        "type": "object",
        "properties": {
          "name": {
            "enum": [
              "prepare_pickleball_browse",
              "search_pickleball_rules",
              "search_myopl_help",
              "search_myopl_website",
              "get_public_player_rating"
            ]
          },
          "description": {
            "type": "string"
          },
          "inputSchema": {
            "type": "object",
            "additionalProperties": true
          },
          "annotations": {
            "type": "object",
            "properties": {
              "readOnlyHint": {
                "const": true
              },
              "destructiveHint": {
                "const": false
              },
              "idempotentHint": {
                "const": true
              },
              "openWorldHint": {
                "const": true
              }
            },
            "required": [
              "readOnlyHint",
              "destructiveHint",
              "idempotentHint",
              "openWorldHint"
            ],
            "additionalProperties": false
          },
          "_meta": {
            "type": "object",
            "additionalProperties": true,
            "description": "MCP Apps resource selection and noauth client metadata."
          },
          "title": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "description",
          "inputSchema",
          "annotations"
        ],
        "additionalProperties": false
      },
      "ToolsListResult": {
        "type": "object",
        "properties": {
          "tools": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ToolDefinition"
            }
          }
        },
        "required": [
          "tools"
        ],
        "additionalProperties": false
      },
      "InitializeRequest": {
        "type": "object",
        "properties": {
          "jsonrpc": {
            "const": "2.0"
          },
          "id": {
            "type": [
              "string",
              "integer"
            ]
          },
          "method": {
            "const": "initialize"
          },
          "params": {
            "type": "object",
            "properties": {
              "protocolVersion": {
                "type": "string"
              },
              "capabilities": {
                "type": "object"
              },
              "clientInfo": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "version": {
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "version"
                ],
                "additionalProperties": true
              }
            },
            "required": [
              "protocolVersion",
              "capabilities",
              "clientInfo"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "jsonrpc",
          "id",
          "method",
          "params"
        ],
        "additionalProperties": false
      },
      "PingRequest": {
        "type": "object",
        "properties": {
          "jsonrpc": {
            "const": "2.0"
          },
          "id": {
            "type": [
              "string",
              "integer"
            ]
          },
          "method": {
            "const": "ping"
          },
          "params": {
            "type": "object",
            "properties": {},
            "required": [],
            "additionalProperties": false
          }
        },
        "required": [
          "jsonrpc",
          "id",
          "method"
        ],
        "additionalProperties": false
      },
      "ToolsListRequest": {
        "type": "object",
        "properties": {
          "jsonrpc": {
            "const": "2.0"
          },
          "id": {
            "type": [
              "string",
              "integer"
            ]
          },
          "method": {
            "const": "tools/list"
          },
          "params": {
            "type": "object",
            "properties": {},
            "required": [],
            "additionalProperties": false
          }
        },
        "required": [
          "jsonrpc",
          "id",
          "method"
        ],
        "additionalProperties": false
      },
      "prepare_pickleball_browseRequest": {
        "type": "object",
        "properties": {
          "jsonrpc": {
            "const": "2.0"
          },
          "id": {
            "type": [
              "string",
              "integer"
            ]
          },
          "method": {
            "const": "tools/call"
          },
          "params": {
            "type": "object",
            "properties": {
              "name": {
                "const": "prepare_pickleball_browse"
              },
              "arguments": {
                "$ref": "#/components/schemas/prepare_pickleball_browseArguments"
              }
            },
            "required": [
              "name",
              "arguments"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "jsonrpc",
          "id",
          "method",
          "params"
        ],
        "additionalProperties": false
      },
      "search_pickleball_rulesRequest": {
        "type": "object",
        "properties": {
          "jsonrpc": {
            "const": "2.0"
          },
          "id": {
            "type": [
              "string",
              "integer"
            ]
          },
          "method": {
            "const": "tools/call"
          },
          "params": {
            "type": "object",
            "properties": {
              "name": {
                "const": "search_pickleball_rules"
              },
              "arguments": {
                "$ref": "#/components/schemas/search_pickleball_rulesArguments"
              }
            },
            "required": [
              "name",
              "arguments"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "jsonrpc",
          "id",
          "method",
          "params"
        ],
        "additionalProperties": false
      },
      "search_myopl_helpRequest": {
        "type": "object",
        "properties": {
          "jsonrpc": {
            "const": "2.0"
          },
          "id": {
            "type": [
              "string",
              "integer"
            ]
          },
          "method": {
            "const": "tools/call"
          },
          "params": {
            "type": "object",
            "properties": {
              "name": {
                "const": "search_myopl_help"
              },
              "arguments": {
                "$ref": "#/components/schemas/search_myopl_helpArguments"
              }
            },
            "required": [
              "name",
              "arguments"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "jsonrpc",
          "id",
          "method",
          "params"
        ],
        "additionalProperties": false
      },
      "search_myopl_websiteRequest": {
        "type": "object",
        "properties": {
          "jsonrpc": {
            "const": "2.0"
          },
          "id": {
            "type": [
              "string",
              "integer"
            ]
          },
          "method": {
            "const": "tools/call"
          },
          "params": {
            "type": "object",
            "properties": {
              "name": {
                "const": "search_myopl_website"
              },
              "arguments": {
                "$ref": "#/components/schemas/search_myopl_websiteArguments"
              }
            },
            "required": [
              "name",
              "arguments"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "jsonrpc",
          "id",
          "method",
          "params"
        ],
        "additionalProperties": false
      },
      "get_public_player_ratingRequest": {
        "type": "object",
        "properties": {
          "jsonrpc": {
            "const": "2.0"
          },
          "id": {
            "type": [
              "string",
              "integer"
            ]
          },
          "method": {
            "const": "tools/call"
          },
          "params": {
            "type": "object",
            "properties": {
              "name": {
                "const": "get_public_player_rating"
              },
              "arguments": {
                "$ref": "#/components/schemas/get_public_player_ratingArguments"
              }
            },
            "required": [
              "name",
              "arguments"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "jsonrpc",
          "id",
          "method",
          "params"
        ],
        "additionalProperties": false
      },
      "InitializedNotification": {
        "type": "object",
        "properties": {
          "jsonrpc": {
            "const": "2.0"
          },
          "method": {
            "const": "notifications/initialized"
          },
          "params": {
            "type": "object",
            "properties": {},
            "required": [],
            "additionalProperties": false
          }
        },
        "required": [
          "jsonrpc",
          "method"
        ],
        "additionalProperties": false
      },
      "McpRequest": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/InitializeRequest"
          },
          {
            "$ref": "#/components/schemas/PingRequest"
          },
          {
            "$ref": "#/components/schemas/ToolsListRequest"
          },
          {
            "$ref": "#/components/schemas/prepare_pickleball_browseRequest"
          },
          {
            "$ref": "#/components/schemas/search_pickleball_rulesRequest"
          },
          {
            "$ref": "#/components/schemas/search_myopl_helpRequest"
          },
          {
            "$ref": "#/components/schemas/search_myopl_websiteRequest"
          },
          {
            "$ref": "#/components/schemas/get_public_player_ratingRequest"
          },
          {
            "$ref": "#/components/schemas/InitializedNotification"
          },
          {
            "$ref": "#/components/schemas/ResourcesListRequest"
          },
          {
            "$ref": "#/components/schemas/ResourcesReadRequest"
          }
        ]
      },
      "JsonRpcSuccess": {
        "type": "object",
        "properties": {
          "jsonrpc": {
            "const": "2.0"
          },
          "id": {
            "type": [
              "string",
              "integer"
            ]
          },
          "result": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/InitializeResult"
              },
              {
                "$ref": "#/components/schemas/ToolsListResult"
              },
              {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              },
              {
                "$ref": "#/components/schemas/BrowseChoicesResult"
              },
              {
                "$ref": "#/components/schemas/DocumentSearchResult"
              },
              {
                "$ref": "#/components/schemas/PlayerRatingResult"
              },
              {
                "$ref": "#/components/schemas/RulesSearchResult"
              },
              {
                "$ref": "#/components/schemas/ToolErrorResult"
              },
              {
                "$ref": "#/components/schemas/ResourcesListResult"
              },
              {
                "$ref": "#/components/schemas/ResourcesReadResult"
              }
            ]
          }
        },
        "required": [
          "jsonrpc",
          "id",
          "result"
        ],
        "additionalProperties": false
      },
      "JsonRpcError": {
        "type": "object",
        "properties": {
          "jsonrpc": {
            "const": "2.0"
          },
          "id": {
            "type": [
              "string",
              "integer",
              "null"
            ]
          },
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "integer"
              },
              "message": {
                "type": "string"
              },
              "data": {
                "description": "Optional structured error or retry details."
              }
            },
            "required": [
              "code",
              "message"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "jsonrpc",
          "id",
          "error"
        ],
        "additionalProperties": false
      },
      "McpResponse": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/JsonRpcSuccess"
          },
          {
            "$ref": "#/components/schemas/JsonRpcError"
          }
        ]
      },
      "HttpError": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          }
        },
        "required": [
          "error"
        ],
        "additionalProperties": false
      },
      "PublicRatingSummary": {
        "type": "object",
        "properties": {
          "rating": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "enum": [
              "rated",
              "unrated"
            ]
          },
          "reliability_score": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "maximum": 100
          },
          "games_played": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0
          },
          "games_won": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0
          },
          "games_lost": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0
          },
          "points_won": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0
          },
          "points_lost": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0
          }
        },
        "additionalProperties": false,
        "required": [
          "rating",
          "status",
          "reliability_score",
          "games_played",
          "games_won",
          "games_lost",
          "points_won",
          "points_lost"
        ],
        "description": "Public rating-card totals. Null means unavailable, never zero. Games are not matches."
      },
      "ResourcesListRequest": {
        "type": "object",
        "properties": {
          "jsonrpc": {
            "const": "2.0"
          },
          "id": {
            "type": [
              "string",
              "integer"
            ]
          },
          "method": {
            "const": "resources/list"
          },
          "params": {
            "type": "object",
            "properties": {},
            "required": [],
            "additionalProperties": false
          }
        },
        "required": [
          "jsonrpc",
          "id",
          "method"
        ],
        "additionalProperties": false
      },
      "ResourcesReadRequest": {
        "type": "object",
        "properties": {
          "jsonrpc": {
            "const": "2.0"
          },
          "id": {
            "type": [
              "string",
              "integer"
            ]
          },
          "method": {
            "const": "resources/read"
          },
          "params": {
            "type": "object",
            "properties": {
              "uri": {
                "const": "ui://myopl/public-rating-v1.html"
              }
            },
            "required": [
              "uri"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "jsonrpc",
          "id",
          "method",
          "params"
        ],
        "additionalProperties": false
      },
      "ResourceDescription": {
        "type": "object",
        "properties": {
          "uri": {
            "const": "ui://myopl/public-rating-v1.html"
          },
          "name": {
            "type": "string"
          },
          "mimeType": {
            "const": "text/html;profile=mcp-app"
          }
        },
        "required": [
          "uri",
          "name",
          "mimeType"
        ],
        "additionalProperties": false
      },
      "ResourcesListResult": {
        "type": "object",
        "properties": {
          "resources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ResourceDescription"
            }
          }
        },
        "required": [
          "resources"
        ],
        "additionalProperties": false
      },
      "ResourceContent": {
        "type": "object",
        "properties": {
          "uri": {
            "const": "ui://myopl/public-rating-v1.html"
          },
          "name": {
            "type": "string"
          },
          "mimeType": {
            "const": "text/html;profile=mcp-app"
          },
          "text": {
            "type": "string"
          },
          "_meta": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "required": [
          "uri",
          "name",
          "mimeType",
          "text"
        ],
        "additionalProperties": false
      },
      "ResourcesReadResult": {
        "type": "object",
        "properties": {
          "contents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ResourceContent"
            }
          }
        },
        "required": [
          "contents"
        ],
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "myoplOAuth": {
        "type": "oauth2",
        "description": "Authorization code with PKCE S256; discover current registration and renewal behavior from authorization-server metadata.",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://api.myopl.net/oauth/authorize",
            "tokenUrl": "https://api.myopl.net/oauth/token",
            "refreshUrl": "https://api.myopl.net/oauth/token",
            "scopes": {
              "myopl:rating:read": "Read the consenting player published OPL ratings",
              "myopl:sessions:read": "Find the consenting player league sessions",
              "myopl:rsvp:write": "Prepare RSVP for explicit confirmation in MYOPL; does not submit attendance",
              "myopl:statistics:read": "Read own statistics cards without a paid upgrade"
            }
          }
        }
      }
    }
  },
  "x-mcp-protocol-version": "2025-11-25",
  "x-mcp-compatibility-endpoints": [
    "https://pickleball.myopl.net/api/v1/public/mcp"
  ],
  "x-mcp-tools": [
    {
      "name": "prepare_pickleball_browse",
      "description": "Choose courts, clubs, open play or leaderboard guidance for a named location. Returns up to five real public directory listings when a category is selected. Public standings and live session availability are not supplied; no joining or booking.",
      "inputSchema": {
        "$ref": "#/components/schemas/prepare_pickleball_browseArguments"
      },
      "outputSchema": {
        "$ref": "#/components/schemas/BrowseChoices"
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "search_pickleball_rules",
      "description": "Search the validated official 2026 USA Pickleball Rulebook, used by MYOPL under an official licensing agreement with USA Pickleball. Returns English evidence, edition and rule citations, plus a grounded answer when the private resolver is enabled. Preserve requests for clarification; excerpts alone do not establish a complete ruling. No package download.",
      "inputSchema": {
        "$ref": "#/components/schemas/search_pickleball_rulesArguments"
      },
      "outputSchema": {
        "$ref": "#/components/schemas/RulesSearch"
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "search_myopl_help",
      "description": "Find published MYOPL Help Center instructions with source URLs. No account or conversation access.",
      "inputSchema": {
        "$ref": "#/components/schemas/search_myopl_helpArguments"
      },
      "outputSchema": {
        "$ref": "#/components/schemas/DocumentSearch"
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "search_myopl_website",
      "description": "Find published MYOPL product and website information with source URLs. No account or conversation access.",
      "inputSchema": {
        "$ref": "#/components/schemas/search_myopl_websiteArguments"
      },
      "outputSchema": {
        "$ref": "#/components/schemas/DocumentSearch"
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "get_public_player_rating",
      "description": "Look up an exact public username, published OPL ratings, Reliability Score, games played/won/lost and points won/lost. Includes MYOPL citations and the player Messenger invitation link. No contact details or individual match history.",
      "inputSchema": {
        "$ref": "#/components/schemas/get_public_player_ratingArguments"
      },
      "outputSchema": {
        "$ref": "#/components/schemas/PlayerRating"
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      }
    }
  ],
  "x-personal-mcp-tools": [
    {
      "name": "get_my_rating",
      "scopes": [
        "myopl:rating:read"
      ],
      "inputSchema": {
        "type": "object",
        "properties": {},
        "required": [],
        "additionalProperties": false
      }
    },
    {
      "name": "get_my_next_session",
      "scopes": [
        "myopl:sessions:read"
      ],
      "inputSchema": {
        "type": "object",
        "properties": {
          "league": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,150}$"
          }
        },
        "required": [
          "league"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "prepare_my_rsvp",
      "scopes": [
        "myopl:rsvp:write"
      ],
      "inputSchema": {
        "type": "object",
        "properties": {
          "league": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,150}$"
          },
          "response": {
            "type": "string",
            "enum": [
              "yes",
              "maybe",
              "no"
            ]
          }
        },
        "required": [
          "league",
          "response"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "get_my_action_status",
      "scopes": [
        "myopl:rsvp:write"
      ],
      "inputSchema": {
        "type": "object",
        "properties": {
          "action_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9]{64}$"
          }
        },
        "required": [
          "action_id"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "get_my_statistics_card",
      "scopes": [
        "myopl:statistics:read"
      ],
      "inputSchema": {
        "type": "object",
        "properties": {},
        "required": [],
        "additionalProperties": false
      }
    }
  ],
  "x-versioning-policy": "https://myopl.net/ai/integration.md#api-versioning-and-deprecation-policy"
}
