@comando.one/mcp-server 0.12.0 → 0.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +69 -12
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -416,7 +416,8 @@ var SCHEMAS = {
|
|
|
416
416
|
trade_name: { type: ["string", "null"] },
|
|
417
417
|
status: { type: "string" },
|
|
418
418
|
created_at: { type: "string", format: "date-time" },
|
|
419
|
-
updated_at: { type: "string", format: "date-time" }
|
|
419
|
+
updated_at: { type: "string", format: "date-time" },
|
|
420
|
+
addresses: { type: "array", items: { $ref: "#/components/schemas/CustomerAddress" }, description: "S\xF3 vem com ?include=addresses. Endere\xE7o padr\xE3o primeiro; lista vazia = cliente sem endere\xE7o cadastrado." }
|
|
420
421
|
}
|
|
421
422
|
},
|
|
422
423
|
CustomerCreate: {
|
|
@@ -561,6 +562,37 @@ var SCHEMAS = {
|
|
|
561
562
|
notes: { type: "string" }
|
|
562
563
|
}
|
|
563
564
|
},
|
|
565
|
+
// Schemas de ATUALIZAÇÃO: o PATCH reusava o de criação, que carrega `required` — o MCP
|
|
566
|
+
// derivava a tool de update exigindo `customer_id` em toda edição — e não dizia o que cada
|
|
567
|
+
// campo faz depois que o registro existe (trocar cliente, reagendar, anexar).
|
|
568
|
+
ProposalUpdate: {
|
|
569
|
+
type: "object",
|
|
570
|
+
description: "S\xF3 os campos enviados mudam. Ao menos um \xE9 obrigat\xF3rio.",
|
|
571
|
+
properties: {
|
|
572
|
+
customer_id: { type: "string", format: "uuid", description: "Troca o cliente da proposta. Precisa ser cliente desta empresa (404 se n\xE3o for)." },
|
|
573
|
+
status: { type: "string", enum: ["rascunho", "enviada", "aceita", "recusada", "cancelada"] },
|
|
574
|
+
total_amount: { type: "number" },
|
|
575
|
+
valid_until: { type: ["string", "null"], format: "date" },
|
|
576
|
+
notes: { type: ["string", "null"] }
|
|
577
|
+
}
|
|
578
|
+
},
|
|
579
|
+
ContractUpdate: {
|
|
580
|
+
type: "object",
|
|
581
|
+
description: "S\xF3 os campos enviados mudam. Ao menos um \xE9 obrigat\xF3rio. Itens e se\xE7\xF5es do contrato n\xE3o s\xE3o edit\xE1veis por esta rota.",
|
|
582
|
+
properties: {
|
|
583
|
+
customer_id: { type: "string", format: "uuid", description: "Troca o cliente do contrato. Precisa ser cliente desta empresa (404). Recusado com 409 se o contrato tem autoriza\xE7\xE3o de d\xE9bito recorrente ativa (cart\xE3o salvo ou Pix Autom\xE1tico) \u2014 ela \xE9 do pagador atual; revogue-a antes. Faturas j\xE1 geradas continuam no cliente antigo." },
|
|
584
|
+
title: { type: ["string", "null"] },
|
|
585
|
+
status: { type: "string", enum: ["ativo", "suspenso", "cancelado", "finalizado"] },
|
|
586
|
+
frequency: { type: "string", enum: ["semanal", "quinzenal", "mensal", "bimestral", "trimestral", "semestral", "anual"] },
|
|
587
|
+
start_date: { type: "string", format: "date" },
|
|
588
|
+
end_date: { type: ["string", "null"], format: "date" },
|
|
589
|
+
due_days: { type: "integer" },
|
|
590
|
+
amount: { type: "number" },
|
|
591
|
+
payment_method_id: { type: ["string", "null"], format: "uuid" },
|
|
592
|
+
next_generation_date: { type: "string", format: "date", description: "Reagenda a pr\xF3xima gera\xE7\xE3o de fatura (rodada di\xE1ria das 03:00). S\xF3 hoje (fuso de Bras\xEDlia) em diante: data no passado \xE9 400, porque o gerador emitiria de uma vez uma fatura por ciclo atrasado. Para gerar um ciclo agora use POST /contracts/{id}/generate-invoices." },
|
|
593
|
+
notes: { type: ["string", "null"] }
|
|
594
|
+
}
|
|
595
|
+
},
|
|
564
596
|
ContractReadjustment: {
|
|
565
597
|
type: "object",
|
|
566
598
|
description: "Reajuste aplicado a um contrato (specs/reajustes/).",
|
|
@@ -833,6 +865,27 @@ var SCHEMAS = {
|
|
|
833
865
|
}
|
|
834
866
|
}
|
|
835
867
|
},
|
|
868
|
+
ExpenseUpdate: {
|
|
869
|
+
type: "object",
|
|
870
|
+
description: "S\xF3 os campos enviados mudam. Ao menos um \xE9 obrigat\xF3rio (`attachment_ids` sozinho vale).",
|
|
871
|
+
properties: {
|
|
872
|
+
supplier_id: { type: "string", format: "uuid", description: "Troca o fornecedor. Precisa ser fornecedor desta empresa (404 se n\xE3o for)." },
|
|
873
|
+
description: { type: "string" },
|
|
874
|
+
amount: { type: "number" },
|
|
875
|
+
expense_date: { type: "string", format: "date" },
|
|
876
|
+
payment_date: { type: ["string", "null"], format: "date" },
|
|
877
|
+
category_id: { type: ["string", "null"], format: "uuid" },
|
|
878
|
+
status: { type: "string", enum: ["pendente", "pago", "cancelado"] },
|
|
879
|
+
bank_account_id: { type: ["string", "null"], format: "uuid" },
|
|
880
|
+
payment_method_id: { type: ["string", "null"], format: "uuid" },
|
|
881
|
+
notes: { type: ["string", "null"] },
|
|
882
|
+
attachment_ids: {
|
|
883
|
+
type: "array",
|
|
884
|
+
items: { type: "string", format: "uuid" },
|
|
885
|
+
description: "ACRESCENTA anexos j\xE1 enviados \xE0 despesa (n\xE3o substitui os atuais). Anexo que a despesa j\xE1 tem \xE9 ignorado, ent\xE3o repetir a chamada n\xE3o duplica. Id inexistente nesta empresa \u2192 404, sem gravar nada."
|
|
886
|
+
}
|
|
887
|
+
}
|
|
888
|
+
},
|
|
836
889
|
PurchaseInvoice: {
|
|
837
890
|
type: "object",
|
|
838
891
|
properties: {
|
|
@@ -974,7 +1027,7 @@ var SCHEMAS = {
|
|
|
974
1027
|
type: "object",
|
|
975
1028
|
required: ["url"],
|
|
976
1029
|
properties: {
|
|
977
|
-
name: { type: "string", description: "R\xF3tulo opcional" },
|
|
1030
|
+
name: { type: ["string", "null"], description: "R\xF3tulo opcional. No PUT /webhooks/payments, omitido preserva o r\xF3tulo atual; null apaga." },
|
|
978
1031
|
url: { type: "string", format: "uri", description: "Deve come\xE7ar com https://" },
|
|
979
1032
|
events: { type: "array", items: { type: "string", enum: WEBHOOK_EVENT_KEYS }, description: "Eventos assinados (default: charge.paid, charge.cancelled, charge.expired)" },
|
|
980
1033
|
active: { type: "boolean", default: true }
|
|
@@ -1280,8 +1333,7 @@ var SCHEMAS = {
|
|
|
1280
1333
|
pix_key_type: { type: "string", enum: ["cpf", "cnpj", "email", "phone", "random"] },
|
|
1281
1334
|
pix_copia_e_cola: { type: "string", description: "QR Pix copia e cola (EMV)" },
|
|
1282
1335
|
boleto_barcode: { type: "string" },
|
|
1283
|
-
scheduled_for: { type: "string", format: "date", description: "Data de agendamento (YYYY-MM-DD); omitir paga \xE0 vista" }
|
|
1284
|
-
description: { type: "string" }
|
|
1336
|
+
scheduled_for: { type: "string", format: "date", description: "Data de agendamento (YYYY-MM-DD); omitir paga \xE0 vista" }
|
|
1285
1337
|
}
|
|
1286
1338
|
},
|
|
1287
1339
|
SplitRuleRecipient: {
|
|
@@ -1861,7 +1913,8 @@ var OPENAPI_SPEC = {
|
|
|
1861
1913
|
...PAGINATION_PARAMS,
|
|
1862
1914
|
{ name: "search", in: "query", schema: { type: "string" }, description: "Busca por nome, e-mail ou documento" },
|
|
1863
1915
|
{ name: "status", in: "query", schema: { type: "string" }, description: "Filtrar por status" },
|
|
1864
|
-
{ name: "type", in: "query", schema: { type: "string", enum: ["fisica", "juridica", "estrangeira"] }, description: "Filtrar por tipo de pessoa" }
|
|
1916
|
+
{ name: "type", in: "query", schema: { type: "string", enum: ["fisica", "juridica", "estrangeira"] }, description: "Filtrar por tipo de pessoa" },
|
|
1917
|
+
{ name: "include", in: "query", schema: { type: "string", enum: ["addresses"] }, description: "addresses = traz os endere\xE7os de cada cliente no campo `addresses` (1 chamada em vez de 1 por cliente)" }
|
|
1865
1918
|
],
|
|
1866
1919
|
responses: {
|
|
1867
1920
|
"200": paginatedResponse("#/components/schemas/Customer"),
|
|
@@ -1899,6 +1952,9 @@ var OPENAPI_SPEC = {
|
|
|
1899
1952
|
summary: "Obter cliente",
|
|
1900
1953
|
operationId: "getCustomer",
|
|
1901
1954
|
security: [{ ApiKeyAuth: ["customers:read"] }],
|
|
1955
|
+
parameters: [
|
|
1956
|
+
{ name: "include", in: "query", schema: { type: "string", enum: ["addresses"] }, description: "addresses = inclui os endere\xE7os do cliente no campo `addresses`" }
|
|
1957
|
+
],
|
|
1902
1958
|
responses: {
|
|
1903
1959
|
"200": { description: "Cliente", content: { "application/json": { schema: { $ref: "#/components/schemas/Customer" } } } },
|
|
1904
1960
|
"404": errorResponse("Cliente n\xE3o encontrado"),
|
|
@@ -1997,6 +2053,7 @@ var OPENAPI_SPEC = {
|
|
|
1997
2053
|
get: {
|
|
1998
2054
|
tags: ["Clientes"],
|
|
1999
2055
|
summary: "Listar endere\xE7os do cliente",
|
|
2056
|
+
description: "Funciona tamb\xE9m para cliente compartilhado com a sua empresa (somente leitura). Para os endere\xE7os de v\xE1rios clientes de uma vez, use GET /customers?include=addresses.",
|
|
2000
2057
|
operationId: "listCustomerAddresses",
|
|
2001
2058
|
security: [{ ApiKeyAuth: ["customers:read"] }],
|
|
2002
2059
|
responses: { "200": { description: "Endere\xE7os", content: { "application/json": { schema: { type: "object", properties: { data: { type: "array", items: { $ref: "#/components/schemas/CustomerAddress" } } } } } } }, "404": errorResponse("Cliente n\xE3o encontrado"), ...COMMON_ERRORS }
|
|
@@ -2116,8 +2173,8 @@ var OPENAPI_SPEC = {
|
|
|
2116
2173
|
summary: "Atualizar proposta",
|
|
2117
2174
|
operationId: "updateProposal",
|
|
2118
2175
|
security: [{ ApiKeyAuth: ["proposals:write"] }],
|
|
2119
|
-
requestBody: { required: true, content: { "application/json": { schema: { $ref: "#/components/schemas/
|
|
2120
|
-
responses: { "200": { description: "Proposta atualizada", content: { "application/json": { schema: { $ref: "#/components/schemas/Proposal" } } } }, "404": errorResponse("Proposta n\xE3o
|
|
2176
|
+
requestBody: { required: true, content: { "application/json": { schema: { $ref: "#/components/schemas/ProposalUpdate" } } } },
|
|
2177
|
+
responses: { "200": { description: "Proposta atualizada", content: { "application/json": { schema: { $ref: "#/components/schemas/Proposal" } } } }, "400": errorResponse("Dados inv\xE1lidos ou nenhum campo para atualizar"), "404": errorResponse("Proposta ou cliente n\xE3o encontrado"), ...COMMON_ERRORS }
|
|
2121
2178
|
},
|
|
2122
2179
|
delete: {
|
|
2123
2180
|
tags: ["Propostas"],
|
|
@@ -2186,8 +2243,8 @@ var OPENAPI_SPEC = {
|
|
|
2186
2243
|
summary: "Atualizar contrato",
|
|
2187
2244
|
operationId: "updateContract",
|
|
2188
2245
|
security: [{ ApiKeyAuth: ["contracts:write"] }],
|
|
2189
|
-
requestBody: { required: true, content: { "application/json": { schema: { $ref: "#/components/schemas/
|
|
2190
|
-
responses: { "200": { description: "Contrato atualizado", content: { "application/json": { schema: { $ref: "#/components/schemas/Contract" } } } }, "404": errorResponse("Contrato n\xE3o encontrado"), ...COMMON_ERRORS }
|
|
2246
|
+
requestBody: { required: true, content: { "application/json": { schema: { $ref: "#/components/schemas/ContractUpdate" } } } },
|
|
2247
|
+
responses: { "200": { description: "Contrato atualizado", content: { "application/json": { schema: { $ref: "#/components/schemas/Contract" } } } }, "400": errorResponse("Dados inv\xE1lidos ou nenhum campo para atualizar"), "404": errorResponse("Contrato ou cliente n\xE3o encontrado"), "409": errorResponse("Troca de cliente com autoriza\xE7\xE3o de d\xE9bito recorrente ativa"), ...COMMON_ERRORS }
|
|
2191
2248
|
},
|
|
2192
2249
|
delete: {
|
|
2193
2250
|
tags: ["Contratos"],
|
|
@@ -3299,8 +3356,8 @@ var OPENAPI_SPEC = {
|
|
|
3299
3356
|
summary: "Atualizar despesa",
|
|
3300
3357
|
operationId: "updateExpense",
|
|
3301
3358
|
security: [{ ApiKeyAuth: ["expenses:write"] }],
|
|
3302
|
-
requestBody: { required: true, content: { "application/json": { schema: { $ref: "#/components/schemas/
|
|
3303
|
-
responses: { "200": { description: "Despesa atualizada", content: { "application/json": { schema: { $ref: "#/components/schemas/Expense" } } } }, "404": errorResponse("Despesa n\xE3o
|
|
3359
|
+
requestBody: { required: true, content: { "application/json": { schema: { $ref: "#/components/schemas/ExpenseUpdate" } } } },
|
|
3360
|
+
responses: { "200": { description: "Despesa atualizada", content: { "application/json": { schema: { $ref: "#/components/schemas/Expense" } } } }, "400": errorResponse("Dados inv\xE1lidos ou nenhum campo para atualizar"), "404": errorResponse("Despesa, fornecedor ou anexo n\xE3o encontrado"), ...COMMON_ERRORS }
|
|
3304
3361
|
},
|
|
3305
3362
|
delete: {
|
|
3306
3363
|
tags: ["Despesas"],
|
|
@@ -4896,7 +4953,7 @@ function buildWhoamiTool(api) {
|
|
|
4896
4953
|
// src/branding.ts
|
|
4897
4954
|
var MCP_SERVER_NAME = "comando-one";
|
|
4898
4955
|
var MCP_SERVER_TITLE = "Comando1";
|
|
4899
|
-
var MCP_SERVER_VERSION = "0.12.
|
|
4956
|
+
var MCP_SERVER_VERSION = "0.12.2";
|
|
4900
4957
|
var MCP_SERVER_DESCRIPTION = "ERP das empresas de servi\xE7o brasileiras: clientes, propostas, contratos, faturas, cobran\xE7as Pix e boleto, NFS-e, contas a pagar e financeiro.";
|
|
4901
4958
|
var MCP_SERVER_WEBSITE = "https://comando.one";
|
|
4902
4959
|
var MCP_SERVER_ICONS = [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@comando.one/mcp-server",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.2",
|
|
4
4
|
"description": "Servidor MCP (Model Context Protocol) para a API pública do Comando1 — opere seu ERP por linguagem natural.",
|
|
5
5
|
"author": "Orbital Tecnologia e Desenvolvimento LTDA <contato@comando.one> (https://orbitaldev.com.br)",
|
|
6
6
|
"homepage": "https://comando.one",
|