create_financial_category
Referência da tool create_financial_category do MCP Server do bitERP (Categorias financeiras).
Create Financial Category · Categorias financeiras
| Somente leitura | Destrutiva | Idempotente | Mundo aberto |
|---|---|---|---|
| Não | Não | Não | Não |
Descrição
A descrição abaixo é a que o servidor publica, em inglês, e é o texto que o agente lê para decidir quando usar a tool.
Creates one internal financial category record or subcategory record.
Parâmetros
| Parâmetro | Tipo | Obrigatório | Descrição |
|---|---|---|---|
tenant | string | Sim | Defines which tenant will have data read or changed. Use list_tenants first and prefer the returned tenant slug. Writes are permanent, so when the user has more than one tenant you must confirm the tenant before any write and never assume or reuse a previous choice without confirmation. UUID is accepted only when already known safely. |
name | string | Sim | Category name |
type | string | Sim | Category type Valores: revenue, expense. |
parent_id | string (UUID) | Não | Optional parent category ID (for subcategory) |
code | string | Não | Internal chart-of-accounts code, two digits per level (e.g. "06.01.03"). Free typing is normalized ("6.1" -> "06.01"). Derived from the parent when omitted. |
presentation_role | string | Não | IFRS 18 presentation axis. Must match the parent role. "balance_sheet_movement" is settlement/equity traffic and never reaches the income statement. Valores: gross_revenue, revenue_deduction, cost_of_sales, operating_expense, other_operating_income, investing_income, investing_expense, financing_income, financing_expense, income_tax, balance_sheet_movement. |
expense_nature | string | Não | Expense nature for the IFRS 18 by-nature note. Required for cost_of_sales and operating_expense, rejected for every other role. Valores: employee_benefits, depreciation, amortisation, impairment, inventory_writedown, materials, services, other. |
is_locked | boolean | Não | If true, blocks usage in new documents |
description | string | Não | Optional description |
Resposta
O structuredContent da resposta traz os campos abaixo (até dois níveis; o schema completo está no outputSchema publicado no tools/list).
| Campo | Tipo | Descrição |
|---|---|---|
id | string (UUID) | — |
tenant_id | string (UUID) | — |
parent_id | string (UUID) ou null | — |
type | string | Valores: revenue, expense. |
reference_code | string ou null | — |
name | string | — |
code | string ou null | — |
presentation_role | string ou null | Valores: gross_revenue, revenue_deduction, cost_of_sales, operating_expense, other_operating_income, investing_income, investing_expense, financing_income, financing_expense, income_tax, balance_sheet_movement. |
expense_nature | string ou null | Valores: employee_benefits, depreciation, amortisation, impairment, inventory_writedown, materials, services, other. |
is_locked | boolean | — |
is_system | boolean | — |
description | string ou null | — |
metadata | object | — |
created_by_user_id | string (UUID) ou null | — |
updated_by_user_id | string (UUID) ou null | — |
deleted_by_user_id | string (UUID) ou null | — |
created_at | string (date-time) | — |
updated_at | string (date-time) | — |
deleted_at | string (date-time) ou null | — |
parent | object ou null | — |
parent.id | string (UUID) | — |
parent.name | string | — |
parent.code | string ou null | — |
_tenant | object | — |
_tenant.id | string (UUID) | — |
_tenant.slug | string | — |
_tenant.company_name | string | — |
Exemplo de chamada
Requisição tools/call com os parâmetros obrigatórios. Os valores são ilustrativos: troque minha-empresa pelo tenant devolvido por list_tenants e cada <...> por um valor real.
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "create_financial_category",
"arguments": {
"tenant": "minha-empresa",
"name": "<name>",
"type": "revenue"
}
}
}
