{"openapi":"3.1.0","info":{"title":"PythonAnywhere (BYOK) API","version":"0.1.0","description":"PythonAnywhere (BYOK) lets an AI assistant read your own PythonAnywhere data through the PythonAnywhere API with a key you supply (PythonAnywhere API token (US accounts)). Read-only: 12 tools (get_cpu_usage, list_websites, get_website, list_webapps, get_webapp, get_webapp_ssl, list_static_files, list_static_headers, list_scheduled_tasks, list_always_on_tasks, list_consoles,...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-pythonanywhere.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-pythonanywhere/docs"},"termsOfService":"https://connectorbay.com/byok-pythonanywhere/terms"},"servers":[{"url":"https://byok-pythonanywhere.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-pythonanywhere/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/get_cpu_usage":{"post":{"operationId":"get_cpu_usage","summary":"Show your daily CPU quota in seconds, how much you have used today and when the quota resets. Use for \"How much of my Py","description":"Show your daily CPU quota in seconds, how much you have used today and when the quota resets. Use for \"How much of my PythonAnywhere CPU quota have I used today\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"username":{"description":"Your PythonAnywhere username, for example 'alice'.","maxLength":200,"title":"Username","type":"string"}},"required":["username"],"title":"get_cpu_usageArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_websites":{"post":{"operationId":"list_websites","summary":"List your websites (domains with their web app): id, domain, enabled flag, web app command and log file paths. Use for \"","description":"List your websites (domains with their web app): id, domain, enabled flag, web app command and log file paths. Use for \"Which websites do I host on PythonAnywhere\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"username":{"description":"Your PythonAnywhere username, for example 'alice'.","maxLength":200,"title":"Username","type":"string"}},"required":["username"],"title":"list_websitesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_website":{"post":{"operationId":"get_website","summary":"Get one website: its domain, enabled flag, web app command and log file paths. Use for \"Is the website alice.pythonanywh","description":"Get one website: its domain, enabled flag, web app command and log file paths. Use for \"Is the website alice.pythonanywhere.com enabled\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"username":{"description":"Your PythonAnywhere username, for example 'alice'.","maxLength":200,"title":"Username","type":"string"},"domain_name":{"description":"Domain name of one of your web apps, for example 'alice.pythonanywhere.com'.","maxLength":200,"title":"Domain Name","type":"string"}},"required":["username","domain_name"],"title":"get_websiteArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_webapps":{"post":{"operationId":"list_webapps","summary":"List your manually configured web apps with their configuration (the API returns the full records). Use for \"List my Pyt","description":"List your manually configured web apps with their configuration (the API returns the full records). Use for \"List my PythonAnywhere web apps\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"username":{"description":"Your PythonAnywhere username, for example 'alice'.","maxLength":200,"title":"Username","type":"string"}},"required":["username"],"title":"list_webappsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_webapp":{"post":{"operationId":"get_webapp","summary":"Get the configuration of one web app: Python version, source directory, virtualenv and HTTPS settings. Use for \"What Pyt","description":"Get the configuration of one web app: Python version, source directory, virtualenv and HTTPS settings. Use for \"What Python version does my web app alice.pythonanywhere.com use\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"username":{"description":"Your PythonAnywhere username, for example 'alice'.","maxLength":200,"title":"Username","type":"string"},"domain_name":{"description":"Domain name of one of your web apps, for example 'alice.pythonanywhere.com'.","maxLength":200,"title":"Domain Name","type":"string"}},"required":["username","domain_name"],"title":"get_webappArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_webapp_ssl":{"post":{"operationId":"get_webapp_ssl","summary":"Get the HTTPS certificate details of a web app (the documented GET of the TLS endpoint). Use for \"When does the certific","description":"Get the HTTPS certificate details of a web app (the documented GET of the TLS endpoint). Use for \"When does the certificate of alice.pythonanywhere.com expire\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"username":{"description":"Your PythonAnywhere username, for example 'alice'.","maxLength":200,"title":"Username","type":"string"},"domain_name":{"description":"Domain name of one of your web apps, for example 'alice.pythonanywhere.com'.","maxLength":200,"title":"Domain Name","type":"string"}},"required":["username","domain_name"],"title":"get_webapp_sslArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_static_files":{"post":{"operationId":"list_static_files","summary":"List the static file mappings (URL to directory) configured for a web app. Use for \"Which static files mappings does ali","description":"List the static file mappings (URL to directory) configured for a web app. Use for \"Which static files mappings does alice.pythonanywhere.com have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"username":{"description":"Your PythonAnywhere username, for example 'alice'.","maxLength":200,"title":"Username","type":"string"},"domain_name":{"description":"Domain name of one of your web apps, for example 'alice.pythonanywhere.com'.","maxLength":200,"title":"Domain Name","type":"string"}},"required":["username","domain_name"],"title":"list_static_filesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_static_headers":{"post":{"operationId":"list_static_headers","summary":"List the custom static response headers configured for a web app. Use for \"Which static headers are set on alice.pythona","description":"List the custom static response headers configured for a web app. Use for \"Which static headers are set on alice.pythonanywhere.com\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"username":{"description":"Your PythonAnywhere username, for example 'alice'.","maxLength":200,"title":"Username","type":"string"},"domain_name":{"description":"Domain name of one of your web apps, for example 'alice.pythonanywhere.com'.","maxLength":200,"title":"Domain Name","type":"string"}},"required":["username","domain_name"],"title":"list_static_headersArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_scheduled_tasks":{"post":{"operationId":"list_scheduled_tasks","summary":"List your scheduled tasks with command, interval, time and enabled state. Use for \"What scheduled tasks do I have on Pyt","description":"List your scheduled tasks with command, interval, time and enabled state. Use for \"What scheduled tasks do I have on PythonAnywhere\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"username":{"description":"Your PythonAnywhere username, for example 'alice'.","maxLength":200,"title":"Username","type":"string"}},"required":["username"],"title":"list_scheduled_tasksArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_always_on_tasks":{"post":{"operationId":"list_always_on_tasks","summary":"List your always-on tasks with their command and state. Use for \"Which always-on tasks do I run on PythonAnywhere\".","description":"List your always-on tasks with their command and state. Use for \"Which always-on tasks do I run on PythonAnywhere\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"username":{"description":"Your PythonAnywhere username, for example 'alice'.","maxLength":200,"title":"Username","type":"string"}},"required":["username"],"title":"list_always_on_tasksArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_consoles":{"post":{"operationId":"list_consoles","summary":"List your console instances (id, executable, working directory); console output is not included. Use for \"Which consoles","description":"List your console instances (id, executable, working directory); console output is not included. Use for \"Which consoles do I have open on PythonAnywhere\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"username":{"description":"Your PythonAnywhere username, for example 'alice'.","maxLength":200,"title":"Username","type":"string"}},"required":["username"],"title":"list_consolesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_default_python_version":{"post":{"operationId":"get_default_python_version","summary":"Show your default Python 3 version and the versions available on the platform. Use for \"Which Python 3 versions can I ch","description":"Show your default Python 3 version and the versions available on the platform. Use for \"Which Python 3 versions can I choose on PythonAnywhere\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"username":{"description":"Your PythonAnywhere username, for example 'alice'.","maxLength":200,"title":"Username","type":"string"}},"required":["username"],"title":"get_default_python_versionArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}