MCP serverAvailable tools
Save contact
Create or update a customer or supplier.
MCP tool
save_contactPurpose
- Use when
- A contact record must be added or changed.
- Do not use when
- You need to remove a contact or only read contact data.
- Required permissions
- Side effects
- Writes data
- Idempotency
- Idempotent
Input schema
JSON Schema{ "type": "object", "properties": { "idempotencyKey": { "type": "string", "minLength": 1, "maxLength": 200, "description": "Unique retry key for this exact operation. Reuse it only when retrying the same request." }, "input": { "anyOf": [ { "type": "object", "properties": { "operation": { "const": "create" }, "kind": { "const": "customer" }, "legalName": { "$ref": "#/definitions/__schema2" }, "email": { "$ref": "#/definitions/__schema3" }, "rfc": { "$ref": "#/definitions/__schema4" }, "code": { "$ref": "#/definitions/__schema6" }, "taxSystem": { "$ref": "#/definitions/__schema7" }, "phone": { "$ref": "#/definitions/__schema8" }, "address": { "$ref": "#/definitions/__schema9" }, "cfdiUse": { "allOf": [ { "$ref": "#/definitions/__schema20" } ] }, "creditEnabled": { "type": "boolean" }, "creditByDefault": { "type": "boolean" }, "defaultPaymentTermDays": { "allOf": [ { "$ref": "#/definitions/__schema24" } ] } }, "required": [ "operation", "kind", "legalName" ], "additionalProperties": false }, { "type": "object", "properties": { "operation": { "const": "update" }, "contactId": { "type": "string" }, "legalName": { "allOf": [ { "$ref": "#/definitions/__schema2" } ] }, "email": { "allOf": [ { "$ref": "#/definitions/__schema3" } ] }, "rfc": { "allOf": [ { "$ref": "#/definitions/__schema4" } ] }, "code": { "allOf": [ { "$ref": "#/definitions/__schema6" } ] }, "taxSystem": { "allOf": [ { "$ref": "#/definitions/__schema7" } ] }, "phone": { "allOf": [ { "$ref": "#/definitions/__schema8" } ] }, "address": { "allOf": [ { "$ref": "#/definitions/__schema9" } ] }, "cfdiUse": { "allOf": [ { "$ref": "#/definitions/__schema20" } ] }, "creditEnabled": { "type": "boolean" }, "creditByDefault": { "type": "boolean" }, "defaultPaymentTermDays": { "anyOf": [ { "$ref": "#/definitions/__schema24" }, { "type": "null" } ] }, "kind": { "const": "customer" } }, "required": [ "operation", "contactId", "kind" ], "additionalProperties": false }, { "type": "object", "properties": { "operation": { "const": "create" }, "kind": { "const": "supplier" }, "legalName": { "$ref": "#/definitions/__schema2" }, "email": { "$ref": "#/definitions/__schema3" }, "rfc": { "$ref": "#/definitions/__schema4" }, "code": { "$ref": "#/definitions/__schema6" }, "taxSystem": { "$ref": "#/definitions/__schema7" }, "phone": { "$ref": "#/definitions/__schema8" }, "address": { "$ref": "#/definitions/__schema9" } }, "required": [ "operation", "kind", "legalName" ], "additionalProperties": false }, { "type": "object", "properties": { "operation": { "const": "update" }, "contactId": { "type": "string" }, "legalName": { "allOf": [ { "$ref": "#/definitions/__schema2" } ] }, "email": { "allOf": [ { "$ref": "#/definitions/__schema3" } ] }, "rfc": { "allOf": [ { "$ref": "#/definitions/__schema4" } ] }, "code": { "allOf": [ { "$ref": "#/definitions/__schema6" } ] }, "taxSystem": { "allOf": [ { "$ref": "#/definitions/__schema7" } ] }, "phone": { "allOf": [ { "$ref": "#/definitions/__schema8" } ] }, "address": { "allOf": [ { "$ref": "#/definitions/__schema9" } ] }, "kind": { "const": "supplier" } }, "required": [ "operation", "contactId", "kind" ], "additionalProperties": false } ] } }, "required": [ "idempotencyKey", "input" ], "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "definitions": { "__schema2": { "type": "string" }, "__schema3": { "type": "string" }, "__schema4": { "allOf": [ { "type": "string" } ] }, "__schema6": { "type": "string" }, "__schema7": { "enum": [ "601", "603", "605", "606", "607", "608", "610", "611", "612", "614", "615", "616", "620", "621", "622", "623", "624", "625", "626" ], "description": "Known SAT tax-system code.", "x-exac-sat-catalog": "tax-systems" }, "__schema8": { "type": "string" }, "__schema9": { "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 }, "__schema20": { "enum": [ "CN01", "CP01", "D01", "D02", "D03", "D04", "D05", "D06", "D07", "D08", "D09", "D10", "G01", "G02", "G03", "I01", "I02", "I03", "I04", "I05", "I06", "I07", "I08", "S01" ], "description": "Known SAT CFDI-use code.", "x-exac-sat-catalog": "cfdi-uses" }, "__schema24": { "type": "integer", "minimum": 1, "maximum": 365 } }}Output schema
JSON Schema{ "type": "object", "properties": { "data": { "oneOf": [ { "type": "object", "properties": { "contactId": { "$ref": "#/definitions/__schema0" }, "legalName": { "$ref": "#/definitions/__schema1" }, "code": { "$ref": "#/definitions/__schema2" }, "email": { "$ref": "#/definitions/__schema3" }, "rfc": { "$ref": "#/definitions/__schema4" }, "taxSystem": { "$ref": "#/definitions/__schema5" }, "phone": { "$ref": "#/definitions/__schema6" }, "address": { "$ref": "#/definitions/__schema7" }, "updatedAt": { "$ref": "#/definitions/__schema17" }, "kind": { "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/__schema0" }, "legalName": { "$ref": "#/definitions/__schema1" }, "code": { "$ref": "#/definitions/__schema2" }, "email": { "$ref": "#/definitions/__schema3" }, "rfc": { "$ref": "#/definitions/__schema4" }, "taxSystem": { "$ref": "#/definitions/__schema5" }, "phone": { "$ref": "#/definitions/__schema6" }, "address": { "$ref": "#/definitions/__schema7" }, "updatedAt": { "$ref": "#/definitions/__schema17" }, "kind": { "const": "supplier" } }, "required": [ "contactId", "legalName", "updatedAt", "kind" ], "additionalProperties": false } ] }, "error": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "code": { "enum": [ "validation_error", "unauthenticated", "forbidden", "payment_required", "not_found", "method_not_allowed", "conflict", "idempotency_conflict", "operation_in_progress", "recovery_required", "migration_required", "rate_limited", "provider_unavailable", "internal" ] }, "message": { "type": "string" }, "details": { "type": "object", "properties": { "document": { "type": "object", "properties": { "documentRef": { "type": "string", "pattern": "^(invoice|withholding|sales_receipt|declaration|tax_compliance_opinion|sales_receipt_refund):.+$" }, "editable": { "type": "boolean" } }, "required": [ "documentRef", "editable" ], "additionalProperties": false }, "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 }, "reason": { "type": "string" }, "balanceMinor": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "topUpUrl": { "type": "string" } }, "additionalProperties": false } }, "required": [ "code", "message" ], "additionalProperties": false } }, "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "definitions": { "__schema0": { "type": "string", "minLength": 1 }, "__schema1": { "type": "string" }, "__schema2": { "type": "string" }, "__schema3": { "type": "string" }, "__schema4": { "type": "string" }, "__schema5": { "type": "string" }, "__schema6": { "type": "string" }, "__schema7": { "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 }, "__schema17": { "type": "string", "format": "date-time" } }, "oneOf": [ { "required": [ "data" ] }, { "required": [ "error" ] } ]}