{"schema_version":"v1","api_version":"2.0","service":"Teeworlds-MRPG-0.6 Editor Studio AI Platform","model_agnostic":true,"description":"Universal AI content creation, analysis, validation, and Change Request platform for Teeworlds-MRPG-0.6.","urls":{"studio":"https:\/\/editor.mmotee.online\/ai\/","onboarding_html":"https:\/\/editor.mmotee.online\/ai\/ai\/","onboarding_json":"https:\/\/editor.mmotee.online\/ai\/ai\/?format=json","llms_txt":"https:\/\/editor.mmotee.online\/ai\/llms.txt","llms_txt_api":"https:\/\/editor.mmotee.online\/ai\/api\/ai.php?action=llms_txt","discovery_api":"https:\/\/editor.mmotee.online\/ai\/api\/ai.php?action=discovery","discovery_manifest":"https:\/\/editor.mmotee.online\/ai\/.well-known\/ai-plugin.json","openapi_3_1":"https:\/\/editor.mmotee.online\/ai\/api\/ai.php?action=openapi","openapi_direct":"https:\/\/editor.mmotee.online\/ai\/openapi.json","mcp_api":"https:\/\/editor.mmotee.online\/ai\/api\/mcp.php","mcp_http":"https:\/\/editor.mmotee.online\/ai\/mcp","rest_api":"https:\/\/editor.mmotee.online\/ai\/api\/ai.php","auth_status":"https:\/\/editor.mmotee.online\/ai\/api\/auth.php?action=status","guest_login":"https:\/\/editor.mmotee.online\/ai\/api\/auth.php?action=guest_login"},"auth":{"recommended":"Scoped Bearer AI Token (issued by Studio administrator in Guest users)","header":"Authorization: Bearer esai_<token>","alt_header":"X-AI-Token: esai_<token>","scopes":["read","create","update","delete"],"fallback":"Guest cookie session via POST api\/auth.php?action=guest_login (requires X-Editor-CSRF on POST)","safety_boundary":"AI tokens strictly map to guest permissions. Direct SQL\/disk mutations are impossible; writes create Change Requests queued for human administrator approval."},"quickstart_steps":["1. Authenticate with Authorization: Bearer esai_<token> (or guest cookie session).","2. Fetch capability manifest & cookbook: GET api\/ai.php?action=manifest (or MCP get_manifest + resource mrpg:\/\/cookbook).","3. Orient in 1 call: GET api\/ai.php?action=search&q=<term> (MCP search_editor) and GET api\/ai.php?action=context&resource=worlds|quests|items|bots_info&id=<id> (MCP get_context).","4. Analyze before authoring: GET api\/ai.php?action=analyze&resource=scenarios (corpus overview) and GET api\/ai.php?action=similar&resource=<res>&name=<Name> (MCP find_similar) to avoid duplicates.","5. For spatial placement on maps, call GET api\/ai.php?action=analyze&resource=maps&world=<id> (MCP analyze_map) and GET api\/ai.php?action=map_screenshot&world=<id>&target=overview|guild_house:1|house:1 (MCP get_map_screenshot) to visually inspect a real PNG screenshot.","6. Read multiple records in 1 call with GET action=get&resource=<res>&ids=1,2,3 (MCP get_record ids=[...]); filter with operators ({\"Level\":{\"gte\":5}}) and sort=-ID in list. Keep sha256 from scenario get as baseHash.","7. Author multi-object batches cleanly using symbolic \"ref\":\"alias\" and \"$alias\" across FKs, DSL (\"[$ore\/3]\"), and JSON, or draft minimal patch_json (RFC 7396 merge patch) \/ type=\"copy\".","8. Verify patch_json server-side without writing: POST api\/ai.php?action=apply_patch (MCP apply_patch), then validate & dry-run via action=validate and action=preview.","9. Submit Change Request: POST api\/ai.php?action=propose with descriptive message and optional idempotency_key (confirm_dangerous=true only after reviewing dangerous_actions).","10. Close the review loop: inspect admin feedback, reply, revise, or withdraw pending requests via GET action=request \/ POST action=request_reply \/ POST action=request_withdraw (MCP manage_change_request)."],"operation_formats":{"supported_types":["create","update","copy","delete"],"type_alias":"Either \"type\" or \"action\" may be supplied on each operation object.","patch_json":"On update\/copy, supply patch_json: {\"Data\": {\"bonus\": {...}}} (DB) or patch_json: {...} (scenarios) to preserve unrelated existing fields.","symbolic_refs":"Declare \"ref\": \"my_item\" on any DB create\/copy op and reference \"$my_item\" in FK columns, DSL strings (\"[$my_item\/3]\"), or JSON within the same batch.","temp_id":"Omit tempId on DB create\/copy for automatic 2000000001+ assignment, or pass explicit tempId (2000000000..2000999999) for cross-references in the same batch.","verify_before_propose":"POST action=apply_patch {resource, id|filename, patch_json, baseHash?} — server-side merge of patch_json against the live record\/file (read-only). Returns before\/after\/diff\/noop and the same errors action=propose would emit. Never propose an unverified patch."},"mcp":{"protocolVersion":"2024-11-05","supportedVersions":["2024-11-05","2025-03-26","2025-06-18"],"transports":{"http_json_rpc_2_0":"https:\/\/editor.mmotee.online\/ai\/api\/mcp.php","stdio_bridge_command":"node tools\/mcp-stdio.mjs --url https:\/\/editor.mmotee.online\/ai --token <AI_TOKEN>","stdio_health_check":"node tools\/mcp-stdio.mjs --url https:\/\/editor.mmotee.online\/ai --token <AI_TOKEN> --check"},"resources":["mrpg:\/\/manifest","mrpg:\/\/cookbook","mrpg:\/\/openapi","mrpg:\/\/llms.txt","mrpg:\/\/schema\/{resource}","mrpg:\/\/context\/{resource}\/{id}"],"tools":["get_manifest","get_schema","search_editor","get_context","list_records","get_record","get_references","analyze_scenario","analyze_map","get_map_screenshot","find_similar","validate_operations","preview_operations","apply_patch","propose_changes","manage_change_request","copy_record","patch_json_record","get_history"]}}