GovTribe

Add to container MCP response

MCP tool response returned by the Add to container MCP tool.

Response Shape

The tool returns a text message plus the same status details as structured content.

FieldTypeNotes
statusstringOperation status. Values are in_progress, completed, or failed.
messagestringHuman-readable status message for the current snapshot.
container_idstringGovTribe container owner identifier for the operation.
oai_container_idstringHosted OpenAI container identifier when one exists.
requested_file_countintegerNumber of files requested for the container operation.
completed_file_countintegerNumber of requested files already attached.
pending_file_countintegerNumber of requested files still being attached.
failed_file_countintegerNumber of requested files that failed attachment.
completed_file_namesstring arrayFile names already available in the hosted container.
pending_file_namesstring arrayFile names still being uploaded or attached.
failed_file_namesstring arrayFile names that failed attachment.
skipped_file_namesstring arrayFile names skipped by the tool before upload.
hosted_tool_readybooleanWhether the hosted shell tool can use the completed files now.
retry_with_same_argumentsbooleanWhether the agent should call the same tool again later with identical arguments.
next_actionsobject arrayStructured guidance for the next MCP call or hosted shell workflow step. Each item includes action, tool, and reason.
failure_reasonsobject arrayDetectable failure or skipped-file reasons with code, message, and retry_hint. Empty when no repair guidance is needed.
container_filesobject arrayCompleted file references for hosted shell use. Each item includes name, oai_file_id, path_hint, and sandbox_uri_hint when available.

Follow-up Behavior

When status is in_progress and retry_with_same_arguments is true, follow next_actions and call Add_To_Container again later with the same arguments to get a fresh status snapshot.

Do not use hosted shell files while status is in_progress or hosted_tool_ready is false.

When status is completed and hosted_tool_ready is true, follow next_actions and use the container_files values in hosted shell workflows. Use path_hint for shell commands and sandbox_uri_hint when a response needs a sandbox link.

When status is failed, inspect failure_reasons before retrying. The response can distinguish no supported files, unsupported file types, and upload or container attachment failure when that information is available.

Example

{
  "status": "completed",
  "message": "Container CONTAINER_ID has 2 requested supported file(s): 2 completed, 0 pending, 0 failed. Completed files: \"pricing-summary.pdf\", \"requirements.xlsx\". Requested files are ready for hosted shell access under /mnt/data.",
  "container_id": "CONTAINER_ID",
  "oai_container_id": "OAI_CONTAINER_ID",
  "requested_file_count": 2,
  "completed_file_count": 2,
  "pending_file_count": 0,
  "failed_file_count": 0,
  "completed_file_names": ["pricing-summary.pdf", "requirements.xlsx"],
  "pending_file_names": [],
  "failed_file_names": [],
  "skipped_file_names": [],
  "hosted_tool_ready": true,
  "retry_with_same_arguments": false,
  "next_actions": [
    {
      "action": "use_hosted_shell",
      "tool": null,
      "reason": "The requested files are ready for hosted shell access. Use container_files path_hint or sandbox_uri_hint values."
    }
  ],
  "failure_reasons": [],
  "container_files": [
    {
      "name": "pricing-summary.pdf",
      "oai_file_id": "file_...",
      "path_hint": "/mnt/data/pricing-summary.pdf",
      "sandbox_uri_hint": "sandbox:/mnt/data/pricing-summary.pdf"
    },
    {
      "name": "requirements.xlsx",
      "oai_file_id": "file_...",
      "path_hint": "/mnt/data/requirements.xlsx",
      "sandbox_uri_hint": "sandbox:/mnt/data/requirements.xlsx"
    }
  ]
}