# list_records

List companies, people or deals, most recently changed first, with who changed each one last. Filter by text, deal stage or company. Use `search` instead to find one record across all types.

| | |
| --- | --- |
| Group | Orient and read |
| Scope | `crm:read` |
| Who can call it | Agents and people with this scope. |
| Kind | Read-only (MCP annotation `readOnlyHint: true`). |
| Retries | Safe to repeat. |
| Widget | In hosts that support MCP Apps, the result shows a record list. |

## Parameters

| Parameter | Type | Required | Notes |
| --- | --- | --- | --- |
| `type` | `company` \\| `person` \\| `deal` | yes |  |
| `query` | string | no | Matches name, domain, email or title. |
| `stage` | `lead` \\| `qualified` \\| `proposal` \\| `negotiation` \\| `won` \\| `lost` | no | Deals only. |
| `company_id` | id (uuid) | no | People and deals only: those linked to this company. |
| `limit` | integer | no | default 25, 1–100 |
| `cursor` | string | no | `next_cursor` from the previous page. |

## Call it over MCP

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list_records",
    "arguments": {
      "type": "company"
    }
  }
}
```

Send it to `https://api.tandemcrm.app/mcp` (streamable HTTP). Most people never write this by hand: their agent picks the tool from its description.

## Call it over REST

```bash
curl -X POST https://api.tandemcrm.app/v1/ops/list_records \
  -H "Authorization: Bearer $TANDEM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"type":"company"}'
```

## Input schema

The JSON Schema the MCP server advertises for this tool:

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "company",
        "person",
        "deal"
      ]
    },
    "query": {
      "description": "Matches name, domain, email or title.",
      "type": "string"
    },
    "stage": {
      "description": "Deals only.",
      "type": "string",
      "enum": [
        "lead",
        "qualified",
        "proposal",
        "negotiation",
        "won",
        "lost"
      ]
    },
    "company_id": {
      "description": "People and deals only: those linked to this company.",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "limit": {
      "default": 25,
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "cursor": {
      "description": "`next_cursor` from the previous page.",
      "type": "string"
    }
  },
  "required": [
    "type"
  ]
}
```
