# List user account memberships

`user_accounts.list_memberships`

List one account's direct Business, Provider, or Management Group memberships and exact roles. First call user_accounts.list and pass an exact returned user_ref.

[Accounts guide](https://docs.levr.ai/mcp/resources/user_accounts.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.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "cursor": {
      "anyOf": [
        {
          "description": "Opaque next_cursor from the preceding page with the same query.",
          "maxLength": 4096,
          "minLength": 1,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Opaque next_cursor from the preceding page with the same query."
    },
    "ordering": {
      "default": "name",
      "description": "Comma-separated ordering fields. Prefix a field with - for descending order. Allowed fields: name.",
      "maxLength": 255,
      "minLength": 1,
      "pattern": "^-?(?:name)(?:,-?(?:name)){0,2}$",
      "type": "string"
    },
    "page_size": {
      "default": 20,
      "description": "Maximum items to return. The allowed range is 1 through 50.",
      "maximum": 50,
      "minimum": 1,
      "type": "integer"
    },
    "resource_type": {
      "enum": [
        "businesses",
        "providers",
        "management_groups"
      ],
      "type": "string"
    },
    "user_ref": {
      "maxLength": 512,
      "minLength": 1,
      "type": "string"
    }
  },
  "required": [
    "user_ref",
    "resource_type"
  ],
  "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": {
          "description": "Resources in this page.",
          "items": {
            "additionalProperties": false,
            "properties": {
              "resource_id": {
                "type": "string"
              },
              "resource_name": {
                "type": "string"
              },
              "resource_type": {
                "enum": [
                  "businesses",
                  "providers",
                  "management_groups"
                ],
                "type": "string"
              },
              "roles": {
                "items": {
                  "type": "string"
                },
                "maxItems": 10,
                "type": "array"
              }
            },
            "required": [
              "resource_type",
              "resource_id",
              "resource_name",
              "roles"
            ],
            "type": "object"
          },
          "type": "array"
        },
        "next_cursor": {
          "anyOf": [
            {
              "description": "Opaque cursor for the next page, or null when this is the final page.",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Opaque cursor for the next page, or null when this is the final page."
        }
      },
      "required": [
        "items",
        "next_cursor"
      ],
      "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"
}
```
