Servidor MCPHerramientas disponibles
Enviar documento
Entrega un CFDI, retención, recibo de venta o cotización a un destinatario.
Herramienta MCP
send_documentPropósito
Entrega un CFDI, retención, recibo de venta o cotización a un destinatario.
- Usar cuando
- Un documento está listo para enviarse a su destinatario.
- No usar cuando
- Sigue en borrador o el archivo solicitado no es compatible.
- Permisos requeridos
- Efectos secundarios
- Efecto externo
- Idempotencia
- Idempotente
Esquema de entrada
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": { "documentRef": { "type": "string", "pattern": "^(cfdi|withholding):.+$", "description": "Fiscal documentRef returned by search_documents" }, "content": { "description": "Attachment set to send; defaults to document", "allOf": [ { "$ref": "#/definitions/__schema0" } ] }, "recipient": { "$ref": "#/definitions/__schema1" } }, "required": [ "documentRef" ], "additionalProperties": false }, { "type": "object", "properties": { "documentRef": { "type": "string", "pattern": "^(sales_receipt|quote):.+$", "description": "DocumentRef returned by search_documents" }, "content": { "type": "string", "const": "document" }, "recipient": { "$ref": "#/definitions/__schema1" } }, "required": [ "documentRef" ], "additionalProperties": false } ] } }, "required": [ "idempotencyKey", "input" ], "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "definitions": { "__schema0": { "type": "string", "enum": [ "document", "cancellation_receipt" ] }, "__schema1": { "description": "Recipient override; defaults to the saved receptor email", "allOf": [ { "$ref": "#/definitions/__schema2" } ] }, "__schema2": { "type": "string", "format": "email", "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" } }}Esquema de salida
JSON Schema{ "type": "object", "properties": { "data": { "type": "object", "properties": { "documentRef": { "type": "string" }, "content": { "type": "string", "enum": [ "document", "cancellation_receipt" ] }, "recipient": { "type": "string" }, "sent": { "type": "boolean", "const": true } }, "required": [ "documentRef", "content", "recipient", "sent" ], "additionalProperties": false }, "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, "oneOf": [ { "required": [ "data" ] }, { "required": [ "error" ] } ]}