Skip to main content
Glama

GeoSGB — Serviço Geológico do Brasil

Unidades geológicas por área ou ponto

get_lithology_by_area
Read-onlyIdempotent
Lista as unidades litoestratigráficas que intersectam um recorte — "que
unidades geológicas há nesta área" ou "que unidade está sob este ponto" —
a partir do mapa geológico do Brasil 1:1.000.000 (2004) do Serviço
Geológico do Brasil: camada "Unidades litoestratigráficas - 1:1.000.000
[2004]", 46.712 polígonos. Escala de reconhecimento: unidades pequenas
não aparecem e limites são aproximados.

Recorte OBRIGATÓRIO, um dos dois (nunca os dois):
- bbox de até 25 graus quadrados (os quatro cantos, em graus WGS84);
- ponto: lon + lat (graus WGS84) — as unidades cujo polígono contém o
  ponto (normalmente uma; no mar ou fora do mapa, nenhuma — lista
  vazia, não erro).
Sem recorte, só lon ou só lat, bbox acima do teto, ou bbox E ponto
juntos: recusado antes de ir à fonte.

A resposta é DERIVADA (provenance.derived = true): a fonte devolve
polígonos e a tool os agrega, no cliente, por sigla da unidade. Cada
unidade traz sigla (code), nome, hierarquia (Formação, Grupo, Suíte,
Complexo...), sigla e nome da unidade-pai, litotipos, idade mínima e
máxima em milhões de anos (Ma), éon/era/sistema/época mínimos e máximos,
polygon_count (quantos polígonos da unidade tocam o recorte) e area_deg2.
ATENÇÃO a area_deg2: é a soma da área dos polígonos INTEIROS que tocam o
recorte, em graus quadrados (a fonte é WGS84), NÃO a área dentro do
recorte — serve para ordenar (a lista vem da maior para a menor) e
comparar unidades, não para medir o recorte. Sem geometria.

Custo: uma ida, sem geometria, 17
campos. Bbox de 1°×1° no Quadrilátero Ferrífero: 311 polígonos em 60
unidades, 0,15 MB, ~0,5 s; o teto de 25 graus quadrados (5°×5°, centro
de MG): 4.180 polígonos em 356 unidades, 2,1 MB, ~4 s; um ponto: ~0,4 s.
A primeira chamada do processo pode demorar bem mais (17 s medidos no
1°×1°: o portal frio), as seguintes não.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_lithology_by_area"
  }
}

Input Schema

NameRequiredDescriptionDefault
latNoLatitude do ponto, graus WGS84; vem junto com lon, e nunca com um bbox
lonNoLongitude do ponto, graus WGS84; vem junto com lat, e nunca com um bbox
limitNoMáximo de UNIDADES na resposta (1 a 100); o resto se alcança com offset
offsetNoQuantas UNIDADES pular antes da primeira devolvida
bbox_xmaxNoLongitude máxima (leste) do retângulo, graus WGS84. Os quatro cantos vêm juntos ou nenhum; incompleto, invertido ou fora do globo é recusado.
bbox_xminNoLongitude mínima (oeste) do retângulo, graus WGS84. Os quatro cantos vêm juntos ou nenhum; incompleto, invertido ou fora do globo é recusado.
bbox_ymaxNoLatitude máxima (norte) do retângulo, graus WGS84. Os quatro cantos vêm juntos ou nenhum; incompleto, invertido ou fora do globo é recusado.
bbox_yminNoLatitude mínima (sul) do retângulo, graus WGS84. Os quatro cantos vêm juntos ou nenhum; incompleto, invertido ou fora do globo é recusado.

Output Schema

NameRequiredDescriptionDefault
countYesQuantas unidades esta resposta traz (depois de limit/offset)
unitsYesUnidades litoestratigráficas, da maior area_deg2 para a menor (agregadas no cliente por sigla; sem geometria)
offsetYesQuantas unidades foram puladas antes desta página (o offset pedido)
provenanceYesBloco de proveniência (contrato v1.0 do portfólio): fonte, camada, WHERE efetiva, URL que reproduz a consulta, instante da extração em UTC e licença
attributionYesURLs de origem distintas desta resposta (a lista de atribuição a citar)
total_countYesTotal de unidades distintas (por sigla) que intersectam o recorte
polygon_countYesTotal de polígonos lidos da fonte antes da agregação por unidade

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well past the annotations (readOnly/idempotent/openWorld/non-destructive) by disclosing that the response is client-side derived and aggregated by unit code, that provenance.derived=true, and that area_deg2 sums whole polygons rather than the overlap — a trap an agent would otherwise fall into. Cost/latency is quantified (1 ida, ~0,5 s vs ~4 s, 17 s cold portal) and the empty-list-not-error case for sea/off-map points is called out.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose and the mandatory-clip rule, then source, then derived-response caveats, then cost — a sensible priority order with headings-like breaks. The cost paragraph is dense but short relative to its decision value; a few clauses (polygon counts per example) could be trimmed without loss.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 8 all-optional parameters, a real output schema, and rich annotations, the description covers everything an agent needs: how to supply a clip, what gets rejected, that results are derived and sorted by area_deg2, the recognition-scale limitation (small units absent, boundaries approximate), and expected latency. Return-field enumeration is correctly left to the output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With schema description coverage at 100%, the schema already defines lat/lon/bbox corners/limit/offset precisely. The description's added value is the 25-square-degree ceiling on bbox and the one-of-two rule, which the schema itself does not express; it says nothing extra about limit/offset beyond what is already documented.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource — listing lithostratigraphic units intersecting a clip — and anchors it to a named source layer (mapa geológico do Brasil 1:1.000.000, 2004, 46.712 polígonos). The two concrete user questions in quotes ("que unidades há nesta área" / "que unidade está sob este ponto") make the intended use unmistakable against occurrence/outcrop-oriented siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly defines the mandatory clip and the two mutually exclusive modes (bbox ≤25 deg² or lon+lat point, never both), plus the exact rejection conditions (missing clip, single coordinate, oversized bbox, bbox AND point). It does not, however, name or route to any alternative tool for adjacent needs such as outcrops or occurrence lookup, leaving that inference to the agent.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.