# Chat Inbox

`chat.inbox`

Read your Inbox in this workspace, newest activity first. Defaults to unread conversations. Unread does not mean a reply is required. Reading never marks messages read.

[Chat and messages guide](https://docs.levr.ai/mcp/resources/chat.md)

Availability depends on live discovery and your access to the record. Do not infer MCP calls from REST paths.

Operation: read. Required OAuth scopes: mcp.

## Client portal input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "business_id": {
      "description": "Business ID in this workspace.",
      "maxLength": 64,
      "type": "string"
    },
    "cursor": {
      "maxLength": 2048,
      "type": "string"
    },
    "deal_id": {
      "description": "Deal ID in this workspace, including related business defaults.",
      "maxLength": 64,
      "type": "string"
    },
    "ordering": {
      "enum": [
        "last_activity",
        "-last_activity"
      ],
      "type": "string"
    },
    "organization_slug": {
      "maxLength": 100,
      "minLength": 1,
      "type": "string"
    },
    "page_size": {
      "maximum": 50,
      "minimum": 1,
      "type": "integer"
    },
    "project_id": {
      "description": "Project ID in this workspace. Includes readable linked Deal histories and its business default.",
      "maxLength": 64,
      "type": "string"
    },
    "provider_slug": {
      "maxLength": 100,
      "minLength": 1,
      "type": "string"
    },
    "unread_only": {
      "default": true,
      "type": "boolean"
    }
  },
  "required": [
    "provider_slug",
    "organization_slug"
  ],
  "type": "object"
}
```

## Provider portal input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "business_id": {
      "description": "Business ID in this workspace.",
      "maxLength": 64,
      "type": "string"
    },
    "cursor": {
      "maxLength": 2048,
      "type": "string"
    },
    "deal_id": {
      "description": "Deal ID in this workspace, including related business defaults.",
      "maxLength": 64,
      "type": "string"
    },
    "ordering": {
      "enum": [
        "last_activity",
        "-last_activity"
      ],
      "type": "string"
    },
    "page_size": {
      "maximum": 50,
      "minimum": 1,
      "type": "integer"
    },
    "project_id": {
      "description": "Project ID in this workspace. Includes readable linked Deal histories and its business default.",
      "maxLength": 64,
      "type": "string"
    },
    "provider_slug": {
      "description": "Copy the provider slug from providers.list or your client workspace.",
      "maxLength": 100,
      "minLength": 1,
      "type": "string"
    },
    "unread_only": {
      "default": true,
      "type": "boolean"
    }
  },
  "required": [
    "provider_slug"
  ],
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "oneOf": [
    {
      "not": {
        "required": [
          "error"
        ]
      },
      "properties": {
        "ok": {
          "const": true
        }
      },
      "required": [
        "data"
      ]
    },
    {
      "not": {
        "required": [
          "data"
        ]
      },
      "properties": {
        "ok": {
          "const": false
        }
      },
      "required": [
        "error"
      ]
    }
  ],
  "properties": {
    "data": {
      "additionalProperties": false,
      "properties": {
        "items": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "business_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "created_at": {
                "type": "string"
              },
              "deal_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "frontend_link": {
                "type": "string"
              },
              "id": {
                "type": "string"
              },
              "kind": {
                "enum": [
                  "group",
                  "direct"
                ],
                "type": "string"
              },
              "last_activity": {
                "type": "string"
              },
              "last_message": {
                "additionalProperties": false,
                "properties": {
                  "attachments": {
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "content_type": {
                          "type": "string"
                        },
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "size": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "size",
                        "content_type"
                      ],
                      "type": "object"
                    },
                    "maxItems": 20,
                    "type": "array"
                  },
                  "author": {
                    "additionalProperties": false,
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "participation_mode": {
                        "enum": [
                          "account",
                          "email",
                          "integration"
                        ],
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "participation_mode"
                    ],
                    "type": "object"
                  },
                  "conversation_id": {
                    "type": "string"
                  },
                  "created_at": {
                    "type": "string"
                  },
                  "deleted_at": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "edited_at": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "id": {
                    "type": "string"
                  },
                  "object": {
                    "enum": [
                      "chat_message"
                    ],
                    "type": "string"
                  },
                  "origin": {
                    "additionalProperties": false,
                    "properties": {
                      "agent_run_id": {
                        "type": [
                          "integer",
                          "string"
                        ]
                      },
                      "portal": {
                        "type": "string"
                      },
                      "provider_name": {
                        "type": "string"
                      },
                      "provider_slug": {
                        "type": "string"
                      },
                      "referrer_name": {
                        "type": "string"
                      },
                      "referrer_profile_slug": {
                        "type": "string"
                      },
                      "request_id": {
                        "type": "string"
                      },
                      "source": {
                        "type": "string"
                      },
                      "tool_name": {
                        "type": "string"
                      }
                    },
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "reply_to_id": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "text": {
                    "type": "string"
                  },
                  "version": {
                    "minimum": 1,
                    "type": "integer"
                  }
                },
                "required": [
                  "id",
                  "object",
                  "conversation_id",
                  "text",
                  "version",
                  "created_at",
                  "edited_at",
                  "deleted_at",
                  "reply_to_id",
                  "author",
                  "origin",
                  "attachments"
                ],
                "type": [
                  "object",
                  "null"
                ]
              },
              "name": {
                "type": "string"
              },
              "object": {
                "enum": [
                  "conversation"
                ],
                "type": "string"
              },
              "unread": {
                "type": "boolean"
              },
              "updated_at": {
                "type": "string"
              },
              "visibility": {
                "enum": [
                  "public",
                  "private"
                ],
                "type": "string"
              }
            },
            "required": [
              "id",
              "object",
              "name",
              "kind",
              "visibility",
              "created_at",
              "updated_at",
              "business_id",
              "deal_id",
              "frontend_link",
              "unread",
              "last_activity",
              "last_message"
            ],
            "type": "object"
          },
          "maxItems": 50,
          "type": "array"
        },
        "next_cursor": {
          "type": [
            "string",
            "null"
          ]
        },
        "unread_count": {
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "items",
        "next_cursor",
        "unread_count"
      ],
      "type": "object"
    },
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "details": {
          "additionalProperties": true,
          "description": "Optional bounded, agent-safe correction or recovery facts.",
          "type": "object"
        },
        "message": {
          "type": "string"
        },
        "retryable": {
          "type": "boolean"
        }
      },
      "required": [
        "code",
        "message",
        "retryable"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        }
      },
      "required": [
        "request_id"
      ],
      "type": "object"
    },
    "ok": {
      "description": "Whether the tool completed successfully.",
      "type": "boolean"
    }
  },
  "required": [
    "ok",
    "meta"
  ],
  "type": "object"
}
```
