---
title: "Leer contactos"
description: "Busca contactos y consulta un contacto específico de la organización."
language: es-MX
canonical_url: "https://exac.mx/docs/mcp/tools/get_contacts"
md_url: "https://exac.mx/docs/mcp/tools/get_contacts.md"
---

# Leer contactos

Busca contactos y consulta un contacto específico de la organización.

Herramienta: `get_contacts`

## Propósito

Busca contactos y consulta un contacto específico de la organización.

### Úsala cuando

Necesitas el identificador o los datos actuales de un contacto.

### No la uses cuando

Necesitas crear o actualizar un contacto.

| Detalle | Valor |
| --- | --- |
| Permisos | Según input.kind: customer → customers:read; supplier → providers:read |
| Efectos secundarios | Ninguno |
| Idempotencia | Idempotente |

## Esquema de entrada

```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
    }
  }
}
```

## Esquema de salida

```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"
      ]
    }
  ]
}
```

## Herramientas relacionadas

- [`save_contact`](/docs/mcp/tools/save_contact.md) — **Guardar contacto**: Crea o actualiza un cliente o proveedor de la organización.

- [`get_accounts`](/docs/mcp/tools/get_accounts.md) — **Leer cuentas**: Busca cuentas por cobrar o por pagar y consulta sus movimientos.

## Flujo relacionado

[Consulta los flujos canónicos en la introducción](/docs.md)

## Operaciones REST equivalentes

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

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

Documentación completa: https://exac.mx/docs.md
Índice para agentes: https://exac.mx/docs/llms.txt
