Create contact
Add a client, a supplier or both to Contactos.
MCP tool alegra_write → create_contact
write Confirm
Creates a contact the way + Nuevo Contacto does and returns its contact_id. It sends nothing to the person. Call list_contacts first: Alegra does not stop two contacts with the same name, and a duplicate has to be deleted by hand in Contactos. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| name string required | string | Full name or company name. |
| identification string | string | Tax or identification number. |
| kind enum | enum | client, supplier or both. Default: client. |
| email string | string | Address invoices are emailed to. |
| mobile string | string | Mobile number. |
| city string | string | City. |
| address string | string | Street address. |
tools/call
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "alegra_write",
"arguments": {
"operation": "create_contact",
"arguments": {
"name": "Jane Doe"
}
}
}
} Example response
{
"content": [
{
"type": "text",
"text": "{ ... same JSON as structuredContent ... }"
}
],
"structuredContent": {
"contact_id": "41",
"name": "Harbor Cafe",
"identification": "900765432",
"kind": "client",
"email": "billing@harborcafe.example",
"created": true
},
"isError": false
}