Create client
Add a client to the catalog with RFC, name, CFDI use, tax zip code and fiscal regime.
MCP tool facturama_write → create_client
write
Saves a client and returns its client_id. It reaches no one and issues nothing, and a wrong entry is fixed in Facturama, so it does not ask for confirmation.
Parameters
| Name | Type | Description |
|---|---|---|
| rfc string required | string | Client RFC. |
| name string required | string | Legal name as registered with the SAT. |
| cfdi_use string required | string | CFDI use code, for example G03. |
| tax_zip_code string required | string | Tax zip code of the client. |
| fiscal_regime string required | string | Fiscal regime code of the client. |
| email string | string | Address that email_invoice uses by default. |
tools/call
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "facturama_write",
"arguments": {
"operation": "create_client",
"arguments": {
"rfc": "rfc",
"name": "Jane Doe",
"cfdi_use": "cfdi use",
"tax_zip_code": "tax zip code",
"fiscal_regime": "fiscal regime"
}
}
}
} Example response
{
"content": [
{
"type": "text",
"text": "{ ... same JSON as structuredContent ... }"
}
],
"structuredContent": {
"client_id": "cl_4822",
"rfc": "XAXX010101000",
"name": "Clinica Alba SC",
"cfdi_use": "G03",
"tax_zip_code": "03100",
"fiscal_regime": "612",
"email": "pagos@clinicaalba.example"
},
"isError": false
}