> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superleap.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List MCP Tool Logs

> Returns paginated MCP tool call logs for the authenticated org.

## Overview

<Info>
  **Superadmin access only.** This endpoint is restricted to users with the Superadmin role. Other users will receive a permission error even with a valid Bearer token.
</Info>

Returns MCP tool call logs scoped to the authenticated organisation. The server controls the batch size — it starts at 200 records and grows by 200 on each subsequent page up to a maximum of 3000, with a 4MB payload cap. Do not pass a limit.

## Authentication

Bearer token (org-scoped via OAuth2).

## Request Body

<ParamField body="pointer" type="string">
  Base64-encoded pagination cursor. Pass the value of `data.next` from the previous response exactly as received. Omit on the first request.
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  `true` when the request succeeds.
</ResponseField>

<ResponseField name="data" type="object">
  <Expandable title="data fields">
    <ResponseField name="logs" type="array">
      List of MCP tool call log records, ordered by `tool_call_timestamp DESC`, `id DESC`.

      <Expandable title="log fields">
        <ResponseField name="id" type="string">UUID identifying the log entry.</ResponseField>
        <ResponseField name="user_id" type="string">User who triggered the tool call.</ResponseField>
        <ResponseField name="tool_name" type="string">Name of the MCP tool invoked.</ResponseField>
        <ResponseField name="input_params" type="object">Parameters passed to the tool.</ResponseField>
        <ResponseField name="response_time" type="number">Time taken to respond in milliseconds.</ResponseField>
        <ResponseField name="response_code" type="number">HTTP response code returned by the tool.</ResponseField>
        <ResponseField name="tool_call_timestamp" type="number">Unix timestamp in milliseconds when the tool was called.</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="next" type="string | null">
      Base64-encoded cursor for the next page. Pass this back as `pointer` in the next request. `null` means no more records.
    </ResponseField>
  </Expandable>
</ResponseField>

## Pagination

Cursor-based. Treat `pointer` as opaque — pass the base64 string back exactly as received from `data.next`, do not decode or construct it manually.

| Page           | Server fetch limit             |
| -------------- | ------------------------------ |
| 1 (no pointer) | 200                            |
| 2              | prev `number_of_records` + 200 |
| N              | capped at 3000                 |

## Examples

<CodeGroup>
  ```json First request theme={null}
  POST /api/v1/org/tool/mcp/logs/list/
  Authorization: Bearer <token>

  {}
  ```

  ```json Subsequent request theme={null}
  POST /api/v1/org/tool/mcp/logs/list/
  Authorization: Bearer <token>

  {
    "pointer": "eyJ0b29sX2NhbGxfdGltZXN0YW1wIjoxNzc3Mjc4NDk5Njc0LCJpZCI6IjdjNzVmODMzLTE0MDEtNDhmNC1hMDJjLTMxZmNiMGYyZWMxMCIsIm51bWJlcl9vZl9yZWNvcmRzIjo5NX0="
  }
  ```
</CodeGroup>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "data": {
      "logs": [
        {
          "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
          "user_id": "xxxxxx_xxxxxxxxxxx",
          "tool_name": "list_objects",
          "input_params": {
            "limit": 10,
            "query": ["interested"],
            "offset": 0
          },
          "response_time": 293,
          "response_code": 200,
          "tool_call_timestamp": 1778069821184
        },
        {
          "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
          "user_id": "xxxxxx_xxxxxxxxxxx",
          "tool_name": "execute_query",
          "input_params": {
            "query": "SELECT id, name FROM lead ORDER BY created_at DESC LIMIT 10",
            "object_slug": "lead"
          },
          "response_time": 211,
          "response_code": 200,
          "tool_call_timestamp": 1778057347278
        }
      ],
      "next": "eyJ0b29sX2NhbGxfdGltZXN0YW1wIjoxNzc3Mjc4NDk5Njc0LCJpZCI6IjdjNzVmODMzLTE0MDEtNDhmNC1hMDJjLTMxZmNiMGYyZWMxMCIsIm51bWJlcl9vZl9yZWNvcmRzIjo5NX0="
    }
  }
  ```
</ResponseExample>
