AtCoder MCP Server
Search AtCoder problems and fetch public problem statements through MCP.
Should I use this
Quality & Safety
Based on automated analysis of tool definitions and protocol compliance.
Context Cost
This is the approximate number of tokens consumed each time the server's tools are loaded into a model's context. Higher counts reduce the attention available for other tasks.
Install
One-Click Install
Add this to your `claude_desktop_config.json` file:
{
"mcpServers": {
"atcoder": {
"url": "https://api.ksrnyx.top/oj-mcp/atcoder/mcp"
}
}
}Remote endpoints
https://api.ksrnyx.top/oj-mcp/atcoder/mcpstreamable-httpWhat it can do
Tool inventory
Tools (4)
🟢oj_capabilities
Report the audited anonymous AtCoder read surface and explicitly unsupported operations.
Input Schema
{
"type": "object",
"properties": {},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false
}Output Schema
{
"type": "object",
"anyOf": [
{
"type": "object",
"properties": {
"schemaVersion": {
"type": "string",
"const": "oj.capabilities/v1"
},
"providerId": {
"type": "string",
"minLength": 1
},
"providerVersion": {
"type": "string",
"minLength": 1
},
"platform": {
"type": "string",
"enum": [
"luogu",
"leetcode",
"nowcoder",
"codeforces",
"atcoder"
]
},
"protocolVersion": {
"type": "string",
"minLength": 1
},
"operations": {
"type": "object",
"propertyNames": {
"type": "string",
"enum": [
"searchProblems",
"fetchProblem",
"importProblem",
"fetchProfile",
"listSubmissions",
"localRun",
"platformRun",
"prepareSubmission",
"commitSubmission",
"pollSubmission"
]
},
"additionalProperties": {
"type": "object",
"properties": {
"name": {
"type": "string",
"enum": [
"searchProblems",
"fetchProblem",
"importProblem",
"fetchProfile",
"listSubmissions",
"localRun",
"platformRun",
"prepareSubmission",
"commitSubmission",
"pollSubmission"
]
},
"status": {
"type": "string",
"enum": [
"available",
"auth_required",
"unsupported",
"disabled_by_policy",
"degraded"
]
},
"toolName": {
"type": "string",
"minLength": 1
},
"transport": {
"type": "string",
"enum": [
"remote_http",
"local_stdio"
]
},
"auth": {
"type": "string",
"enum": [
"none",
"oauth2",
"api_key",
"session_cookie",
"browser"
]
},
"risk": {
"type": "string",
"enum": [
"R0_public_read",
"R1_private_read",
"R2_local_execute",
"R3_prepare_write",
"R4_real_submit"
]
},
"compliance": {
"type": "string",
"enum": [
"official",
"unofficial",
"restricted",
"unknown"
]
},
"reason": {
"type": "string",
"minLength": 1
},
"checkedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
}
},
"required": [
"name",
"status",
"transport",
"auth",
"risk",
"compliance",
"checkedAt"
],
"additionalProperties": false
},
"required": [
"searchProblems",
"fetchProblem",
"importProblem",
"fetchProfile",
"listSubmissions",
"localRun",
"platformRun",
"prepareSubmission",
"commitSubmission",
"pollSubmission"
]
},
"languages": {
"type": "array",
"items": {
"type": "object",
"properties": {
"languageKey": {
"type": "string",
"minLength": 1
},
"platformLanguageId": {
"type": "string",
"minLength": 1
},
"displayName": {
"type": "string",
"minLength": 1
}
},
"required": [
"languageKey",
"platformLanguageId",
"displayName"
],
"additionalProperties": false
}
},
"source": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"official_api",
"official_open_platform",
"page_adapter",
"browser_companion",
"community_adapter",
"manual"
]
},
"adapterId": {
"type": "string",
"minLength": 1
},
"adapterVersion": {
"type": "string",
"minLength": 1
},
"fetchedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
},
"sourceUrl": {
"type": "string",
"format": "uri"
},
"etag": {
"type": "string",
"minLength": 1
},
"rawRef": {
"type": "string",
"minLength": 1
},
"confidence": {
"type": "string",
"enum": [
"authoritative",
"derived",
"user_supplied"
]
}
},
"required": [
"kind",
"adapterId",
"adapterVersion",
"fetchedAt",
"sourceUrl",
"confidence"
],
"additionalProperties": false
}
},
"required": [
"schemaVersion",
"providerId",
"providerVersion",
"platform",
"protocolVersion",
"operations",
"languages",
"source"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"schemaVersion": {
"type": "string",
"const": "oj.error/v1"
},
"code": {
"type": "string",
"enum": [
"request.invalid",
"capability.unsupported",
"policy.blocked",
"auth.required",
"auth.invalid",
"auth.forbidden",
"challenge.required",
"resource.not_found",
"rate_limited",
"network.timeout",
"upstream.unavailable",
"upstream.schema_changed",
"language.unsupported",
"runner.unavailable",
"runner.sandbox_required",
"confirmation.required",
"confirmation.expired",
"confirmation.mismatch",
"submission.closed",
"submission.rejected",
"submission.outcome_unknown",
"internal"
]
},
"layer": {
"type": "string",
"enum": [
"broker",
"transport",
"protocol",
"auth",
"upstream",
"runner",
"policy"
]
},
"message": {
"type": "string",
"minLength": 1
},
"retryPolicy": {
"type": "string",
"enum": [
"never",
"safe_read",
"poll_only",
"after_user_action"
]
},
"userAction": {
"type": "string",
"enum": [
"none",
"retry",
"sign_in",
"solve_challenge",
"change_language",
"open_logs"
]
},
"platform": {
"type": "string",
"enum": [
"luogu",
"leetcode",
"nowcoder",
"codeforces",
"atcoder"
]
},
"providerId": {
"type": "string",
"minLength": 1
},
"httpStatus": {
"type": "integer",
"minimum": 100,
"maximum": 599
},
"upstreamCode": {
"type": "string",
"minLength": 1
},
"requestId": {
"type": "string",
"minLength": 1
},
"jobId": {
"type": "string",
"minLength": 1
},
"retryAfterMs": {
"type": "number",
"minimum": 0
}
},
"required": [
"schemaVersion",
"code",
"layer",
"message",
"retryPolicy",
"userAction"
],
"additionalProperties": false
}
]
}🟢oj_health
Report local readiness and the latest observed AtCoder page-read status without probing upstream.
Input Schema
{
"type": "object",
"properties": {},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false
}Output Schema
{
"type": "object",
"anyOf": [
{
"type": "object",
"properties": {
"schemaVersion": {
"type": "string",
"const": "oj.provider-health/v1"
},
"providerId": {
"type": "string",
"minLength": 1
},
"platform": {
"type": "string",
"enum": [
"luogu",
"leetcode",
"nowcoder",
"codeforces",
"atcoder"
]
},
"checkedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
},
"overall": {
"type": "string",
"enum": [
"healthy",
"degraded",
"unavailable",
"auth_required"
]
},
"layers": {
"type": "object",
"properties": {
"transport": {
"type": "string",
"enum": [
"pass",
"fail"
]
},
"protocol": {
"type": "string",
"enum": [
"pass",
"fail"
]
},
"schema": {
"type": "string",
"enum": [
"pass",
"drift",
"unknown"
]
},
"auth": {
"type": "string",
"enum": [
"not_required",
"valid",
"expired",
"missing",
"challenge"
]
},
"upstream": {
"type": "string",
"enum": [
"pass",
"timeout",
"rate_limited",
"blocked",
"fail"
]
}
},
"required": [
"transport",
"protocol",
"schema",
"auth",
"upstream"
],
"additionalProperties": false
},
"latencyMs": {
"type": "number",
"minimum": 0
},
"retryAfterMs": {
"type": "number",
"minimum": 0
},
"message": {
"type": "string",
"minLength": 1
}
},
"required": [
"schemaVersion",
"providerId",
"platform",
"checkedAt",
"overall",
"layers",
"message"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"schemaVersion": {
"type": "string",
"const": "oj.error/v1"
},
"code": {
"type": "string",
"enum": [
"request.invalid",
"capability.unsupported",
"policy.blocked",
"auth.required",
"auth.invalid",
"auth.forbidden",
"challenge.required",
"resource.not_found",
"rate_limited",
"network.timeout",
"upstream.unavailable",
"upstream.schema_changed",
"language.unsupported",
"runner.unavailable",
"runner.sandbox_required",
"confirmation.required",
"confirmation.expired",
"confirmation.mismatch",
"submission.closed",
"submission.rejected",
"submission.outcome_unknown",
"internal"
]
},
"layer": {
"type": "string",
"enum": [
"broker",
"transport",
"protocol",
"auth",
"upstream",
"runner",
"policy"
]
},
"message": {
"type": "string",
"minLength": 1
},
"retryPolicy": {
"type": "string",
"enum": [
"never",
"safe_read",
"poll_only",
"after_user_action"
]
},
"userAction": {
"type": "string",
"enum": [
"none",
"retry",
"sign_in",
"solve_challenge",
"change_language",
"open_logs"
]
},
"platform": {
"type": "string",
"enum": [
"luogu",
"leetcode",
"nowcoder",
"codeforces",
"atcoder"
]
},
"providerId": {
"type": "string",
"minLength": 1
},
"httpStatus": {
"type": "integer",
"minimum": 100,
"maximum": 599
},
"upstreamCode": {
"type": "string",
"minLength": 1
},
"requestId": {
"type": "string",
"minLength": 1
},
"jobId": {
"type": "string",
"minLength": 1
},
"retryAfterMs": {
"type": "number",
"minimum": 0
}
},
"required": [
"schemaVersion",
"code",
"layer",
"message",
"retryPolicy",
"userAction"
],
"additionalProperties": false
}
]
}🟢oj_fetch_problem
Fetch one public problem statement from an exact contest/task pair or canonical atcoder.jp task URL. Returns sanitized HTML with preserved math, samples, limits, hashes, and source provenance.
Input Schema
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"anyOf": [
{
"type": "object",
"properties": {
"url": {
"type": "string",
"maxLength": 300,
"pattern": "^https:\\/\\/atcoder\\.jp\\/contests\\/[a-z0-9][a-z0-9_-]{0,63}\\/tasks\\/[a-z0-9][a-z0-9_-]{0,63}(?:\\?lang=(?:en|ja))?$",
"description": "Canonical HTTPS atcoder.jp task URL, optionally with one en/ja lang query."
},
"locale": {
"description": "Statement locale. Overrides the URL lang query when supplied.",
"type": "string",
"enum": [
"en",
"ja"
]
}
},
"required": [
"url"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"contestId": {
"type": "string",
"pattern": "^[a-z0-9][a-z0-9_-]{0,63}$",
"description": "Exact AtCoder contest id, such as abc086."
},
"taskId": {
"type": "string",
"pattern": "^[a-z0-9][a-z0-9_-]{0,63}$",
"description": "Exact AtCoder task id, such as abc086_a."
},
"locale": {
"description": "Statement locale. Defaults to English.",
"type": "string",
"enum": [
"en",
"ja"
]
}
},
"required": [
"contestId",
"taskId"
],
"additionalProperties": false
}
]
}Output Schema
{
"type": "object",
"anyOf": [
{
"type": "object",
"properties": {
"schemaVersion": {
"type": "string",
"const": "oj.problem-document/v1"
},
"ref": {
"type": "object",
"properties": {
"schemaVersion": {
"type": "string",
"const": "oj.problem-ref/v1"
},
"platform": {
"type": "string",
"enum": [
"luogu",
"leetcode",
"nowcoder",
"codeforces",
"atcoder"
]
},
"site": {
"type": "string",
"enum": [
"global",
"cn"
]
},
"nativeId": {
"type": "string",
"minLength": 1
},
"canonicalId": {
"type": "string",
"minLength": 1
},
"url": {
"type": "string",
"format": "uri"
},
"contest": {
"type": "object",
"properties": {
"nativeId": {
"type": "string",
"minLength": 1
},
"index": {
"type": "string",
"minLength": 1
}
},
"required": [
"nativeId"
],
"additionalProperties": false
},
"source": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"official_api",
"official_open_platform",
"page_adapter",
"browser_companion",
"community_adapter",
"manual"
]
},
"adapterId": {
"type": "string",
"minLength": 1
},
"adapterVersion": {
"type": "string",
"minLength": 1
},
"fetchedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
},
"sourceUrl": {
"type": "string",
"format": "uri"
},
"etag": {
"type": "string",
"minLength": 1
},
"rawRef": {
"type": "string",
"minLength": 1
},
"confidence": {
"type": "string",
"enum": [
"authoritative",
"derived",
"user_supplied"
]
}
},
"required": [
"kind",
"adapterId",
"adapterVersion",
"fetchedAt",
"sourceUrl",
"confidence"
],
"additionalProperties": false
}
},
"required": [
"schemaVersion",
"platform",
"nativeId",
"canonicalId",
"url",
"source"
],
"additionalProperties": false
},
"title": {
"type": "string",
"minLength": 1
},
"locale": {
"type": "string",
"minLength": 1
},
"access": {
"type": "string",
"enum": [
"public",
"auth_required",
"premium",
"contest_only",
"unknown"
]
},
"difficulty": {
"type": "object",
"properties": {
"scale": {
"type": "string",
"minLength": 1
},
"value": {
"type": "number"
},
"label": {
"type": "string",
"minLength": 1
}
},
"required": [
"scale"
],
"additionalProperties": false
},
"tags": {
"type": "array",
"items": {
"type": "object",
"properties": {
"namespace": {
"type": "string",
"enum": [
"platform",
"canonical"
]
},
"id": {
"type": "string",
"minLength": 1
},
"slug": {
"type": "string",
"minLength": 1
},
"name": {
"type": "string",
"minLength": 1
}
},
"required": [
"namespace",
"slug",
"name"
],
"additionalProperties": false
}
},
"content": {
"type": "object",
"properties": {
"statement": {
"type": "object",
"properties": {
"text": {
"type": "string"
},
"format": {
"type": "string",
"enum": [
"markdown",
"html",
"text"
]
},
"locale": {
"type": "string",
"minLength": 1
},
"truncated": {
"type": "boolean"
},
"originalChars": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"sha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
}
},
"required": [
"text",
"format",
"locale",
"truncated",
"sha256"
],
"additionalProperties": false
},
"input": {
"type": "object",
"properties": {
"text": {
"type": "string"
},
"format": {
"type": "string",
"enum": [
"markdown",
"html",
"text"
]
},
"locale": {
"type": "string",
"minLength": 1
},
"truncated": {
"type": "boolean"
},
"originalChars": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"sha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
}
},
"required": [
"text",
"format",
"locale",
"truncated",
"sha256"
],
"additionalProperties": false
},
"output": {
"type": "object",
"properties": {
"text": {
"type": "string"
},
"format": {
"type": "string",
"enum": [
"markdown",
"html",
"text"
]
},
"locale": {
"type": "string",
"minLength": 1
},
"truncated": {
"type": "boolean"
},
"originalChars": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"sha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
}
},
"required": [
"text",
"format",
"locale",
"truncated",
"sha256"
],
"additionalProperties": false
},
"notes": {
"type": "object",
"properties": {
"text": {
"type": "string"
},
"format": {
"type": "string",
"enum": [
"markdown",
"html",
"text"
]
},
"locale": {
"type": "string",
"minLength": 1
},
"truncated": {
"type": "boolean"
},
"originalChars": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"sha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
}
},
"required": [
"text",
"format",
"locale",
"truncated",
"sha256"
],
"additionalProperties": false
}
},
"required": [
"statement"
],
"additionalProperties": false
},
"constraints": {
"type": "array",
"items": {
"type": "string"
}
},
"samples": {
"type": "array",
"items": {
"type": "object",
"properties": {
"ordinal": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"input": {
"type": "string"
},
"output": {
"type": "string"
},
"explanation": {
"type": "string"
}
},
"required": [
"ordinal",
"input",
"output"
],
"additionalProperties": false
}
},
"limits": {
"type": "object",
"properties": {
"timeMs": {
"type": "number",
"exclusiveMinimum": 0
},
"memoryBytes": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
},
"additionalProperties": false
},
"io": {
"type": "object",
"properties": {
"mode": {
"type": "string",
"enum": [
"stdin_stdout",
"function",
"file",
"interactive"
]
},
"inputFile": {
"type": "string",
"minLength": 1
},
"outputFile": {
"type": "string",
"minLength": 1
}
},
"required": [
"mode"
],
"additionalProperties": false
},
"starterCode": {
"type": "array",
"items": {
"type": "object",
"properties": {
"languageKey": {
"type": "string",
"minLength": 1
},
"platformLanguageId": {
"type": "string",
"minLength": 1
},
"code": {
"type": "string"
}
},
"required": [
"languageKey",
"platformLanguageId",
"code"
],
"additionalProperties": false
}
},
"source": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"official_api",
"official_open_platform",
"page_adapter",
"browser_companion",
"community_adapter",
"manual"
]
},
"adapterId": {
"type": "string",
"minLength": 1
},
"adapterVersion": {
"type": "string",
"minLength": 1
},
"fetchedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
},
"sourceUrl": {
"type": "string",
"format": "uri"
},
"etag": {
"type": "string",
"minLength": 1
},
"rawRef": {
"type": "string",
"minLength": 1
},
"confidence": {
"type": "string",
"enum": [
"authoritative",
"derived",
"user_supplied"
]
}
},
"required": [
"kind",
"adapterId",
"adapterVersion",
"fetchedAt",
"sourceUrl",
"confidence"
],
"additionalProperties": false
}
},
"required": [
"schemaVersion",
"ref",
"title",
"locale",
"access",
"tags",
"content",
"constraints",
"samples",
"limits",
"io",
"starterCode",
"source"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"schemaVersion": {
"type": "string",
"const": "oj.error/v1"
},
"code": {
"type": "string",
"enum": [
"request.invalid",
"capability.unsupported",
"policy.blocked",
"auth.required",
"auth.invalid",
"auth.forbidden",
"challenge.required",
"resource.not_found",
"rate_limited",
"network.timeout",
"upstream.unavailable",
"upstream.schema_changed",
"language.unsupported",
"runner.unavailable",
"runner.sandbox_required",
"confirmation.required",
"confirmation.expired",
"confirmation.mismatch",
"submission.closed",
"submission.rejected",
"submission.outcome_unknown",
"internal"
]
},
"layer": {
"type": "string",
"enum": [
"broker",
"transport",
"protocol",
"auth",
"upstream",
"runner",
"policy"
]
},
"message": {
"type": "string",
"minLength": 1
},
"retryPolicy": {
"type": "string",
"enum": [
"never",
"safe_read",
"poll_only",
"after_user_action"
]
},
"userAction": {
"type": "string",
"enum": [
"none",
"retry",
"sign_in",
"solve_challenge",
"change_language",
"open_logs"
]
},
"platform": {
"type": "string",
"enum": [
"luogu",
"leetcode",
"nowcoder",
"codeforces",
"atcoder"
]
},
"providerId": {
"type": "string",
"minLength": 1
},
"httpStatus": {
"type": "integer",
"minimum": 100,
"maximum": 599
},
"upstreamCode": {
"type": "string",
"minLength": 1
},
"requestId": {
"type": "string",
"minLength": 1
},
"jobId": {
"type": "string",
"minLength": 1
},
"retryAfterMs": {
"type": "number",
"minimum": 0
}
},
"required": [
"schemaVersion",
"code",
"layer",
"message",
"retryPolicy",
"userAction"
],
"additionalProperties": false
}
]
}🟢oj_search_problems(schemaVersion, requestId, platform, query, locale, ...)
Resolve exactly one contest/task id, atcoder:contest/task id, or canonical task URL. Free-text and catalog crawling are not supported.
Input Schema
{
"type": "object",
"properties": {
"schemaVersion": {
"type": "string",
"const": "oj.search-request/v1"
},
"requestId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"platform": {
"type": "string",
"const": "atcoder"
},
"query": {
"type": "string",
"minLength": 1,
"maxLength": 300
},
"locale": {
"type": "string",
"enum": [
"en",
"ja"
]
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 50
}
},
"required": [
"schemaVersion",
"requestId",
"platform",
"query",
"limit"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false
}Output Schema
{
"type": "object",
"anyOf": [
{
"type": "object",
"properties": {
"schemaVersion": {
"type": "string",
"const": "oj.search-result/v1"
},
"requestId": {
"type": "string",
"minLength": 1
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"schemaVersion": {
"type": "string",
"const": "oj.problem-summary/v1"
},
"ref": {
"type": "object",
"properties": {
"schemaVersion": {
"type": "string",
"const": "oj.problem-ref/v1"
},
"platform": {
"type": "string",
"enum": [
"luogu",
"leetcode",
"nowcoder",
"codeforces",
"atcoder"
]
},
"site": {
"type": "string",
"enum": [
"global",
"cn"
]
},
"nativeId": {
"type": "string",
"minLength": 1
},
"canonicalId": {
"type": "string",
"minLength": 1
},
"url": {
"type": "string",
"format": "uri"
},
"contest": {
"type": "object",
"properties": {
"nativeId": {
"type": "string",
"minLength": 1
},
"index": {
"type": "string",
"minLength": 1
}
},
"required": [
"nativeId"
],
"additionalProperties": false
},
"source": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"official_api",
"official_open_platform",
"page_adapter",
"browser_companion",
"community_adapter",
"manual"
]
},
"adapterId": {
"type": "string",
"minLength": 1
},
"adapterVersion": {
"type": "string",
"minLength": 1
},
"fetchedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
},
"sourceUrl": {
"type": "string",
"format": "uri"
},
"etag": {
"type": "string",
"minLength": 1
},
"rawRef": {
"type": "string",
"minLength": 1
},
"confidence": {
"type": "string",
"enum": [
"authoritative",
"derived",
"user_supplied"
]
}
},
"required": [
"kind",
"adapterId",
"adapterVersion",
"fetchedAt",
"sourceUrl",
"confidence"
],
"additionalProperties": false
}
},
"required": [
"schemaVersion",
"platform",
"nativeId",
"canonicalId",
"url",
"source"
],
"additionalProperties": false
},
"title": {
"type": "string",
"minLength": 1
},
"difficulty": {
"type": "object",
"properties": {
"scale": {
"type": "string",
"minLength": 1
},
"value": {
"type": "number"
},
"label": {
"type": "string",
"minLength": 1
}
},
"required": [
"scale"
],
"additionalProperties": false
},
"tags": {
"type": "array",
"items": {
"type": "object",
"properties": {
"namespace": {
"type": "string",
"enum": [
"platform",
"canonical"
]
},
"id": {
"type": "string",
"minLength": 1
},
"slug": {
"type": "string",
"minLength": 1
},
"name": {
"type": "string",
"minLength": 1
}
},
"required": [
"namespace",
"slug",
"name"
],
"additionalProperties": false
}
},
"contestLabel": {
"type": "string",
"minLength": 1
},
"acceptance": {
"type": "object",
"properties": {
"accepted": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"submissions": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"ratio": {
"type": "number",
"minimum": 0,
"maximum": 1
}
},
"additionalProperties": false
},
"source": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"official_api",
"official_open_platform",
"page_adapter",
"browser_companion",
"community_adapter",
"manual"
]
},
"adapterId": {
"type": "string",
"minLength": 1
},
"adapterVersion": {
"type": "string",
"minLength": 1
},
"fetchedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
},
"sourceUrl": {
"type": "string",
"format": "uri"
},
"etag": {
"type": "string",
"minLength": 1
},
"rawRef": {
"type": "string",
"minLength": 1
},
"confidence": {
"type": "string",
"enum": [
"authoritative",
"derived",
"user_supplied"
]
}
},
"required": [
"kind",
"adapterId",
"adapterVersion",
"fetchedAt",
"sourceUrl",
"confidence"
],
"additionalProperties": false
}
},
"required": [
"schemaVersion",
"ref",
"title",
"tags",
"source"
],
"additionalProperties": false
}
},
"nextCursor": {
"type": "string",
"minLength": 1
},
"source": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"official_api",
"official_open_platform",
"page_adapter",
"browser_companion",
"community_adapter",
"manual"
]
},
"adapterId": {
"type": "string",
"minLength": 1
},
"adapterVersion": {
"type": "string",
"minLength": 1
},
"fetchedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
},
"sourceUrl": {
"type": "string",
"format": "uri"
},
"etag": {
"type": "string",
"minLength": 1
},
"rawRef": {
"type": "string",
"minLength": 1
},
"confidence": {
"type": "string",
"enum": [
"authoritative",
"derived",
"user_supplied"
]
}
},
"required": [
"kind",
"adapterId",
"adapterVersion",
"fetchedAt",
"sourceUrl",
"confidence"
],
"additionalProperties": false
}
},
"required": [
"schemaVersion",
"requestId",
"items",
"source"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"schemaVersion": {
"type": "string",
"const": "oj.error/v1"
},
"code": {
"type": "string",
"enum": [
"request.invalid",
"capability.unsupported",
"policy.blocked",
"auth.required",
"auth.invalid",
"auth.forbidden",
"challenge.required",
"resource.not_found",
"rate_limited",
"network.timeout",
"upstream.unavailable",
"upstream.schema_changed",
"language.unsupported",
"runner.unavailable",
"runner.sandbox_required",
"confirmation.required",
"confirmation.expired",
"confirmation.mismatch",
"submission.closed",
"submission.rejected",
"submission.outcome_unknown",
"internal"
]
},
"layer": {
"type": "string",
"enum": [
"broker",
"transport",
"protocol",
"auth",
"upstream",
"runner",
"policy"
]
},
"message": {
"type": "string",
"minLength": 1
},
"retryPolicy": {
"type": "string",
"enum": [
"never",
"safe_read",
"poll_only",
"after_user_action"
]
},
"userAction": {
"type": "string",
"enum": [
"none",
"retry",
"sign_in",
"solve_challenge",
"change_language",
"open_logs"
]
},
"platform": {
"type": "string",
"enum": [
"luogu",
"leetcode",
"nowcoder",
"codeforces",
"atcoder"
]
},
"providerId": {
"type": "string",
"minLength": 1
},
"httpStatus": {
"type": "integer",
"minimum": 100,
"maximum": 599
},
"upstreamCode": {
"type": "string",
"minLength": 1
},
"requestId": {
"type": "string",
"minLength": 1
},
"jobId": {
"type": "string",
"minLength": 1
},
"retryAfterMs": {
"type": "number",
"minimum": 0
}
},
"required": [
"schemaVersion",
"code",
"layer",
"message",
"retryPolicy",
"userAction"
],
"additionalProperties": false
}
]
}Community
Evidence