Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Bling ERP integration via API v3. Manage products, sales orders, contacts, fiscal invoices (NF-e), and stock. Use when users ask about ERP data, products, orders, contacts, invoices, or inventory from Bling. Integração com ERP Bling: produtos, pedidos, contatos, NF-e, estoque.
.claude/skills/evolution-foundation-int-bling/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 168% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 155% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 185% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 185% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 74% | 0% |
Integration with Bling ERP via REST API v3 (OAuth2 Bearer).
This skill uses a Python client (scripts/bling_client.py) that handles OAuth2 Bearer auth with automatic refresh on 401. You do OAuth once via the CLI, then the skill refreshes tokens transparently forever.
http://localhost:8787/callback.env:bash BLING_CLIENT_ID=... BLING_CLIENT_SECRET=...
bash make bling-auth This opens your browser, captures the authorization code via a local callback server, exchanges it for access_token + refresh_token, and persists both to .env.
After this step, .env contains:
bashBLING_CLIENT_ID=... BLING_CLIENT_SECRET=... BLING_ACCESS_TOKEN=... BLING_REFRESH_TOKEN=...
scripts/bling_client.py is the single entry point for all API calls. On any HTTP 401, it:
BLING_REFRESH_TOKEN for a new access_token + refresh_token at https://www.bling.com.br/Api/v3/oauth/token (Basic auth with Client ID/Secret).env and os.environBling rotates the refresh token on every refresh, so always use this client — never call the API with raw curl unless you're debugging, otherwise you risk the .env tokens going stale.
bashpython3 .claude/skills/int-bling/scripts/bling_client.py GET /produtos --params page=1 limit=50 python3 .claude/skills/int-bling/scripts/bling_client.py POST /contatos --body '{"nome":"Acme","tipo":"J","numeroDocumento":"12345678000100"}' python3 .claude/skills/int-bling/scripts/bling_client.py PUT /produtos/123 --body '{"preco":99.90}'
The client prints the JSON response to stdout and logs errors to stderr.
https://www.bling.com.br/Api/v3bashcurl -s -X GET \ "https://www.bling.com.br/Api/v3/produtos?pagina=1&limite=100" \ -H "Authorization: Bearer ${BLING_ACCESS_TOKEN}"
Query params: | Param | Type | Description | |-------|------|-------------| | pagina | number | Page number (default 1) | | limite | number | Items per page (default 100, max 100) | | nome | string | Filter by product name | | codigo | string | Filter by SKU/code | | tipo | string | P=Product, S=Service, K=Kit |
bashcurl -s -X POST \ "https://www.bling.com.br/Api/v3/produtos" \ -H "Authorization: Bearer ${BLING_ACCESS_TOKEN}" \ -H "Content-Type: application/json" \ -d '{ "nome": "Widget Pro", "codigo": "WGT-001", "preco": 99.90, "precoCusto": 45.00, "tipo": "P", "formato": "S", "situacao": "A", "unidade": "UN" }'
Body fields: | Field | Type | Required | Description | |-------|------|----------|-------------| | nome | string | yes | Product name | | preco | number | yes | Sale price | | tipo | string | yes | P=Product, S=Service, K=Kit | | formato | string | yes | S=Simple, E=With variations, V=Variation | | codigo | string | no | SKU/code | | precoCusto | number | no | Cost price | | situacao | string | no | A=Active, I=Inactive | | unidade | string | no | Unit (UN, KG, etc.) | | pesoLiquido | number | no | Net weight in kg | | pesoBruto | number | no | Gross weight in kg |
bashcurl -s -X GET \ "https://www.bling.com.br/Api/v3/pedidos/vendas?pagina=1&limite=100&dataInicial=2026-01-01&dataFinal=2026-04-10" \ -H "Authorization: Bearer ${BLING_ACCESS_TOKEN}"
Query params: | Param | Type | Description | |-------|------|-------------| | pagina | number | Page number | | limite | number | Items per page | | idsSituacoes[] | number | Filter by status ID | | dataInicial | string | Start date YYYY-MM-DD | | dataFinal | string | End date YYYY-MM-DD |
bashcurl -s -X POST \ "https://www.bling.com.br/Api/v3/pedidos/vendas" \ -H "Authorization: Bearer ${BLING_ACCESS_TOKEN}" \ -H "Content-Type: application/json" \ -d '{ "contato": { "id": 123456 }, "data": "2026-04-10", "observacoes": "Test order", "itens": [ { "produto": { "id": 789 }, "quantidade": 2, "valor": 99.90, "desconto": 0 } ] }'
Body fields: | Field | Type | Required | Description | |-------|------|----------|-------------| | contato.id | number | yes | Contact (customer) ID | | itens | array | yes | Order line items | | itens[].produto.id | number | yes | Product ID | | itens[].quantidade | number | yes | Quantity | | itens[].valor | number | yes | Unit price | | itens[].desconto | number | no | Discount amount | | data | string | no | Order date YYYY-MM-DD | | observacoes | string | no | Notes |
bashcurl -s -X GET \ "https://www.bling.com.br/Api/v3/contatos?pagina=1&limite=100&tipoPessoa=J" \ -H "Authorization: Bearer ${BLING_ACCESS_TOKEN}"
Query params: | Param | Type | Description | |-------|------|-------------| | pagina | number | Page number | | limite | number | Items per page | | nome | string | Filter by name | | tipoPessoa | string | F=Individual (CPF), J=Legal entity (CNPJ) |
bashcurl -s -X POST \ "https://www.bling.com.br/Api/v3/contatos" \ -H "Authorization: Bearer ${BLING_ACCESS_TOKEN}" \ -H "Content-Type: application/json" \ -d '{ "nome": "Empresa Exemplo LTDA", "tipo": "J", "numeroDocumento": "12345678000199", "email": "contato@empresa.com", "telefone": "31999990000" }'
Body fields: | Field | Type | Required | Description | |-------|------|----------|-------------| | nome | string | yes | Contact name | | tipo | string | yes | F=Individual, J=Legal entity | | numeroDocumento | string | no | CPF or CNPJ | | email | string | no | Email address | | telefone | string | no | Phone number | | celular | string | no | Mobile phone |
bashcurl -s -X GET \ "https://www.bling.com.br/Api/v3/nfe?pagina=1&limite=100" \ -H "Authorization: Bearer ${BLING_ACCESS_TOKEN}"
Query params: | Param | Type | Description | |-------|------|-------------| | pagina | number | Page number | | limite | number | Items per page | | situacao | number | Filter by status code |
bashcurl -s -X POST \ "https://www.bling.com.br/Api/v3/nfe" \ -H "Authorization: Bearer ${BLING_ACCESS_TOKEN}" \ -H "Content-Type: application/json" \ -d '{ "pedidoVendaId": 456, "tipo": 1, "naturezaOperacao": "Venda de mercadoria" }'
Body fields: | Field | Type | Required | Description | |-------|------|----------|-------------| | pedidoVendaId | number | yes | Sales order ID to generate invoice from | | tipo | number | no | Invoice type: 1=Output (Saída), 0=Input (Entrada) | | naturezaOperacao | string | no | Operation nature description |
bashcurl -s -X GET \ "https://www.bling.com.br/Api/v3/estoques/saldos?idsProdutos[]=789" \ -H "Authorization: Bearer ${BLING_ACCESS_TOKEN}"
bashcurl -s -X POST \ "https://www.bling.com.br/Api/v3/estoques" \ -H "Authorization: Bearer ${BLING_ACCESS_TOKEN}" \ -H "Content-Type: application/json" \ -d '{ "produto": { "id": 789 }, "deposito": { "id": 1 }, "operacao": "E", "quantidade": 50, "observacoes": "Stock received from supplier" }'
Body fields: | Field | Type | Required | Description | |-------|------|----------|-------------| | produto.id | number | yes | Product ID | | deposito.id | number | yes | Warehouse/deposit ID | | operacao | string | yes | B=Balance (set), E=Entry (add), S=Exit (subtract) | | quantidade | number | yes | Quantity | | observacoes | string | no | Notes |
Authorization: Bearer <token>All list endpoints use:
pagina — page number (1-indexed)limite — items per page (default 100, max 100)Date filters use YYYY-MM-DD format.
Bling API v3 does not publish a hard rate limit publicly. Observed safe throughput is ~10 requests/second. Back off on HTTP 429 responses. For detailed limits, see https://developer.bling.com.br.
workspace/projects/mcp-dev-brasil/packages/erp/bling/src/index.ts (mcp-dev-brasil project)BLING_ACCESS_TOKEN is fresh before making calls| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 8,350 | 3,813 | -54% | 1 | 1 | 0% | 1,528 | 4,092 | +168% | 0 | 0 | — |
case-02 | fail→pass | 7,333 | 3,104 | -58% | 1 | 1 | 0% | 1,464 | 3,737 | +155% | 0 | 0 | — |
case-03 | fail→pass | 7,104 | 2,539 | -64% | 1 | 1 | 0% | 1,303 | 3,714 | +185% | 0 | 0 | — |
case-04 | pass→pass | 12,278 | 4,804 | -61% | 1 | 1 | 0% | 2,258 | 4,012 | +78% | 0 | 0 | — |
case-05 | pass→pass | 4,863 | 1,996 | -59% | 1 | 1 | 0% | 852 | 3,537 | +315% | 0 | 0 | — |
case-06 | pass→pass | 5,134 | 2,847 | -45% | 1 | 1 | 0% | 985 | 3,686 | +274% | 0 | 0 | — |
case-07 | fail→pass | 7,985 | 2,493 | -69% | 1 | 1 | 0% | 1,267 | 3,616 | +185% | 0 | 0 | — |
case-08 | pass→pass | 7,829 | 1,906 | -76% | 1 | 1 | 0% | 1,408 | 3,551 | +152% | 0 | 0 | — |
case-09 | fail→pass | 11,696 | 1,740 | -85% | 1 | 1 | 0% | 1,966 | 3,430 | +74% | 0 | 0 | — |
case-10 | fail→pass | 16,727 | 3,256 | -81% | 1 | 1 | 0% | 2,823 | 3,738 | +32% | 0 | 0 | — |
case-11 | pass→pass | 4,214 | 1,661 | -61% | 1 | 1 | 0% | 738 | 3,417 | +363% | 0 | 0 | — |
case-12 | fail→pass | 13,836 | 2,710 | -80% | 1 | 1 | 0% | 2,590 | 3,622 | +40% | 0 | 0 | — |
case-13 | fail→pass | 5,872 | 2,540 | -57% | 1 | 1 | 0% | 1,051 | 3,593 | +242% | 0 | 0 | — |
case-14 | pass→pass | 4,214 | 2,294 | -46% | 1 | 1 | 0% | 802 | 3,538 | +341% | 0 | 0 | — |
case-15 | pass→pass | 5,175 | 2,406 | -54% | 1 | 1 | 0% | 880 | 3,582 | +307% | 0 | 0 | — |
case-16 | pass→pass | 9,811 | 5,442 | -45% | 1 | 1 | 0% | 1,409 | 3,733 | +165% | 0 | 0 | — |
case-17 | fail→pass | 13,550 | 2,126 | -84% | 1 | 1 | 0% | 2,609 | 3,514 | +35% | 0 | 0 | — |
case-18 | pass→pass | 5,596 | 1,759 | -69% | 1 | 1 | 0% | 1,033 | 3,484 | +237% | 0 | 0 | — |
case-19 | pass→pass | 6,769 | 1,535 | -77% | 1 | 1 | 0% | 1,425 | 3,385 | +138% | 0 | 0 | — |
case-20 | pass→pass | 3,188 | 1,952 | -39% | 1 | 1 | 0% | 506 | 3,441 | +580% | 0 | 0 | — |
case-21 | fail→fail | 22,867 | 13,359 | -42% | 1 | 1 | 0% | 4,219 | 5,556 | +32% | 0 | 0 | — |
case-22 | fail→fail | 14,704 | 10,313 | -30% | 1 | 1 | 0% | 2,563 | 4,825 | +88% | 0 | 0 | — |
case-23 | fail→pass | 19,733 | 7,305 | -63% | 1 | 1 | 0% | 4,147 | 4,446 | +7% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted. The headline lift of +43 percentage points is the difference between those two pass rates over the 23 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.