get_country
Referência da tool get_country do MCP Server do bitERP (Países, estados e cidades).
Get Country · Países, estados e cidades
| 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 country by numeric ID, ISO2 code, or ISO3 code, including localized metadata when available.
Parâmetros
| Parâmetro | Tipo | Obrigatório | Descrição |
|---|---|---|---|
id | integer | Não | Country ID (integer) |
iso2 | string | Não | ISO 3166-1 alpha-2 code (e.g., BR, US) |
iso3 | string | Não | ISO 3166-1 alpha-3 code (e.g., BRA, USA) |
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 | integer | — |
iso2 | string | — |
iso3 | string | — |
numeric_code | string ou null | — |
name_en | string | — |
name_pt | string ou null | — |
name_es | string ou null | — |
native | string ou null | — |
phone_code | string ou null | — |
capital | string ou null | — |
currency | string ou null | — |
currency_name | string ou null | — |
currency_symbol | string ou null | — |
tld | string ou null | — |
region | string ou null | — |
subregion | string ou null | — |
region_id | integer ou null | — |
subregion_id | integer ou null | — |
nationality | string ou null | — |
latitude | string ou null | — |
longitude | string ou null | — |
emoji | string ou null | — |
emoji_u | string ou null | — |
is_blocked | boolean | — |
display_order | integer | — |
created_at | string (date-time) | — |
updated_at | string (date-time) | — |
metadata | array de objetos | — |
metadata[].id | integer | — |
metadata[].metadata_type | string | — |
metadata[].metadata_value | string | — |
metadata[].description | string ou null | — |
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 exatamente um destes: id, iso2, iso3. Sem nenhum, ou com mais de um, ela responde ValidationError. O exemplo usa iso2.
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_country",
"arguments": {
"iso2": "BR"
}
}
}
