---
title: "Read contacts"
description: "Search customers/suppliers or retrieve one contact. Choose operation search or get, then choose kind customer or supplier."
language: en
canonical_url: "https://exac.mx/docs/en/mcp/tools/get_contacts"
md_url: "https://exac.mx/docs/en/mcp/tools/get_contacts.md"
---

# Read contacts

Search customers/suppliers or retrieve one contact. Choose operation search or get, then choose kind customer or supplier.

Tool: `get_contacts`

## Purpose

Search or retrieve customers and suppliers.

### Use when

You need a contact identifier or current customer/supplier details.

### Do not use when

You need to create or update a contact.

| Detail | Value |
| --- | --- |
| Permissions | By input.kind: customer → customers:read; supplier → providers:read |
| Side effects | None |
| Idempotency | Idempotent |

## Input schema

```json
{
  "type": "object",
  "properties": {
    "input": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "operation": {
              "type": "string",
              "const": "search"
            },
            "kind": {
              "$ref": "#/definitions/__schema0"
            },
            "query": {
              "description": "Legal name, RFC, code, or email",
              "allOf": [
                {
                  "$ref": "#/definitions/__schema1"
                }
              ]
            },
            "cursor": {
              "type": "string"
            },
            "limit": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          "required": [
            "operation",
            "kind"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "operation": {
              "type": "string",
              "const": "get"
            },
            "kind": {
              "$ref": "#/definitions/__schema0"
            },
            "contactId": {
              "type": "string"
            }
          },
          "required": [
            "operation",
            "kind",
            "contactId"
          ],
          "additionalProperties": false
        }
      ]
    }
  },
  "required": [
    "input"
  ],
  "$schema": "http://json-schema.org/draft-07/schema#",
  "additionalProperties": false,
  "definitions": {
    "__schema0": {
      "type": "string",
      "enum": [
        "customer",
        "supplier"
      ],
      "description": "customer is a buyer; supplier is a business you pay"
    },
    "__schema1": {
      "type": "string",
      "minLength": 1
    }
  }
}
```

## Output schema

```json
{
  "type": "object",
  "properties": {
    "data": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "contacts": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/__schema0"
              }
            },
            "nextCursor": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "hasMore": {
              "type": "boolean"
            }
          },
          "required": [
            "contacts",
            "nextCursor",
            "hasMore"
          ],
          "additionalProperties": false
        },
        {
          "$ref": "#/definitions/__schema0"
        }
      ]
    },
    "error": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "enum": [
            "validation_error",
            "unauthenticated",
            "forbidden",
            "not_found",
            "method_not_allowed",
            "conflict",
            "idempotency_conflict",
            "operation_in_progress",
            "recovery_required",
            "rate_limited",
            "provider_unavailable",
            "internal"
          ]
        },
        "message": {
          "type": "string"
        },
        "details": {
          "type": "object",
          "properties": {
            "issues": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "path": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        }
                      ]
                    }
                  },
                  "message": {
                    "type": "string"
                  },
                  "code": {
                    "type": "string"
                  }
                },
                "required": [
                  "path",
                  "message"
                ],
                "additionalProperties": false
              }
            },
            "retryable": {
              "type": "boolean"
            },
            "retryAfterSeconds": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            }
          },
          "additionalProperties": false
        }
      },
      "required": [
        "code",
        "message"
      ],
      "additionalProperties": false
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#",
  "additionalProperties": false,
  "definitions": {
    "__schema0": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "contactId": {
              "$ref": "#/definitions/__schema1"
            },
            "legalName": {
              "$ref": "#/definitions/__schema2"
            },
            "code": {
              "$ref": "#/definitions/__schema3"
            },
            "email": {
              "$ref": "#/definitions/__schema4"
            },
            "rfc": {
              "$ref": "#/definitions/__schema5"
            },
            "taxSystem": {
              "$ref": "#/definitions/__schema6"
            },
            "phone": {
              "$ref": "#/definitions/__schema7"
            },
            "address": {
              "$ref": "#/definitions/__schema8"
            },
            "updatedAt": {
              "$ref": "#/definitions/__schema9"
            },
            "kind": {
              "type": "string",
              "const": "customer"
            },
            "cfdiUse": {
              "type": "string"
            },
            "creditEnabled": {
              "type": "boolean"
            },
            "creditByDefault": {
              "type": "boolean"
            },
            "defaultPaymentTermDays": {
              "type": "integer",
              "minimum": 1,
              "maximum": 365
            }
          },
          "required": [
            "contactId",
            "legalName",
            "updatedAt",
            "kind"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "contactId": {
              "$ref": "#/definitions/__schema1"
            },
            "legalName": {
              "$ref": "#/definitions/__schema2"
            },
            "code": {
              "$ref": "#/definitions/__schema3"
            },
            "email": {
              "$ref": "#/definitions/__schema4"
            },
            "rfc": {
              "$ref": "#/definitions/__schema5"
            },
            "taxSystem": {
              "$ref": "#/definitions/__schema6"
            },
            "phone": {
              "$ref": "#/definitions/__schema7"
            },
            "address": {
              "$ref": "#/definitions/__schema8"
            },
            "updatedAt": {
              "$ref": "#/definitions/__schema9"
            },
            "kind": {
              "type": "string",
              "const": "supplier"
            }
          },
          "required": [
            "contactId",
            "legalName",
            "updatedAt",
            "kind"
          ],
          "additionalProperties": false
        }
      ]
    },
    "__schema1": {
      "type": "string",
      "minLength": 1
    },
    "__schema2": {
      "type": "string"
    },
    "__schema3": {
      "type": "string"
    },
    "__schema4": {
      "type": "string"
    },
    "__schema5": {
      "type": "string"
    },
    "__schema6": {
      "type": "string"
    },
    "__schema7": {
      "type": "string"
    },
    "__schema8": {
      "type": "object",
      "properties": {
        "street": {
          "type": "string"
        },
        "exterior": {
          "type": "string"
        },
        "interior": {
          "type": "string"
        },
        "neighborhood": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "municipality": {
          "type": "string"
        },
        "state": {
          "type": "string"
        },
        "postalCode": {
          "type": "string"
        },
        "country": {
          "type": "string"
        }
      },
      "required": [
        "postalCode",
        "country"
      ],
      "additionalProperties": false
    },
    "__schema9": {
      "type": "string",
      "format": "date-time"
    }
  },
  "oneOf": [
    {
      "required": [
        "data"
      ]
    },
    {
      "required": [
        "error"
      ]
    }
  ]
}
```

## Related tools

- [`save_contact`](/docs/en/mcp/tools/save_contact.md) — **Save contact**: Create or update one customer/supplier. Use get_contacts to obtain contactId for updates. Credit fields apply only to customers.

- [`get_accounts`](/docs/en/mcp/tools/get_accounts.md) — **Read accounts**: Search receivable/payable accounts, retrieve one account, or list its ledger movements. Use customerId for receivables and supplierId for payables.

## Related workflow

[See the canonical workflows in the introduction](/docs/en.md)

## Equivalent REST operations

- [`GET /v1/contacts`](/docs/en/api/catalog/contacts/list-contacts.md)

- [`GET /v1/contacts/{contactId}`](/docs/en/api/catalog/contacts/get-contact.md)

Complete documentation: https://exac.mx/docs/en.md
Agent documentation index: https://exac.mx/docs/en/llms.txt
