{
  "notice": "bxzxxr MCP archive: a record of what public MCP servers declared when we listed them (we never call their tools). It is data, not a rating: nothing here says a server is safe, secure, verified or trustworthy, and a server can change after we looked. Secrets we detected are redacted; redacted tool lists are withheld and only their hash is shown.",
  "infrastructure": {
    "host": "bsale.usefulapi.io",
    "site": "usefulapi.io",
    "addresses": [
      {
        "address": "104.21.62.184",
        "endpoints": 962,
        "shared_infrastructure": true,
        "network": {
          "asn": 13335,
          "name": "CLOUDFLARENET - Cloudflare, Inc.",
          "prefix": "104.21.32.0/19",
          "country": "US"
        }
      },
      {
        "address": "172.67.138.37",
        "endpoints": 962,
        "shared_infrastructure": true,
        "network": {
          "asn": 13335,
          "name": "CLOUDFLARENET - Cloudflare, Inc.",
          "prefix": "172.67.128.0/20",
          "country": "US"
        }
      },
      {
        "address": "2606:4700:3030::ac43:8a25",
        "endpoints": 962,
        "shared_infrastructure": true,
        "network": {
          "asn": 13335,
          "name": "CLOUDFLARENET - Cloudflare, Inc.",
          "prefix": "2606:4700:3030::/48",
          "country": "US"
        }
      },
      {
        "address": "2606:4700:3032::6815:3eb8",
        "endpoints": 962,
        "shared_infrastructure": true,
        "network": {
          "asn": 13335,
          "name": "CLOUDFLARENET - Cloudflare, Inc.",
          "prefix": "2606:4700:3032::/48",
          "country": "US"
        }
      }
    ],
    "addresses_recorded": true,
    "address_history": [
      {
        "addresses": [
          "104.21.62.184",
          "172.67.138.37",
          "2606:4700:3030::ac43:8a25",
          "2606:4700:3032::6815:3eb8"
        ],
        "first_seen": "2026-11-21T20:17:00.456Z",
        "last_seen": "2026-11-21T20:17:00.456Z",
        "checks": 1
      }
    ],
    "hosting": [
      {
        "value": "Cloudflare",
        "evidence": "Server header \"cloudflare\""
      }
    ],
    "software": [],
    "server_info": {
      "name": "bsale-mcp",
      "version": "1.11.4",
      "protocol_version": "2025-06-18"
    },
    "headers": {
      "server": "cloudflare"
    },
    "auth": null
  },
  "related": {
    "same_address": {
      "total": 961,
      "sample": [
        {
          "id": "22186",
          "url": "https://mcp.easyscribe.guide/mcp",
          "server_name": "guide.easyscribe/easy-scribe",
          "last_state": "listed",
          "last_checked_at": "2026-11-22T17:59:02.319Z"
        },
        {
          "id": "42087",
          "url": "https://17track.usefulapi.io/mcp",
          "server_name": "io.usefulapi/17track",
          "last_state": "listed",
          "last_checked_at": "2026-11-21T18:10:01.976Z"
        },
        {
          "id": "42088",
          "url": "https://a2x-accounting.usefulapi.io/mcp",
          "server_name": "io.usefulapi/a2x-accounting",
          "last_state": "listed",
          "last_checked_at": "2026-11-21T18:11:01.183Z"
        },
        {
          "id": "42089",
          "url": "https://abacus-pos.usefulapi.io/mcp",
          "server_name": "io.usefulapi/abacus-pos",
          "last_state": "listed",
          "last_checked_at": "2026-11-21T18:12:01.080Z"
        },
        {
          "id": "42090",
          "url": "https://abaninja.usefulapi.io/mcp",
          "server_name": "io.usefulapi/abaninja",
          "last_state": "listed",
          "last_checked_at": "2026-11-21T18:13:02.135Z"
        },
        {
          "id": "42091",
          "url": "https://ablesign.usefulapi.io/mcp",
          "server_name": "io.usefulapi/ablesign",
          "last_state": "listed",
          "last_checked_at": "2026-11-21T18:14:01.432Z"
        },
        {
          "id": "42092",
          "url": "https://ably.usefulapi.io/mcp",
          "server_name": "io.usefulapi/ably",
          "last_state": "listed",
          "last_checked_at": "2026-11-21T18:15:01.611Z"
        },
        {
          "id": "42093",
          "url": "https://abra-flexi.usefulapi.io/mcp",
          "server_name": "io.usefulapi/abra-flexi",
          "last_state": "listed",
          "last_checked_at": "2026-11-21T18:16:00.986Z"
        },
        {
          "id": "42094",
          "url": "https://absence-io.usefulapi.io/mcp",
          "server_name": "io.usefulapi/absence-io",
          "last_state": "listed",
          "last_checked_at": "2026-11-21T18:17:01.057Z"
        },
        {
          "id": "42095",
          "url": "https://abstract-api.usefulapi.io/mcp",
          "server_name": "io.usefulapi/abstract-api",
          "last_state": "listed",
          "last_checked_at": "2026-11-21T18:18:00.734Z"
        },
        {
          "id": "42096",
          "url": "https://academy-of-mine.usefulapi.io/mcp",
          "server_name": "io.usefulapi/academy-of-mine",
          "last_state": "listed",
          "last_checked_at": "2026-11-21T18:19:00.968Z"
        },
        {
          "id": "42097",
          "url": "https://academyocean.usefulapi.io/mcp",
          "server_name": "io.usefulapi/academyocean",
          "last_state": "listed",
          "last_checked_at": "2026-11-21T18:20:01.024Z"
        },
        {
          "id": "42098",
          "url": "https://accelo.usefulapi.io/mcp",
          "server_name": "io.usefulapi/accelo",
          "last_state": "listed",
          "last_checked_at": "2026-11-21T18:21:01.299Z"
        },
        {
          "id": "42099",
          "url": "https://accredible.usefulapi.io/mcp",
          "server_name": "io.usefulapi/accredible",
          "last_state": "listed",
          "last_checked_at": "2026-11-21T18:22:00.819Z"
        },
        {
          "id": "42100",
          "url": "https://action1.usefulapi.io/mcp",
          "server_name": "io.usefulapi/action1",
          "last_state": "listed",
          "last_checked_at": "2026-11-21T18:23:00.761Z"
        },
        {
          "id": "42101",
          "url": "https://acube.usefulapi.io/mcp",
          "server_name": "io.usefulapi/acube",
          "last_state": "listed",
          "last_checked_at": "2026-11-21T18:24:00.644Z"
        },
        {
          "id": "42102",
          "url": "https://acuity-scheduling.usefulapi.io/mcp",
          "server_name": "io.usefulapi/acuity-scheduling",
          "last_state": "listed",
          "last_checked_at": "2026-11-21T18:25:02.340Z"
        },
        {
          "id": "42103",
          "url": "https://adafruit-io.usefulapi.io/mcp",
          "server_name": "io.usefulapi/adafruit-io",
          "last_state": "listed",
          "last_checked_at": "2026-11-21T18:26:02.127Z"
        },
        {
          "id": "42104",
          "url": "https://addevent.usefulapi.io/mcp",
          "server_name": "io.usefulapi/addevent",
          "last_state": "listed",
          "last_checked_at": "2026-11-21T18:27:01.202Z"
        },
        {
          "id": "42105",
          "url": "https://addressfinder.usefulapi.io/mcp",
          "server_name": "io.usefulapi/addressfinder",
          "last_state": "listed",
          "last_checked_at": "2026-11-21T18:28:00.709Z"
        }
      ]
    },
    "same_site": {
      "total": 1102,
      "sample": [
        {
          "id": "42087",
          "url": "https://17track.usefulapi.io/mcp",
          "server_name": "io.usefulapi/17track",
          "last_state": "listed",
          "last_checked_at": "2026-11-21T18:10:01.976Z"
        },
        {
          "id": "42088",
          "url": "https://a2x-accounting.usefulapi.io/mcp",
          "server_name": "io.usefulapi/a2x-accounting",
          "last_state": "listed",
          "last_checked_at": "2026-11-21T18:11:01.183Z"
        },
        {
          "id": "42089",
          "url": "https://abacus-pos.usefulapi.io/mcp",
          "server_name": "io.usefulapi/abacus-pos",
          "last_state": "listed",
          "last_checked_at": "2026-11-21T18:12:01.080Z"
        },
        {
          "id": "42090",
          "url": "https://abaninja.usefulapi.io/mcp",
          "server_name": "io.usefulapi/abaninja",
          "last_state": "listed",
          "last_checked_at": "2026-11-21T18:13:02.135Z"
        },
        {
          "id": "42091",
          "url": "https://ablesign.usefulapi.io/mcp",
          "server_name": "io.usefulapi/ablesign",
          "last_state": "listed",
          "last_checked_at": "2026-11-21T18:14:01.432Z"
        },
        {
          "id": "42092",
          "url": "https://ably.usefulapi.io/mcp",
          "server_name": "io.usefulapi/ably",
          "last_state": "listed",
          "last_checked_at": "2026-11-21T18:15:01.611Z"
        },
        {
          "id": "42093",
          "url": "https://abra-flexi.usefulapi.io/mcp",
          "server_name": "io.usefulapi/abra-flexi",
          "last_state": "listed",
          "last_checked_at": "2026-11-21T18:16:00.986Z"
        },
        {
          "id": "42094",
          "url": "https://absence-io.usefulapi.io/mcp",
          "server_name": "io.usefulapi/absence-io",
          "last_state": "listed",
          "last_checked_at": "2026-11-21T18:17:01.057Z"
        },
        {
          "id": "42095",
          "url": "https://abstract-api.usefulapi.io/mcp",
          "server_name": "io.usefulapi/abstract-api",
          "last_state": "listed",
          "last_checked_at": "2026-11-21T18:18:00.734Z"
        },
        {
          "id": "42096",
          "url": "https://academy-of-mine.usefulapi.io/mcp",
          "server_name": "io.usefulapi/academy-of-mine",
          "last_state": "listed",
          "last_checked_at": "2026-11-21T18:19:00.968Z"
        },
        {
          "id": "42097",
          "url": "https://academyocean.usefulapi.io/mcp",
          "server_name": "io.usefulapi/academyocean",
          "last_state": "listed",
          "last_checked_at": "2026-11-21T18:20:01.024Z"
        },
        {
          "id": "42098",
          "url": "https://accelo.usefulapi.io/mcp",
          "server_name": "io.usefulapi/accelo",
          "last_state": "listed",
          "last_checked_at": "2026-11-21T18:21:01.299Z"
        },
        {
          "id": "42099",
          "url": "https://accredible.usefulapi.io/mcp",
          "server_name": "io.usefulapi/accredible",
          "last_state": "listed",
          "last_checked_at": "2026-11-21T18:22:00.819Z"
        },
        {
          "id": "42100",
          "url": "https://action1.usefulapi.io/mcp",
          "server_name": "io.usefulapi/action1",
          "last_state": "listed",
          "last_checked_at": "2026-11-21T18:23:00.761Z"
        },
        {
          "id": "42101",
          "url": "https://acube.usefulapi.io/mcp",
          "server_name": "io.usefulapi/acube",
          "last_state": "listed",
          "last_checked_at": "2026-11-21T18:24:00.644Z"
        },
        {
          "id": "42102",
          "url": "https://acuity-scheduling.usefulapi.io/mcp",
          "server_name": "io.usefulapi/acuity-scheduling",
          "last_state": "listed",
          "last_checked_at": "2026-11-21T18:25:02.340Z"
        },
        {
          "id": "42103",
          "url": "https://adafruit-io.usefulapi.io/mcp",
          "server_name": "io.usefulapi/adafruit-io",
          "last_state": "listed",
          "last_checked_at": "2026-11-21T18:26:02.127Z"
        },
        {
          "id": "42104",
          "url": "https://addevent.usefulapi.io/mcp",
          "server_name": "io.usefulapi/addevent",
          "last_state": "listed",
          "last_checked_at": "2026-11-21T18:27:01.202Z"
        },
        {
          "id": "42105",
          "url": "https://addressfinder.usefulapi.io/mcp",
          "server_name": "io.usefulapi/addressfinder",
          "last_state": "listed",
          "last_checked_at": "2026-11-21T18:28:00.709Z"
        },
        {
          "id": "42106",
          "url": "https://adminpulse.usefulapi.io/mcp",
          "server_name": "io.usefulapi/adminpulse",
          "last_state": "listed",
          "last_checked_at": "2026-11-21T18:29:00.620Z"
        }
      ]
    },
    "same_tool_list": {
      "total": 0,
      "sample": []
    },
    "same_publisher": {
      "publisher": "io.usefulapi",
      "total": 1102,
      "sample": [
        {
          "name": "io.usefulapi/17track",
          "title": "17TRACK MCP by usefulapi"
        },
        {
          "name": "io.usefulapi/a2x-accounting",
          "title": "A2X MCP by usefulapi"
        },
        {
          "name": "io.usefulapi/abacus-pos",
          "title": "Abacus POS MCP by usefulapi"
        },
        {
          "name": "io.usefulapi/abaninja",
          "title": "AbaNinja MCP by usefulapi"
        },
        {
          "name": "io.usefulapi/ablesign",
          "title": "AbleSign MCP by usefulapi"
        },
        {
          "name": "io.usefulapi/ably",
          "title": "Ably MCP by usefulapi"
        },
        {
          "name": "io.usefulapi/abra-flexi",
          "title": "ABRA Flexi MCP by usefulapi"
        },
        {
          "name": "io.usefulapi/absence-io",
          "title": "absence.io MCP by usefulapi"
        },
        {
          "name": "io.usefulapi/abstract-api",
          "title": "Abstract API MCP by usefulapi"
        },
        {
          "name": "io.usefulapi/academy-of-mine",
          "title": "Academy of Mine MCP by usefulapi"
        },
        {
          "name": "io.usefulapi/academyocean",
          "title": "AcademyOcean MCP by usefulapi"
        },
        {
          "name": "io.usefulapi/accelo",
          "title": "Accelo MCP by usefulapi"
        },
        {
          "name": "io.usefulapi/accredible",
          "title": "Accredible MCP by usefulapi"
        },
        {
          "name": "io.usefulapi/action1",
          "title": "Action1 MCP by usefulapi"
        },
        {
          "name": "io.usefulapi/acube",
          "title": "A-Cube MCP by usefulapi"
        },
        {
          "name": "io.usefulapi/acuity-scheduling",
          "title": "Acuity Scheduling MCP by usefulapi"
        },
        {
          "name": "io.usefulapi/adafruit-io",
          "title": "Adafruit IO MCP by usefulapi"
        },
        {
          "name": "io.usefulapi/addevent",
          "title": "AddEvent MCP by usefulapi"
        },
        {
          "name": "io.usefulapi/addressfinder",
          "title": "Addressfinder MCP by usefulapi"
        },
        {
          "name": "io.usefulapi/adminpulse",
          "title": "AdminPulse MCP by usefulapi"
        }
      ]
    },
    "same_repository": {
      "repository_url": "https://github.com/m190/usefulapi-mcp",
      "total": 1102,
      "sample": [
        {
          "name": "io.usefulapi/17track",
          "title": "17TRACK MCP by usefulapi"
        },
        {
          "name": "io.usefulapi/a2x-accounting",
          "title": "A2X MCP by usefulapi"
        },
        {
          "name": "io.usefulapi/abacus-pos",
          "title": "Abacus POS MCP by usefulapi"
        },
        {
          "name": "io.usefulapi/abaninja",
          "title": "AbaNinja MCP by usefulapi"
        },
        {
          "name": "io.usefulapi/ablesign",
          "title": "AbleSign MCP by usefulapi"
        },
        {
          "name": "io.usefulapi/ably",
          "title": "Ably MCP by usefulapi"
        },
        {
          "name": "io.usefulapi/abra-flexi",
          "title": "ABRA Flexi MCP by usefulapi"
        },
        {
          "name": "io.usefulapi/absence-io",
          "title": "absence.io MCP by usefulapi"
        },
        {
          "name": "io.usefulapi/abstract-api",
          "title": "Abstract API MCP by usefulapi"
        },
        {
          "name": "io.usefulapi/academy-of-mine",
          "title": "Academy of Mine MCP by usefulapi"
        },
        {
          "name": "io.usefulapi/academyocean",
          "title": "AcademyOcean MCP by usefulapi"
        },
        {
          "name": "io.usefulapi/accelo",
          "title": "Accelo MCP by usefulapi"
        },
        {
          "name": "io.usefulapi/accredible",
          "title": "Accredible MCP by usefulapi"
        },
        {
          "name": "io.usefulapi/action1",
          "title": "Action1 MCP by usefulapi"
        },
        {
          "name": "io.usefulapi/acube",
          "title": "A-Cube MCP by usefulapi"
        },
        {
          "name": "io.usefulapi/acuity-scheduling",
          "title": "Acuity Scheduling MCP by usefulapi"
        },
        {
          "name": "io.usefulapi/adafruit-io",
          "title": "Adafruit IO MCP by usefulapi"
        },
        {
          "name": "io.usefulapi/addevent",
          "title": "AddEvent MCP by usefulapi"
        },
        {
          "name": "io.usefulapi/addressfinder",
          "title": "Addressfinder MCP by usefulapi"
        },
        {
          "name": "io.usefulapi/adminpulse",
          "title": "AdminPulse MCP by usefulapi"
        }
      ]
    },
    "note": "Shared addresses on big platforms (Cloudflare, Vercel and the like) put unrelated servers together; those are marked shared_infrastructure. A match is a pivot, not a link between operators."
  },
  "endpoint": {
    "id": "42214",
    "server_name": "io.usefulapi/bsale",
    "url": "https://bsale.usefulapi.io/mcp",
    "host": "bsale.usefulapi.io",
    "transport": "streamable-http",
    "last_checked_at": "2026-11-21T20:17:00.456Z",
    "last_state": "listed",
    "last_detail": null,
    "consecutive_failures": 0,
    "current_sha": "7536e36c8e9120730502999a767b68644f36f982e93fe7fdfc5f1acadd7c0446",
    "first_listed_at": "2026-11-21T20:17:00.456Z",
    "created_at": "2026-11-21T12:35:11.164Z",
    "resolved_addresses": [
      "104.21.62.184",
      "172.67.138.37",
      "2606:4700:3030::ac43:8a25",
      "2606:4700:3032::6815:3eb8"
    ]
  },
  "server": {
    "name": "io.usefulapi/bsale",
    "title": "Bsale MCP by usefulapi",
    "description": "Read Bsale products, documents and stock; manage customers, prices, receipts and payments.",
    "version": "1.11.4",
    "registry_status": "active",
    "repository_url": "https://github.com/m190/usefulapi-mcp",
    "website_url": "https://usefulapi.io/bsale/",
    "published_at": "2026-11-18T11:02:53.954Z",
    "updated_at": "2026-11-18T11:02:53.954Z",
    "first_seen": "2026-11-21T12:35:10.525Z"
  },
  "other_endpoints": [],
  "intel": {
    "capabilities": [],
    "evm_addresses": [],
    "chains": [],
    "tokens": [],
    "computed_at": "2026-11-22T16:09:14.575Z"
  },
  "operator": {
    "key": "usefulapi.io",
    "name": "usefulapi.io",
    "platform": false
  },
  "needs_sign_in": false,
  "reachability": {
    "window_days": 30,
    "checks": 1,
    "answered": 1,
    "answered_percent": 100,
    "avg_listing_latency_ms": 265,
    "first_check_in_window": "2026-11-21T20:17:00.456Z",
    "consecutive_failures_now": 0,
    "days": [
      {
        "day": "2026-11-21",
        "checks": 1,
        "answered": 1,
        "last_state": "listed"
      }
    ]
  },
  "tool_list": {
    "sha256": "7536e36c8e9120730502999a767b68644f36f982e93fe7fdfc5f1acadd7c0446",
    "tools": 25,
    "resources": 0,
    "prompts": 5,
    "first_seen": "2026-11-21T20:17:00.724Z",
    "tool_names": [
      "bsale_list_documents",
      "bsale_get_document",
      "bsale_sales_summary",
      "bsale_list_returns",
      "bsale_list_document_types",
      "bsale_list_clients",
      "bsale_get_client",
      "bsale_client_unpaid_documents",
      "bsale_list_products",
      "bsale_get_product",
      "bsale_list_variants",
      "bsale_get_variant",
      "bsale_list_stocks",
      "bsale_list_price_lists",
      "bsale_list_price_list_details",
      "bsale_list_payments",
      "bsale_list_payment_types",
      "bsale_list_offices",
      "bsale_list_users",
      "bsale_user_sales_summary",
      "bsale_create_client",
      "bsale_update_client",
      "bsale_update_price",
      "bsale_create_stock_reception",
      "bsale_create_payment"
    ],
    "declared": {
      "tools": [
        {
          "name": "bsale_list_documents",
          "title": "List documents (sales)",
          "description": "List issued documents (boletas, facturas, notas de credito, guias...) newest-first as Bsale returns them, with number, dates, net/tax/total amounts, state, SII status and public PDF link. Filter by emission date range, document type, client, office, folio number or SII code. Use expand (details, payments, client, office, document_type) to embed related data. GET /v1/documents.json.",
          "inputSchema": {
            "type": "object",
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "properties": {
              "limit": {
                "type": "integer",
                "maximum": 50,
                "description": "Results per page, 1-50 (default 25).",
                "exclusiveMinimum": 0
              },
              "state": {
                "anyOf": [
                  {
                    "type": "number",
                    "const": 0
                  },
                  {
                    "type": "number",
                    "const": 1
                  }
                ],
                "description": "0 = active records (Bsale default), 1 = inactive."
              },
              "expand": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^[a-z_]{1,40}$"
                },
                "maxItems": 8
              },
              "number": {
                "type": "integer",
                "maximum": 9007199254740991,
                "description": "Document folio number.",
                "exclusiveMinimum": 0
              },
              "offset": {
                "type": "integer",
                "maximum": 10000000,
                "minimum": 0,
                "description": "Items to skip (default 0). Pass the previous reply's next_offset."
              },
              "code_sii": {
                "anyOf": [
                  {
                    "type": "integer",
                    "maximum": 9999,
                    "exclusiveMinimum": 0
                  },
                  {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9]{1,6}$"
                  }
                ],
                "description": "Tax code of the document type, e.g. 33 factura, 39 boleta, 61 nota de credito (Chile) or \"01\" (Peru). Not available for Mexico: use document_type_id."
              },
              "client_id": {
                "type": "integer",
                "maximum": 9007199254740991,
                "exclusiveMinimum": 0
              },
              "office_id": {
                "type": "integer",
                "maximum": 9007199254740991,
                "description": "Branch (sucursal) id.",
                "exclusiveMinimum": 0
              },
              "emitted_to": {
                "type": "string",
                "pattern": "^(\\d{4})-(\\d{2})-(\\d{2})$",
                "description": "A date, yyyy-mm-dd."
              },
              "client_code": {
                "type": "string",
                "maxLength": 40,
                "minLength": 1,
                "description": "Client tax id (RUT/RUC/RFC) as stored in Bsale."
              },
              "emitted_from": {
                "type": "string",
                "pattern": "^(\\d{4})-(\\d{2})-(\\d{2})$",
                "description": "A date, yyyy-mm-dd."
              },
              "informed_sii": {
                "type": "integer",
                "maximum": 2,
                "minimum": 0,
                "description": "Tax authority declaration status (SII, SUNAT or SAT): 0 accepted, 1 sent, 2 rejected."
              },
              "document_type_id": {
                "type": "integer",
                "maximum": 9007199254740991,
                "description": "Document type id (see bsale_list_document_types).",
                "exclusiveMinimum": 0
              }
            }
          },
          "annotations": {
            "title": "List documents",
            "readOnlyHint": true,
            "openWorldHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "bsale_get_document",
          "title": "Get document",
          "description": "One document by id with its amounts, dates, state and links. Use expand=[details,payments,client,office,document_type,references,sellers] to include line items, payments and related records. GET /v1/documents/{id}.json.",
          "inputSchema": {
            "type": "object",
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "required": [
              "document_id"
            ],
            "properties": {
              "expand": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^[a-z_]{1,40}$"
                },
                "maxItems": 8
              },
              "document_id": {
                "type": "integer",
                "maximum": 9007199254740991,
                "description": "Bsale document id.",
                "exclusiveMinimum": 0
              }
            }
          },
          "annotations": {
            "title": "Get document",
            "readOnlyHint": true,
            "openWorldHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "bsale_sales_summary",
          "title": "Sales summary",
          "description": "Totals of sales documents (net, tax, total, count) by month, document type and office for a date range; set per_document to list each document instead. Good for 'how much did we sell in September?'. GET /v1/documents/summary.json.",
          "inputSchema": {
            "type": "object",
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "properties": {
              "limit": {
                "type": "integer",
                "maximum": 50,
                "description": "Results per page, 1-50 (default 25).",
                "exclusiveMinimum": 0
              },
              "offset": {
                "type": "integer",
                "maximum": 10000000,
                "minimum": 0,
                "description": "Items to skip (default 0). Pass the previous reply's next_offset."
              },
              "code_sii": {
                "type": "array",
                "items": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "maximum": 9999,
                      "exclusiveMinimum": 0
                    },
                    {
                      "type": "string",
                      "pattern": "^[A-Za-z0-9]{1,6}$"
                    }
                  ]
                },
                "maxItems": 10,
                "description": "Only these document type tax codes, e.g. [33, 39] (Chile) or [\"01\", \"03\"] (Peru)."
              },
              "emitted_to": {
                "type": "string",
                "pattern": "^(\\d{4})-(\\d{2})-(\\d{2})$",
                "description": "A date, yyyy-mm-dd."
              },
              "emitted_from": {
                "type": "string",
                "pattern": "^(\\d{4})-(\\d{2})-(\\d{2})$",
                "description": "A date, yyyy-mm-dd."
              },
              "per_document": {
                "type": "boolean",
                "description": "true = one row per document instead of grouped totals."
              }
            }
          },
          "annotations": {
            "title": "Sales summary",
            "readOnlyHint": true,
            "openWorldHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "bsale_list_returns",
          "title": "List returns",
          "description": "List returns (devoluciones) with date, motive, amounts and the credit note issued. Use expand=[reference_document,credit_note,details] for more. GET /v1/returns.json.",
          "inputSchema": {
            "type": "object",
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "properties": {
              "limit": {
                "type": "integer",
                "maximum": 50,
                "description": "Results per page, 1-50 (default 25).",
                "exclusiveMinimum": 0
              },
              "expand": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^[a-z_]{1,40}$"
                },
                "maxItems": 8
              },
              "offset": {
                "type": "integer",
                "maximum": 10000000,
                "minimum": 0,
                "description": "Items to skip (default 0). Pass the previous reply's next_offset."
              }
            }
          },
          "annotations": {
            "title": "List returns",
            "readOnlyHint": true,
            "openWorldHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "bsale_list_document_types",
          "title": "List document types",
          "description": "List document types (boleta, factura, nota de credito, guia de despacho...) with their id and tax (SII) code. Use the id when filtering documents. GET /v1/document_types.json.",
          "inputSchema": {
            "type": "object",
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "properties": {
              "limit": {
                "type": "integer",
                "maximum": 50,
                "description": "Results per page, 1-50 (default 25).",
                "exclusiveMinimum": 0
              },
              "state": {
                "anyOf": [
                  {
                    "type": "number",
                    "const": 0
                  },
                  {
                    "type": "number",
                    "const": 1
                  }
                ],
                "description": "0 = active records (Bsale default), 1 = inactive."
              },
              "offset": {
                "type": "integer",
                "maximum": 10000000,
                "minimum": 0,
                "description": "Items to skip (default 0). Pass the previous reply's next_offset."
              },
              "code_sii": {
                "anyOf": [
                  {
                    "type": "integer",
                    "maximum": 9999,
                    "exclusiveMinimum": 0
                  },
                  {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9]{1,6}$"
                  }
                ]
              }
            }
          },
          "annotations": {
            "title": "List document types",
            "readOnlyHint": true,
            "openWorldHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "bsale_list_clients",
          "title": "List clients",
          "description": "List customers with name, tax id (code), email, phone, address, credit limit and loyalty points. Filter by tax id, name, last name or email. GET /v1/clients.json.",
          "inputSchema": {
            "type": "object",
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "properties": {
              "code": {
                "type": "string",
                "maxLength": 40,
                "minLength": 1,
                "description": "Client tax id (RUT/RUC/RFC) exactly as stored."
              },
              "email": {
                "type": "string",
                "maxLength": 200,
                "minLength": 1
              },
              "limit": {
                "type": "integer",
                "maximum": 50,
                "description": "Results per page, 1-50 (default 25).",
                "exclusiveMinimum": 0
              },
              "state": {
                "anyOf": [
                  {
                    "type": "number",
                    "const": 0
                  },
                  {
                    "type": "number",
                    "const": 1
                  }
                ],
                "description": "0 = active records (Bsale default), 1 = inactive."
              },
              "expand": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^[a-z_]{1,40}$"
                },
                "maxItems": 8
              },
              "offset": {
                "type": "integer",
                "maximum": 10000000,
                "minimum": 0,
                "description": "Items to skip (default 0). Pass the previous reply's next_offset."
              },
              "last_name": {
                "type": "string",
                "maxLength": 100,
                "minLength": 1
              },
              "first_name": {
                "type": "string",
                "maxLength": 100,
                "minLength": 1
              }
            }
          },
          "annotations": {
            "title": "List clients",
            "readOnlyHint": true,
            "openWorldHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "bsale_get_client",
          "title": "Get client",
          "description": "One customer by id. Use expand=[contacts,attributes,addresses] to include contacts and extra attributes. GET /v1/clients/{id}.json.",
          "inputSchema": {
            "type": "object",
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "required": [
              "client_id"
            ],
            "properties": {
              "expand": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^[a-z_]{1,40}$"
                },
                "maxItems": 8
              },
              "client_id": {
                "type": "integer",
                "maximum": 9007199254740991,
                "exclusiveMinimum": 0
              }
            }
          },
          "annotations": {
            "title": "Get client",
            "readOnlyHint": true,
            "openWorldHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "bsale_client_unpaid_documents",
          "title": "Client unpaid documents",
          "description": "A client's receivables: overdue and upcoming debt, total owed, and the unpaid documents with amounts. Give client_id or client_code. GET /v1/clients/unpaid_documents.json.",
          "inputSchema": {
            "type": "object",
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "properties": {
              "as_of": {
                "type": "string",
                "pattern": "^(\\d{4})-(\\d{2})-(\\d{2})$",
                "description": "Date that splits overdue from upcoming (default: today)."
              },
              "client_id": {
                "type": "integer",
                "maximum": 9007199254740991,
                "exclusiveMinimum": 0
              },
              "client_code": {
                "type": "string",
                "maxLength": 40,
                "minLength": 1,
                "description": "Client tax id (RUT/RUC/RFC)."
              }
            }
          },
          "annotations": {
            "title": "Client unpaid documents",
            "readOnlyHint": true,
            "openWorldHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "bsale_list_products",
          "title": "List products",
          "description": "List products and services (name, description, class, stock control, state). SKUs live on variants: see bsale_list_variants. GET /v1/products.json.",
          "inputSchema": {
            "type": "object",
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "properties": {
              "limit": {
                "type": "integer",
                "maximum": 50,
                "description": "Results per page, 1-50 (default 25).",
                "exclusiveMinimum": 0
              },
              "state": {
                "anyOf": [
                  {
                    "type": "number",
                    "const": 0
                  },
                  {
                    "type": "number",
                    "const": 1
                  }
                ],
                "description": "0 = active records (Bsale default), 1 = inactive."
              },
              "expand": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^[a-z_]{1,40}$"
                },
                "maxItems": 8
              },
              "offset": {
                "type": "integer",
                "maximum": 10000000,
                "minimum": 0,
                "description": "Items to skip (default 0). Pass the previous reply's next_offset."
              },
              "classification": {
                "type": "integer",
                "maximum": 3,
                "minimum": 0,
                "description": "0 product, 1 service, 3 pack/promotion."
              },
              "product_type_id": {
                "type": "integer",
                "maximum": 9007199254740991,
                "exclusiveMinimum": 0
              }
            }
          },
          "annotations": {
            "title": "List products",
            "readOnlyHint": true,
            "openWorldHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "bsale_get_product",
          "title": "Get product",
          "description": "One product by id; expand=[product_type] adds the type. GET /v1/products/{id}.json.",
          "inputSchema": {
            "type": "object",
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "required": [
              "product_id"
            ],
            "properties": {
              "expand": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^[a-z_]{1,40}$"
                },
                "maxItems": 8
              },
              "product_id": {
                "type": "integer",
                "maximum": 9007199254740991,
                "exclusiveMinimum": 0
              }
            }
          },
          "annotations": {
            "title": "Get product",
            "readOnlyHint": true,
            "openWorldHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "bsale_list_variants",
          "title": "List variants (SKUs)",
          "description": "List product variants, the sellable SKUs: description, SKU code, barcode, stock settings and product link. Search by SKU code, barcode, description or product id. GET /v1/variants.json.",
          "inputSchema": {
            "type": "object",
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "properties": {
              "code": {
                "type": "string",
                "maxLength": 100,
                "minLength": 1,
                "description": "SKU code."
              },
              "limit": {
                "type": "integer",
                "maximum": 50,
                "description": "Results per page, 1-50 (default 25).",
                "exclusiveMinimum": 0
              },
              "state": {
                "anyOf": [
                  {
                    "type": "number",
                    "const": 0
                  },
                  {
                    "type": "number",
                    "const": 1
                  }
                ],
                "description": "0 = active records (Bsale default), 1 = inactive."
              },
              "expand": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^[a-z_]{1,40}$"
                },
                "maxItems": 8
              },
              "offset": {
                "type": "integer",
                "maximum": 10000000,
                "minimum": 0,
                "description": "Items to skip (default 0). Pass the previous reply's next_offset."
              },
              "barcode": {
                "type": "string",
                "maxLength": 100,
                "minLength": 1
              },
              "product_id": {
                "type": "integer",
                "maximum": 9007199254740991,
                "exclusiveMinimum": 0
              },
              "description": {
                "type": "string",
                "maxLength": 200,
                "minLength": 1,
                "description": "Variant name."
              }
            }
          },
          "annotations": {
            "title": "List variants",
            "readOnlyHint": true,
            "openWorldHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "bsale_get_variant",
          "title": "Get variant",
          "description": "One variant (SKU) by id; expand=[product] embeds the product. GET /v1/variants/{id}.json.",
          "inputSchema": {
            "type": "object",
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "required": [
              "variant_id"
            ],
            "properties": {
              "expand": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^[a-z_]{1,40}$"
                },
                "maxItems": 8
              },
              "variant_id": {
                "type": "integer",
                "maximum": 9007199254740991,
                "exclusiveMinimum": 0
              }
            }
          },
          "annotations": {
            "title": "Get variant",
            "readOnlyHint": true,
            "openWorldHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "bsale_list_stocks",
          "title": "List stock levels",
          "description": "Stock per variant and office: quantity, reserved and available. Filter by office, variant id, SKU code or barcode (for a pack give a variant filter plus office_id). expand=[variant,office] adds names. GET /v1/stocks.json.",
          "inputSchema": {
            "type": "object",
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "properties": {
              "code": {
                "type": "string",
                "maxLength": 100,
                "minLength": 1,
                "description": "SKU code."
              },
              "limit": {
                "type": "integer",
                "maximum": 50,
                "description": "Results per page, 1-50 (default 25).",
                "exclusiveMinimum": 0
              },
              "expand": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^[a-z_]{1,40}$"
                },
                "maxItems": 8
              },
              "offset": {
                "type": "integer",
                "maximum": 10000000,
                "minimum": 0,
                "description": "Items to skip (default 0). Pass the previous reply's next_offset."
              },
              "barcode": {
                "type": "string",
                "maxLength": 100,
                "minLength": 1
              },
              "office_id": {
                "type": "integer",
                "maximum": 9007199254740991,
                "exclusiveMinimum": 0
              },
              "variant_id": {
                "type": "integer",
                "maximum": 9007199254740991,
                "exclusiveMinimum": 0
              }
            }
          },
          "annotations": {
            "title": "List stock levels",
            "readOnlyHint": true,
            "openWorldHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "bsale_list_price_lists",
          "title": "List price lists",
          "description": "List price lists with name, currency and state. Use the id with bsale_list_price_list_details. GET /v1/price_lists.json.",
          "inputSchema": {
            "type": "object",
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "properties": {
              "limit": {
                "type": "integer",
                "maximum": 50,
                "description": "Results per page, 1-50 (default 25).",
                "exclusiveMinimum": 0
              },
              "expand": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^[a-z_]{1,40}$"
                },
                "maxItems": 8
              },
              "offset": {
                "type": "integer",
                "maximum": 10000000,
                "minimum": 0,
                "description": "Items to skip (default 0). Pass the previous reply's next_offset."
              },
              "coin_id": {
                "type": "integer",
                "maximum": 9007199254740991,
                "exclusiveMinimum": 0
              }
            }
          },
          "annotations": {
            "title": "List price lists",
            "readOnlyHint": true,
            "openWorldHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "bsale_list_price_list_details",
          "title": "List price list prices",
          "description": "Prices in one price list: the net price (variantValue) and price with taxes per variant, plus the detail id needed to change a price. Filter by variant id, SKU code or barcode. GET /v1/price_lists/{id}/details.json.",
          "inputSchema": {
            "type": "object",
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "required": [
              "price_list_id"
            ],
            "properties": {
              "code": {
                "type": "string",
                "maxLength": 100,
                "minLength": 1,
                "description": "SKU code."
              },
              "limit": {
                "type": "integer",
                "maximum": 50,
                "description": "Results per page, 1-50 (default 25).",
                "exclusiveMinimum": 0
              },
              "expand": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^[a-z_]{1,40}$"
                },
                "maxItems": 8
              },
              "offset": {
                "type": "integer",
                "maximum": 10000000,
                "minimum": 0,
                "description": "Items to skip (default 0). Pass the previous reply's next_offset."
              },
              "barcode": {
                "type": "string",
                "maxLength": 100,
                "minLength": 1
              },
              "variant_id": {
                "type": "integer",
                "maximum": 9007199254740991,
                "exclusiveMinimum": 0
              },
              "price_list_id": {
                "type": "integer",
                "maximum": 9007199254740991,
                "exclusiveMinimum": 0
              }
            }
          },
          "annotations": {
            "title": "List price list prices",
            "readOnlyHint": true,
            "openWorldHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "bsale_list_payments",
          "title": "List payments",
          "description": "List payments received (amount, date, payment type, document, office, user). Filter by payment date, document id, or document tax code plus folio number. GET /v1/payments.json.",
          "inputSchema": {
            "type": "object",
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "properties": {
              "limit": {
                "type": "integer",
                "maximum": 50,
                "description": "Results per page, 1-50 (default 25).",
                "exclusiveMinimum": 0
              },
              "expand": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^[a-z_]{1,40}$"
                },
                "maxItems": 8
              },
              "number": {
                "type": "integer",
                "maximum": 9007199254740991,
                "description": "Document folio number; combine with code_sii.",
                "exclusiveMinimum": 0
              },
              "offset": {
                "type": "integer",
                "maximum": 10000000,
                "minimum": 0,
                "description": "Items to skip (default 0). Pass the previous reply's next_offset."
              },
              "paid_on": {
                "type": "string",
                "pattern": "^(\\d{4})-(\\d{2})-(\\d{2})$",
                "description": "Only payments recorded on this date."
              },
              "code_sii": {
                "anyOf": [
                  {
                    "type": "integer",
                    "maximum": 9999,
                    "exclusiveMinimum": 0
                  },
                  {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9]{1,6}$"
                  }
                ],
                "description": "Document tax code; combine with number."
              },
              "document_id": {
                "type": "integer",
                "maximum": 9007199254740991,
                "exclusiveMinimum": 0
              }
            }
          },
          "annotations": {
            "title": "List payments",
            "readOnlyHint": true,
            "openWorldHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "bsale_list_payment_types",
          "title": "List payment types",
          "description": "List payment methods (cash, card, transfer, credit...) with their id. The id is needed to record a payment. GET /v1/payment_types.json.",
          "inputSchema": {
            "type": "object",
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "properties": {
              "limit": {
                "type": "integer",
                "maximum": 50,
                "description": "Results per page, 1-50 (default 25).",
                "exclusiveMinimum": 0
              },
              "state": {
                "anyOf": [
                  {
                    "type": "number",
                    "const": 0
                  },
                  {
                    "type": "number",
                    "const": 1
                  }
                ],
                "description": "0 = active records (Bsale default), 1 = inactive."
              },
              "offset": {
                "type": "integer",
                "maximum": 10000000,
                "minimum": 0,
                "description": "Items to skip (default 0). Pass the previous reply's next_offset."
              }
            }
          },
          "annotations": {
            "title": "List payment types",
            "readOnlyHint": true,
            "openWorldHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "bsale_list_offices",
          "title": "List offices (branches)",
          "description": "List branches (sucursales) with name, address and cost center. Use the id for stock and document filters. GET /v1/offices.json.",
          "inputSchema": {
            "type": "object",
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "properties": {
              "limit": {
                "type": "integer",
                "maximum": 50,
                "description": "Results per page, 1-50 (default 25).",
                "exclusiveMinimum": 0
              },
              "state": {
                "anyOf": [
                  {
                    "type": "number",
                    "const": 0
                  },
                  {
                    "type": "number",
                    "const": 1
                  }
                ],
                "description": "0 = active records (Bsale default), 1 = inactive."
              },
              "offset": {
                "type": "integer",
                "maximum": 10000000,
                "minimum": 0,
                "description": "Items to skip (default 0). Pass the previous reply's next_offset."
              }
            }
          },
          "annotations": {
            "title": "List offices",
            "readOnlyHint": true,
            "openWorldHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "bsale_list_users",
          "title": "List users (sellers)",
          "description": "List Bsale users (sellers/cashiers) with name and office. GET /v1/users.json.",
          "inputSchema": {
            "type": "object",
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "properties": {
              "limit": {
                "type": "integer",
                "maximum": 50,
                "description": "Results per page, 1-50 (default 25).",
                "exclusiveMinimum": 0
              },
              "state": {
                "anyOf": [
                  {
                    "type": "number",
                    "const": 0
                  },
                  {
                    "type": "number",
                    "const": 1
                  }
                ],
                "description": "0 = active records (Bsale default), 1 = inactive."
              },
              "expand": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^[a-z_]{1,40}$"
                },
                "maxItems": 8
              },
              "offset": {
                "type": "integer",
                "maximum": 10000000,
                "minimum": 0,
                "description": "Items to skip (default 0). Pass the previous reply's next_offset."
              },
              "office_id": {
                "type": "integer",
                "maximum": 9007199254740991,
                "exclusiveMinimum": 0
              }
            }
          },
          "annotations": {
            "title": "List users",
            "readOnlyHint": true,
            "openWorldHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "bsale_user_sales_summary",
          "title": "Sales by seller",
          "description": "Sales and tax subtotal per seller for a date range (default: today, UTC), or for one user. GET /v1/users/sales_summary.json.",
          "inputSchema": {
            "type": "object",
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "properties": {
              "to": {
                "type": "string",
                "pattern": "^(\\d{4})-(\\d{2})-(\\d{2})$",
                "description": "A date, yyyy-mm-dd."
              },
              "from": {
                "type": "string",
                "pattern": "^(\\d{4})-(\\d{2})-(\\d{2})$",
                "description": "A date, yyyy-mm-dd."
              },
              "user_id": {
                "type": "integer",
                "maximum": 9007199254740991,
                "exclusiveMinimum": 0
              }
            }
          },
          "annotations": {
            "title": "Sales by seller",
            "readOnlyHint": true,
            "openWorldHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "bsale_create_client",
          "title": "Create client",
          "description": "WRITE: create a new customer in Bsale (it is visible to every user of the instance). Give at least a first name or a company. Bsale rejects a second client with the same tax id. POST /v1/clients.json.",
          "inputSchema": {
            "type": "object",
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "properties": {
              "city": {
                "type": "string",
                "maxLength": 100,
                "minLength": 1
              },
              "code": {
                "type": "string",
                "maxLength": 40,
                "minLength": 1,
                "description": "Tax id (RUT in Chile, RUC in Peru, RFC in Mexico). Validate it first."
              },
              "note": {
                "type": "string",
                "maxLength": 1000,
                "minLength": 1
              },
              "email": {
                "type": "string",
                "format": "email",
                "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
                "maxLength": 200
              },
              "phone": {
                "type": "string",
                "maxLength": 40,
                "minLength": 1
              },
              "address": {
                "type": "string",
                "maxLength": 300,
                "minLength": 1
              },
              "company": {
                "type": "string",
                "maxLength": 200,
                "minLength": 1
              },
              "activity": {
                "type": "string",
                "maxLength": 200,
                "minLength": 1,
                "description": "Giro / business activity."
              },
              "district": {
                "type": "string",
                "maxLength": 100,
                "minLength": 1,
                "description": "Colonia / district (Mexico). Chile and Peru: use municipality."
              },
              "last_name": {
                "type": "string",
                "maxLength": 100,
                "minLength": 1
              },
              "first_name": {
                "type": "string",
                "maxLength": 100,
                "minLength": 1
              },
              "is_foreigner": {
                "type": "boolean",
                "description": "true for a foreign client (Bsale assigns tax id 55555555-5 unless you also pass code)."
              },
              "municipality": {
                "type": "string",
                "maxLength": 100,
                "minLength": 1,
                "description": "Comuna (Chile) or municipality (Peru). Mexican accounts: use district."
              }
            }
          },
          "annotations": {
            "title": "Create client",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "bsale_update_client",
          "title": "Update client",
          "description": "WRITE: change fields of an existing customer; only the fields you pass are sent. This overwrites the stored values. PUT /v1/clients/{id}.json.",
          "inputSchema": {
            "type": "object",
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "required": [
              "client_id"
            ],
            "properties": {
              "city": {
                "type": "string",
                "maxLength": 100,
                "minLength": 1
              },
              "code": {
                "type": "string",
                "maxLength": 40,
                "minLength": 1,
                "description": "Tax id (RUT in Chile, RUC in Peru, RFC in Mexico). Validate it first."
              },
              "note": {
                "type": "string",
                "maxLength": 1000,
                "minLength": 1
              },
              "email": {
                "type": "string",
                "format": "email",
                "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
                "maxLength": 200
              },
              "phone": {
                "type": "string",
                "maxLength": 40,
                "minLength": 1
              },
              "address": {
                "type": "string",
                "maxLength": 300,
                "minLength": 1
              },
              "company": {
                "type": "string",
                "maxLength": 200,
                "minLength": 1
              },
              "activity": {
                "type": "string",
                "maxLength": 200,
                "minLength": 1,
                "description": "Giro / business activity."
              },
              "district": {
                "type": "string",
                "maxLength": 100,
                "minLength": 1,
                "description": "Colonia / district (Mexico). Chile and Peru: use municipality."
              },
              "client_id": {
                "type": "integer",
                "maximum": 9007199254740991,
                "exclusiveMinimum": 0
              },
              "last_name": {
                "type": "string",
                "maxLength": 100,
                "minLength": 1
              },
              "first_name": {
                "type": "string",
                "maxLength": 100,
                "minLength": 1
              },
              "municipality": {
                "type": "string",
                "maxLength": 100,
                "minLength": 1,
                "description": "Comuna (Chile) or municipality (Peru). Mexican accounts: use district."
              }
            }
          },
          "annotations": {
            "title": "Update client",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "bsale_update_price",
          "title": "Update price list price",
          "description": "WRITE: set the net price (variantValue, without taxes) of one variant in a price list. This changes what Bsale charges on new sales using that list. Get detail_id from bsale_list_price_list_details. PUT /v1/price_lists/{id}/details/{detail_id}.json.",
          "inputSchema": {
            "type": "object",
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "required": [
              "price_list_id",
              "detail_id",
              "net_price"
            ],
            "properties": {
              "detail_id": {
                "type": "integer",
                "maximum": 9007199254740991,
                "description": "Price list detail id (the id of the row in bsale_list_price_list_details).",
                "exclusiveMinimum": 0
              },
              "net_price": {
                "type": "number",
                "maximum": 1000000000,
                "minimum": 0,
                "description": "New net price (before taxes) in the price list's currency."
              },
              "price_list_id": {
                "type": "integer",
                "maximum": 9007199254740991,
                "exclusiveMinimum": 0
              }
            }
          },
          "annotations": {
            "title": "Update price list price",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "bsale_create_stock_reception",
          "title": "Receive stock",
          "description": "WRITE: record a stock reception (ingreso de stock) that ADDS quantities to an office's inventory. Each line names the variant by id, SKU code or barcode, with quantity and unit cost. It changes stock levels and cost; Bsale has no undo through this API, so confirm the numbers first. POST /v1/stocks/receptions.json.",
          "inputSchema": {
            "type": "object",
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "required": [
              "office_id",
              "details"
            ],
            "properties": {
              "note": {
                "type": "string",
                "maxLength": 500,
                "minLength": 1
              },
              "details": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "quantity"
                  ],
                  "properties": {
                    "code": {
                      "type": "string",
                      "maxLength": 100,
                      "minLength": 1,
                      "description": "SKU code."
                    },
                    "cost": {
                      "type": "number",
                      "maximum": 1000000000,
                      "minimum": 0,
                      "description": "Unit cost."
                    },
                    "barcode": {
                      "type": "string",
                      "maxLength": 100,
                      "minLength": 1
                    },
                    "quantity": {
                      "type": "number",
                      "maximum": 1000000000,
                      "exclusiveMinimum": 0
                    },
                    "variant_id": {
                      "type": "integer",
                      "maximum": 9007199254740991,
                      "exclusiveMinimum": 0
                    },
                    "serial_number": {
                      "type": "string",
                      "maxLength": 100,
                      "minLength": 1,
                      "description": "Only for serial-tracked variants."
                    }
                  }
                },
                "maxItems": 100,
                "minItems": 1
              },
              "document": {
                "type": "string",
                "maxLength": 50,
                "minLength": 1,
                "description": "Kind of incoming document, e.g. \"Guia\", \"Factura\", \"Otro\" (default \"Otro\")."
              },
              "office_id": {
                "type": "integer",
                "maximum": 9007199254740991,
                "description": "Office (sucursal) receiving the stock.",
                "exclusiveMinimum": 0
              },
              "document_number": {
                "type": "integer",
                "maximum": 9007199254740991,
                "minimum": 0,
                "description": "Number of the incoming document."
              }
            }
          },
          "annotations": {
            "title": "Receive stock",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "bsale_create_payment",
          "title": "Record payment",
          "description": "WRITE: record a payment against an issued document (normally a credit sale that is still unpaid). It changes the document's receivable balance in the books and cannot be removed through this API. Check the amount with bsale_client_unpaid_documents first and get payment_type_id from bsale_list_payment_types. POST /v1/payments.json.",
          "inputSchema": {
            "type": "object",
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "required": [
              "document_id",
              "payment_type_id",
              "amount"
            ],
            "properties": {
              "amount": {
                "type": "number",
                "maximum": 1000000000000,
                "exclusiveMinimum": 0
              },
              "paid_on": {
                "type": "string",
                "pattern": "^(\\d{4})-(\\d{2})-(\\d{2})$",
                "description": "Payment date (default: today, UTC)."
              },
              "document_id": {
                "type": "integer",
                "maximum": 9007199254740991,
                "exclusiveMinimum": 0
              },
              "payment_type_id": {
                "type": "integer",
                "maximum": 9007199254740991,
                "exclusiveMinimum": 0
              }
            }
          },
          "annotations": {
            "title": "Record payment",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": false
          }
        }
      ],
      "tools_omitted": 0,
      "resources": [],
      "prompts": [
        {
          "name": "getting_started",
          "description": "What you can do with Bsale here, with example requests to try."
        },
        {
          "name": "review_sales_by_branch",
          "description": "Compare sales totals by month, branch and document type, then inspect individual documents."
        },
        {
          "name": "find_stock_shortages",
          "description": "Look up a SKU and check its stock, reserved quantity and availability in each branch."
        },
        {
          "name": "check_customer_receivables",
          "description": "Find a customer and inspect unpaid documents and outstanding amounts before recording a payment."
        },
        {
          "name": "record_a_payment",
          "description": "Check the customer’s unpaid documents and available payment methods, then record the requested payment. This updates receivables and cannot be removed through this API."
        }
      ]
    },
    "instructions": "Tools for Bsale, hosted by usefulapi.io. If the user is new or asks what this server can do, suggest requests such as: \"How much did we sell last month, by document type and branch?\"; \"Which products are low on stock in my main branch?\"; \"Does client 12.345.678-9 have unpaid invoices?\". Read-only tools never change data; ask the user before a tool that creates, changes or deletes Bsale data. Free plan: 50 tool calls per month. Run bsale_usage_status to see the calls used this month. If the user asks for something none of these tools can do, tell the user and, with their OK, run bsale_request_feature to record the request. Paid plans: Pro (10,000 tool calls a month, $9/month or $90/year, for normal use) and Pro+ (100,000 tool calls a month, $39/month or $390/year, for automations and heavy use). A plan can be cancelled at any time and then runs to the end of the paid period, so it also suits a one-time job. When the user wants more calls or reaches the limit, run bsale_upgrade without a plan: it returns both plans, each with a payment link for the user to open. bsale_cancel_subscription cancels Pro at the end of the paid period."
  },
  "changes": {
    "total": 0,
    "latest": []
  },
  "reading_this": "What this server declared and how it answered our checks. Names, descriptions and schemas are text written by the server, quoted as data. Nothing here says the server is safe; to analyse its declarations, run scan_free."
}