クリアをまとめて登録
const url = 'https://game.retrogather.com/rest/v1/addClearsBatch';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"items":[{"gameId":1,"clearDate":"2026-04-15","playTime":1,"memo":"example","rating":1,"consoleId":"example","addToLibrary":true}],"dryRun":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://game.retrogather.com/rest/v1/addClearsBatch \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "items": [ { "gameId": 1, "clearDate": "2026-04-15", "playTime": 1, "memo": "example", "rating": 1, "consoleId": "example", "addToLibrary": true } ], "dryRun": true }'Play records / クリア一括登録: register up to 100 cleared games in one call, e.g. a list of games the user has finished. Owned games only: rows not in the library are skipped as not_in_library, unless addToLibrary: true adds the game to the library (no purchase details; moved from the wishlist) with the clear. Set it only when the user says they own the game (needs library:write). Each row creates one clear log: clearDate (YYYY-MM-DD, ask the user; do not assume today), playTime in minutes (2 hours = 120; ask when unknown), memo (the user’s impressions). rating is optional; omitted rows keep the current rating. A PLANNED, PLAYING, PAUSED or DROPPED record becomes COMPLETED (same playId); already cleared games are skipped. Show the list to the user and get their OK first; dryRun: true previews each row without saving. If the plan limit would be exceeded, nothing is registered. For one game, addPlayRecord with status COMPLETED does the same.
Plans: FREE / LIGHT / PREMIUM. Scopes: play:write.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
object
Clear date, YYYY-MM-DD (JST), today or earlier.
Minutes for the clear log (2 hours = 120).
Clear log text (the user’s impressions).
1 (lowest) to 5 (highest).
ConsoleId from getConsoles.
True: if the game is not in the library, add it (purchase details empty) together with the clear. Only when the user says they own it. Requires library:write.
True: report what each row would do (created / converted / skipped, added to the library, plan limits) without saving.
Examplegenerated
{ "items": [ { "gameId": 1, "clearDate": "2026-04-15", "playTime": 1, "memo": "example", "rating": 1, "consoleId": "example", "addToLibrary": true } ], "dryRun": true}Responses
Section titled “ Responses ”Tool result JSON (no MCP envelope). Delete previews also return 200 with confirmToken.
object
object
object
object
object
object
object
object
Example
{ "items": [ { "result": "created", "previousStatus": "PLANNED", "reason": "already_completed" } ]}Invalid_input (arguments, broken JSON body)
Entry errors (auth, routing, quota) use error; tool errors use code and message. Check retryable when present.
object
Examplegenerated
{ "error": "example", "code": "example", "message": "example", "retryable": true, "retryAfterSec": 1, "requestId": "example", "resetAt": "example", "remaining": 1, "scopes": [ "example" ], "upgradeUrl": "example"}Missing or invalid API key
Entry errors (auth, routing, quota) use error; tool errors use code and message. Check retryable when present.
object
Examplegenerated
{ "error": "example", "code": "example", "message": "example", "retryable": true, "retryAfterSec": 1, "requestId": "example", "resetAt": "example", "remaining": 1, "scopes": [ "example" ], "upgradeUrl": "example"}Insufficient_scope, plan_required, or access_suspended
Entry errors (auth, routing, quota) use error; tool errors use code and message. Check retryable when present.
object
Examplegenerated
{ "error": "example", "code": "example", "message": "example", "retryable": true, "retryAfterSec": 1, "requestId": "example", "resetAt": "example", "remaining": 1, "scopes": [ "example" ], "upgradeUrl": "example"}Target or tool not found
Entry errors (auth, routing, quota) use error; tool errors use code and message. Check retryable when present.
object
Examplegenerated
{ "error": "example", "code": "example", "message": "example", "retryable": true, "retryAfterSec": 1, "requestId": "example", "resetAt": "example", "remaining": 1, "scopes": [ "example" ], "upgradeUrl": "example"}Already_exists or revision_conflict (stale revision: re-read, then retry)
Entry errors (auth, routing, quota) use error; tool errors use code and message. Check retryable when present.
object
Examplegenerated
{ "error": "example", "code": "example", "message": "example", "retryable": true, "retryAfterSec": 1, "requestId": "example", "resetAt": "example", "remaining": 1, "scopes": [ "example" ], "upgradeUrl": "example"}Burst or daily quota exceeded. See resetAt.
Entry errors (auth, routing, quota) use error; tool errors use code and message. Check retryable when present.
object
Examplegenerated
{ "error": "example", "code": "example", "message": "example", "retryable": true, "retryAfterSec": 1, "requestId": "example", "resetAt": "example", "remaining": 1, "scopes": [ "example" ], "upgradeUrl": "example"}Headers
Section titled “Headers”Seconds
Unexpected server failure. Retrying the same call will not help.
Entry errors (auth, routing, quota) use error; tool errors use code and message. Check retryable when present.
object
Examplegenerated
{ "error": "example", "code": "example", "message": "example", "retryable": true, "retryAfterSec": 1, "requestId": "example", "resetAt": "example", "remaining": 1, "scopes": [ "example" ], "upgradeUrl": "example"}Temporary failure or maintenance. Retry after Retry-After.
Entry errors (auth, routing, quota) use error; tool errors use code and message. Check retryable when present.
object
Examplegenerated
{ "error": "example", "code": "example", "message": "example", "retryable": true, "retryAfterSec": 1, "requestId": "example", "resetAt": "example", "remaining": 1, "scopes": [ "example" ], "upgradeUrl": "example"}Headers
Section titled “Headers”Seconds
