chat

Submit frontend response

Submits a response from the frontend after receiving a frontend_request event via SSE

post/api/mcp/frontend-response

Request

  • Base URL: https://localhost:8080
  • URL: https://localhost:8080/api/mcp/frontend-response
  • Auth: none declared

Request body

requestIdstring required

Request ID from the frontend_request event

successboolean

Whether the frontend request was successful

dataobject

Response data from frontend (required if error is not provided). May contain a debugContext field with diagnostic info (platform, documentState, trackChanges, timing, textMatch).

errorstring

Error message if request failed (required if data is not provided)

debugContextobject

Debug context for troubleshooting (platform, documentState, trackChanges, timing, textMatch, errorDetails)

Example request

{
  "requestId": "req_123456",
  "success": true,
  "data": {
    "applied": 1,
    "debugContext": {
      "platform": "windows",
      "isOnline": false,
      "documentState": {
        "isEmpty": false,
        "characterCount": 5000,
        "paragraphCount": 20
      },
      "trackChanges": {
        "enabled": true,
        "canEnable": true
      },
      "timing": {
        "startTime": 1706000000000,
        "endTime": 1706000001000,
        "durationMs": 1000
      }
    }
  },
  "error": "Request failed",
  "debugContext": {
    "platform": "windows",
    "isOnline": false,
    "documentState": {
      "isEmpty": false,
      "characterCount": 5000,
      "paragraphCount": 20
    },
    "trackChanges": {
      "enabled": true,
      "canEnable": true
    },
    "timing": {
      "startTime": 1706000000000,
      "endTime": 1706000001000,
      "durationMs": 1000
    },
    "errorDetails": {
      "code": "OPERATION_FAILED",
      "message": "Insert failed",
      "operationAttempted": "insertText at END"
    }
  }
}

Response

Frontend response received successfully

successboolean required

Whether the frontend response was processed successfully

messagestring required

Response message

Example response

{
  "success": true,
  "message": "Frontend response received and processed"
}

Changes

No recorded changes to this operation across all 1 revision of this API.