get_unit_of_measurement
Referência da tool get_unit_of_measurement do MCP Server do bitERP (Unidades de medida).
Get Unit of Measurement · Unidades de medida
| Somente leitura | Destrutiva | Idempotente | Mundo aberto |
|---|---|---|---|
| Sim | Não | Sim | 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.
Returns one unit of measurement for the organization country by UUID or technical code.
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. |
id | string (UUID) | Não | The UUID of the unit of measurement to retrieve |
code | string | Não | Technical code of the unit of measurement (e.g. KG, UN) |
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) | — |
code | string | — |
symbol | string | — |
fiscal_codes | object | — |
country_codes | array de string | — |
titles | object | — |
descriptions | object | — |
is_blocked | boolean | — |
display_order | integer | — |
created_at | string (date-time) | — |
updated_at | string (date-time) | — |
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.
Além dos parâmetros obrigatórios, a tool exige pelo menos um destes: id, code. Sem nenhum, ela responde ValidationError. O exemplo usa code.
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_unit_of_measurement",
"arguments": {
"tenant": "minha-empresa",
"code": "UN"
}
}
}
