Servidor MCPHerramientas disponibles
Buscar documentos
Busca una familia de documentos usando referencias públicas estables.
Herramienta MCP
search_documentsPropósito
Busca una familia de documentos usando referencias públicas estables.
- Usar cuando
- Necesitas encontrar un documento antes de leerlo o cambiarlo.
- No usar cuando
- Buscas productos, cuentas o configuración.
- Permisos requeridos
- Efectos secundarios
- Ninguno
- Idempotencia
- Idempotente
Esquema de entrada
JSON Schema{ "type": "object", "properties": { "input": { "oneOf": [ { "type": "object", "properties": { "category": { "type": "string", "const": "cfdi" }, "kind": { "type": "string", "enum": [ "income", "credit_note", "transfer", "payment_complement", "payroll" ] }, "direction": { "type": "string", "enum": [ "issued", "received" ] }, "status": { "type": "string", "enum": [ "draft", "valid", "canceled" ] }, "paymentTiming": { "type": "string", "enum": [ "single_payment", "deferred_or_installments" ] }, "outstanding": { "type": "boolean", "const": true }, "dateFrom": { "$ref": "#/definitions/__schema0" }, "dateTo": { "$ref": "#/definitions/__schema1" }, "query": { "$ref": "#/definitions/__schema2" }, "cursor": { "$ref": "#/definitions/__schema3" }, "limit": { "$ref": "#/definitions/__schema4" } }, "required": [ "category" ], "additionalProperties": false }, { "type": "object", "properties": { "category": { "type": "string", "const": "withholding" }, "direction": { "type": "string", "enum": [ "issued", "received" ] }, "status": { "type": "string", "enum": [ "draft", "valid", "canceled" ] }, "dateFrom": { "$ref": "#/definitions/__schema0" }, "dateTo": { "$ref": "#/definitions/__schema1" }, "query": { "$ref": "#/definitions/__schema2" }, "cursor": { "$ref": "#/definitions/__schema3" }, "limit": { "$ref": "#/definitions/__schema4" } }, "required": [ "category" ], "additionalProperties": false }, { "type": "object", "properties": { "category": { "type": "string", "const": "sales_receipt" }, "status": { "type": "string", "enum": [ "open", "invoiced", "global_invoiced", "canceled" ] }, "dateFrom": { "$ref": "#/definitions/__schema0" }, "dateTo": { "$ref": "#/definitions/__schema1" }, "query": { "$ref": "#/definitions/__schema2" }, "cursor": { "$ref": "#/definitions/__schema3" }, "limit": { "$ref": "#/definitions/__schema4" } }, "required": [ "category" ], "additionalProperties": false }, { "type": "object", "properties": { "category": { "type": "string", "const": "quote" }, "query": { "type": "string", "minLength": 1 }, "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 50 } }, "required": [ "category" ], "additionalProperties": false }, { "type": "object", "properties": { "category": { "type": "string", "const": "expense" }, "settlementMode": { "type": "string", "enum": [ "credit", "paid" ] }, "dateFrom": { "$ref": "#/definitions/__schema0" }, "dateTo": { "$ref": "#/definitions/__schema1" }, "query": { "$ref": "#/definitions/__schema2" }, "cursor": { "$ref": "#/definitions/__schema3" }, "limit": { "$ref": "#/definitions/__schema4" } }, "required": [ "category" ], "additionalProperties": false }, { "type": "object", "properties": { "category": { "type": "string", "const": "declaration" }, "fiscalYear": { "type": "integer", "minimum": 2000, "maximum": 2100 }, "query": { "type": "string", "minLength": 1 }, "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 50 } }, "required": [ "category", "fiscalYear" ], "additionalProperties": false }, { "type": "object", "properties": { "category": { "type": "string", "const": "tax_compliance_opinion" }, "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 50 } }, "required": [ "category" ], "additionalProperties": false }, { "type": "object", "properties": { "category": { "type": "string", "const": "sales_receipt_refund" }, "status": { "type": "string", "enum": [ "pending", "processing", "completed", "failed", "recovery_required", "canceled" ] }, "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 50 } }, "required": [ "category" ], "additionalProperties": false } ] } }, "required": [ "input" ], "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "definitions": { "__schema0": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, "__schema1": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, "__schema2": { "type": "string", "minLength": 1 }, "__schema3": { "type": "string" }, "__schema4": { "type": "integer", "minimum": 1, "maximum": 50 } }}Contrato de salida en vivo
JSON Schema{ "type": "object", "properties": { "data": { "type": "object", "properties": { "documents": { "type": "array", "items": { "type": "object", "properties": { "documentRef": { "type": "string" }, "category": { "type": "string", "enum": [ "cfdi", "withholding", "sales_receipt", "quote", "expense", "declaration", "tax_compliance_opinion", "sales_receipt_refund" ] }, "status": { "type": "string" }, "direction": { "type": "string", "enum": [ "issued", "received" ] }, "counterpartyName": { "type": "string" }, "total": { "type": "object", "properties": { "amount": { "type": "number" }, "currency": { "type": "string" } }, "required": [ "amount", "currency" ], "additionalProperties": false } }, "required": [ "documentRef", "category" ], "additionalProperties": true } }, "nextCursor": { "type": [ "string", "null" ] }, "hasMore": { "type": "boolean" } }, "required": [ "documents", "nextCursor", "hasMore" ], "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" ] } ]}Esquema de salida canónico
JSON Schema{ "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "data": { "type": "object", "properties": { "documents": { "type": "array", "items": { "anyOf": [ { "type": "object", "properties": { "documentRef": { "$ref": "#/definitions/__schema0" }, "counterpartyName": { "$ref": "#/definitions/__schema1" }, "total": { "$ref": "#/definitions/__schema2" }, "category": { "type": "string", "const": "cfdi" }, "direction": { "type": "string", "enum": [ "issued", "received" ] }, "status": { "type": "string", "enum": [ "draft", "valid", "canceled" ] }, "archived": { "type": "boolean" }, "uuid": { "type": "string" }, "issuedLocalDateTime": { "allOf": [ { "$ref": "#/definitions/__schema3" } ] }, "kind": { "type": "string", "enum": [ "income", "credit_note", "transfer", "payment_complement", "payroll" ] }, "cfdiType": { "type": "string", "enum": [ "I", "E", "T", "N", "P" ] }, "employeeId": { "type": "string" } }, "required": [ "documentRef", "category", "direction", "status", "archived", "kind", "cfdiType" ], "additionalProperties": false }, { "type": "object", "properties": { "documentRef": { "$ref": "#/definitions/__schema0" }, "counterpartyName": { "$ref": "#/definitions/__schema1" }, "total": { "$ref": "#/definitions/__schema2" }, "category": { "type": "string", "const": "withholding" }, "direction": { "type": "string", "enum": [ "issued", "received" ] }, "status": { "type": "string", "enum": [ "draft", "valid", "canceled" ] }, "archived": { "type": "boolean" }, "uuid": { "type": "string" }, "issuedLocalDateTime": { "allOf": [ { "$ref": "#/definitions/__schema3" } ] } }, "required": [ "documentRef", "category", "direction", "status", "archived" ], "additionalProperties": false }, { "type": "object", "properties": { "documentRef": { "$ref": "#/definitions/__schema0" }, "counterpartyName": { "$ref": "#/definitions/__schema1" }, "total": { "$ref": "#/definitions/__schema2" }, "category": { "type": "string", "const": "sales_receipt" }, "status": { "type": "string", "enum": [ "open", "invoiced", "global_invoiced", "canceled" ] }, "businessDate": { "$ref": "#/definitions/__schema4" }, "createdAt": { "$ref": "#/definitions/__schema5" } }, "required": [ "documentRef", "category", "status", "businessDate", "createdAt" ], "additionalProperties": false }, { "type": "object", "properties": { "documentRef": { "$ref": "#/definitions/__schema0" }, "counterpartyName": { "$ref": "#/definitions/__schema1" }, "total": { "$ref": "#/definitions/__schema2" }, "category": { "type": "string", "const": "quote" }, "status": { "type": "string", "enum": [ "draft", "sent", "accepted", "converted", "expired", "canceled" ] }, "issueDate": { "$ref": "#/definitions/__schema4" }, "validUntil": { "$ref": "#/definitions/__schema4" } }, "required": [ "documentRef", "category", "status", "issueDate", "validUntil" ], "additionalProperties": false }, { "type": "object", "properties": { "documentRef": { "$ref": "#/definitions/__schema0" }, "counterpartyName": { "$ref": "#/definitions/__schema1" }, "total": { "$ref": "#/definitions/__schema2" }, "category": { "type": "string", "const": "expense" }, "businessDate": { "$ref": "#/definitions/__schema4" }, "occurredAt": { "$ref": "#/definitions/__schema5" }, "settlementMode": { "type": "string", "enum": [ "credit", "paid" ] } }, "required": [ "documentRef", "category", "businessDate", "occurredAt", "settlementMode" ], "additionalProperties": false }, { "type": "object", "properties": { "documentRef": { "$ref": "#/definitions/__schema0" }, "counterpartyName": { "$ref": "#/definitions/__schema1" }, "total": { "$ref": "#/definitions/__schema2" }, "category": { "type": "string", "const": "declaration" }, "fiscalYear": { "type": "number" }, "period": { "type": "number" }, "filedAt": { "$ref": "#/definitions/__schema4" }, "status": { "type": "string" } }, "required": [ "documentRef", "category", "fiscalYear", "period", "filedAt" ], "additionalProperties": false }, { "type": "object", "properties": { "documentRef": { "$ref": "#/definitions/__schema0" }, "counterpartyName": { "$ref": "#/definitions/__schema1" }, "total": { "$ref": "#/definitions/__schema2" }, "category": { "type": "string", "const": "tax_compliance_opinion" }, "status": { "type": "string", "enum": [ "positive", "negative", "unknown" ] }, "issuedLocalDateTime": { "$ref": "#/definitions/__schema3" }, "retrievedAt": { "$ref": "#/definitions/__schema5" } }, "required": [ "documentRef", "category", "status", "issuedLocalDateTime", "retrievedAt" ], "additionalProperties": false }, { "type": "object", "properties": { "documentRef": { "$ref": "#/definitions/__schema0" }, "counterpartyName": { "$ref": "#/definitions/__schema1" }, "total": { "$ref": "#/definitions/__schema2" }, "category": { "type": "string", "const": "sales_receipt_refund" }, "status": { "type": "string", "enum": [ "pending", "processing", "completed", "failed", "recovery_required", "canceled" ] }, "businessDate": { "allOf": [ { "$ref": "#/definitions/__schema4" } ] }, "createdAt": { "$ref": "#/definitions/__schema5" } }, "required": [ "documentRef", "category", "status", "createdAt" ], "additionalProperties": false } ] } }, "nextCursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "hasMore": { "type": "boolean" } }, "required": [ "documents", "nextCursor", "hasMore" ], "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 } }, "additionalProperties": false, "definitions": { "__schema0": { "type": "string", "pattern": "^(cfdi|withholding|sales_receipt|quote|expense|declaration|tax_compliance_opinion|sales_receipt_refund):.+$" }, "__schema1": { "type": "string" }, "__schema2": { "type": "object", "properties": { "amount": { "type": "number" }, "currency": { "type": "string" } }, "required": [ "amount", "currency" ], "additionalProperties": false }, "__schema3": { "type": "string", "pattern": "^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d{1,9}))?$" }, "__schema4": { "type": "string", "format": "date" }, "__schema5": { "type": "string", "format": "date-time" } }, "oneOf": [ { "required": [ "data" ] }, { "required": [ "error" ] } ]}