所有ソフトにまとめて追加
const url = 'https://game.retrogather.com/rest/v1/addToLibraryBatch';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"items":[{"gameId":1,"buyDate":"2026-04-15","buyPrice":1,"buyPlace":"example","rating":1,"memo":"example"}],"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/addToLibraryBatch \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "items": [ { "gameId": 1, "buyDate": "2026-04-15", "buyPrice": 1, "buyPlace": "example", "rating": 1, "memo": "example" } ], "dryRun": true }'Library / 所有ソフト一括追加: add up to 100 owned games in one call, e.g. after resolving a spreadsheet with searchGamesBatch. Show the list to the user and get their OK first; dryRun: true previews each row without saving. Rows already in the library are skipped; unknown gameIds are reported as not_found. Games on the wishlist are moved and inherit its values, same as addToLibrary. If the plan limit would be exceeded, nothing is added. Retrying the same items is safe: saved rows are skipped, and wishlist entries left behind by a failed move are removed.
Plans: FREE / LIGHT / PREMIUM. Scopes: library:write.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
object
YYYY-MM-DD.
Price in JPY.
1 (lowest) to 5 (highest).
True: report what each row would do (added / already_in_library / not_found, moved from the wishlist, plan limit) without saving.
Examplegenerated
{ "items": [ { "gameId": 1, "buyDate": "2026-04-15", "buyPrice": 1, "buyPlace": "example", "rating": 1, "memo": "example" } ], "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
Example
{ "items": [ { "status": "added" } ]}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
