Servidor MCPHerramientas disponibles
Guardar cotización
Crea una cotización en borrador o actualiza una cotización existente.
Herramienta MCP
save_quotePropósito
Crea una cotización en borrador o actualiza una cotización existente.
- Usar cuando
- Una cotización necesita crearse o editarse.
- No usar cuando
- Necesitas publicarla, cancelarla o registrar su pago.
- Permisos requeridos
- Efectos secundarios
- Modifica datos
- 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": { "oneOf": [ { "type": "object", "properties": { "operation": { "type": "string", "const": "create" }, "customerId": { "$ref": "#/definitions/__schema0" }, "customerName": { "$ref": "#/definitions/__schema1" }, "customerEmail": { "$ref": "#/definitions/__schema2" }, "locationId": { "$ref": "#/definitions/__schema3" }, "validUntil": { "$ref": "#/definitions/__schema4" }, "items": { "$ref": "#/definitions/__schema5" }, "notes": { "$ref": "#/definitions/__schema8" }, "settlementTerms": { "$ref": "#/definitions/__schema9" } }, "required": [ "operation", "validUntil", "items" ], "additionalProperties": false }, { "type": "object", "properties": { "operation": { "type": "string", "const": "update" }, "documentRef": { "type": "string", "pattern": "^quote:.+$" }, "customerId": { "$ref": "#/definitions/__schema0" }, "customerName": { "$ref": "#/definitions/__schema1" }, "customerEmail": { "$ref": "#/definitions/__schema2" }, "locationId": { "$ref": "#/definitions/__schema3" }, "validUntil": { "$ref": "#/definitions/__schema4" }, "items": { "$ref": "#/definitions/__schema5" }, "notes": { "$ref": "#/definitions/__schema8" }, "settlementTerms": { "$ref": "#/definitions/__schema9" } }, "required": [ "operation", "documentRef", "validUntil", "items" ], "additionalProperties": false } ] } }, "required": [ "idempotencyKey", "input" ], "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "definitions": { "__schema0": { "type": "string", "minLength": 1 }, "__schema1": { "type": "string", "minLength": 1, "description": "Recipient name when no stored customer is selected." }, "__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,}$" }, "__schema3": { "type": "string", "minLength": 1 }, "__schema4": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$" }, "__schema5": { "minItems": 1, "maxItems": 50, "type": "array", "items": { "$ref": "#/definitions/__schema6" } }, "__schema6": { "oneOf": [ { "type": "object", "properties": { "kind": { "type": "string", "const": "product" }, "productId": { "type": "string", "minLength": 1 }, "quantity": { "type": "number", "exclusiveMinimum": 0 }, "discount": { "$ref": "#/definitions/__schema7" } }, "required": [ "kind", "productId", "quantity" ], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "custom" }, "description": { "type": "string", "minLength": 1 }, "quantity": { "type": "number", "exclusiveMinimum": 0 }, "unitPrice": { "type": "number", "exclusiveMinimum": 0 }, "discount": { "$ref": "#/definitions/__schema7" }, "satProductCode": { "type": "string", "minLength": 1 }, "satUnitCode": { "type": "string", "minLength": 1 }, "unitName": { "type": "string", "minLength": 1 }, "taxIncluded": { "type": "boolean" }, "taxability": { "type": "string", "enum": [ "standard", "zero", "exempt" ] }, "taxRate": { "type": "number", "minimum": 0, "maximum": 1 } }, "required": [ "kind", "description", "quantity", "unitPrice", "satProductCode" ], "additionalProperties": false } ] }, "__schema7": { "type": "number", "minimum": 0 }, "__schema8": { "type": "string" }, "__schema9": { "type": "object", "properties": { "installmentCount": { "type": "integer", "minimum": 1, "maximum": 60 }, "firstDue": { "oneOf": [ { "type": "object", "properties": { "kind": { "type": "string", "const": "transaction_date" } }, "required": [ "kind" ], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "months_after_transaction" }, "months": { "type": "integer", "minimum": 1, "maximum": 60 } }, "required": [ "kind", "months" ], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "fixed_date" }, "date": { "type": "string" } }, "required": [ "kind", "date" ], "additionalProperties": false } ] }, "recurrence": { "oneOf": [ { "type": "object", "properties": { "kind": { "type": "string", "const": "anchor_day" } }, "required": [ "kind" ], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "day_of_month" }, "day": { "type": "integer", "minimum": 1, "maximum": 31 } }, "required": [ "kind", "day" ], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "last_day" } }, "required": [ "kind" ], "additionalProperties": false } ] } }, "required": [ "installmentCount", "firstDue", "recurrence" ], "additionalProperties": false } }}Esquema de salida
JSON Schema{ "type": "object", "properties": { "data": { "type": "object", "properties": { "documentRef": { "type": "string", "pattern": "^quote:.+$" }, "status": { "type": "string", "enum": [ "draft", "sent", "accepted", "converted", "expired", "canceled" ] } }, "required": [ "documentRef", "status" ], "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" ] } ]}