Skip to main content
Glama

get_seismic_data

Retrieve recent seismic activity data for Portugal, including continental areas, Azores, and Madeira, to monitor earthquake occurrences.

Instructions

Obter dados sísmicos recentes

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
areaNoÁrea: 'continent', 'azores', 'madeira', ou 'all'all

Implementation Reference

  • The handler function for get_seismic_data tool. Fetches seismic data from IPMA API for specified area, formats recent earthquakes (up to 10) into a markdown text response with details like time, location, magnitude, depth, coordinates.
    async getSeismicData(area) {
      try {
        let areaId;
        switch (area.toLowerCase()) {
          case "continent":
            areaId = 1;
            break;
          case "azores":
            areaId = 2;
            break;
          case "madeira":
            areaId = 3;
            break;
          default:
            areaId = 1;
        }
    
        const response = await fetch(`${this.baseUrl}/observation/seismic/${areaId}.json`);
        const data = await response.json();
    
        if (!data.data || data.data.length === 0) {
          return {
            content: [
              {
                type: "text",
                text: "Não há dados sísmicos recentes para a área especificada."
              }
            ]
          };
        }
    
        let result = `**Dados Sísmicos - ${area}**\n\n`;
        result += `Última atualização: ${data.data[0]?.dataUpdate}\n\n`;
    
        const recentData = data.data.slice(0, 10);
        
        recentData.forEach((earthquake) => {
          const eventTime = new Date(earthquake.time).toLocaleString('pt-PT');
          result += `**${eventTime}**\n`;
          result += `Local: ${earthquake.obsRegion || 'N/A'}\n`;
          result += `Magnitude: ${earthquake.magnitud} ${earthquake.magType}\n`;
          result += `Profundidade: ${earthquake.depth} km\n`;
          result += `Coordenadas: ${earthquake.lat}, ${earthquake.lon}\n\n`;
        });
    
        return {
          content: [
            {
              type: "text",
              text: result
            }
          ]
        };
      } catch (error) {
        const errorMessage = error instanceof Error ? error.message : String(error);
        throw new McpError(ErrorCode.InternalError, `Erro ao obter dados sísmicos: ${errorMessage}`);
      }
    }
  • src/index.js:60-73 (registration)
    Registration of the get_seismic_data tool in the ListTools response, including name, description, and input schema defining optional 'area' parameter.
    {
      name: "get_seismic_data",
      description: "Obter dados sísmicos recentes",
      inputSchema: {
        type: "object",
        properties: {
          area: {
            type: "string",
            description: "Área: 'continent', 'azores', 'madeira', ou 'all'",
            default: "all"
          }
        }
      }
    },
  • src/index.js:112-113 (registration)
    Dispatcher case in CallToolRequestSchema handler that routes get_seismic_data calls to the getSeismicData method with default area 'all'.
    case "get_seismic_data":
      return await this.getSeismicData(args?.area || "all");
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It only states what the tool does ('obter dados sísmicos recentes') without revealing any behavioral traits such as data freshness guarantees, rate limits, authentication requirements, error conditions, or response format. For a tool with zero annotation coverage, this represents significant gaps in transparency.

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?

The description is extremely concise - a single phrase in Portuguese. While appropriately brief, it's arguably too minimal given the lack of supporting context elsewhere. Every word earns its place, but more content might be warranted for completeness.

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

Completeness2/5

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

Given the tool's apparent simplicity (1 parameter, 100% schema coverage) but complete lack of annotations and output schema, the description is insufficient. It doesn't explain what 'recent' means, what format the seismic data returns, or any behavioral aspects. For a data retrieval tool with no structured output documentation, the description should provide more context about the nature of the returned data.

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?

Schema description coverage is 100%, with the single parameter 'area' fully documented in the schema (including type, description with allowed values, and default). The description adds no parameter information beyond what the schema already provides, so it meets the baseline of 3 for adequate coverage when schema does the heavy lifting.

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

Purpose3/5

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

The description 'Obter dados sísmicos recentes' clearly states the action ('obter' = get) and resource ('dados sísmicos recentes' = recent seismic data), providing a basic purpose. However, it lacks specificity about what constitutes 'recent' data and doesn't differentiate from sibling tools, which are all weather-related (locations, UV forecast, weather forecast, stations, warnings) - making this tool distinct by domain but not by detailed function.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives. The description doesn't mention prerequisites, appropriate contexts, or exclusions. While sibling tools are weather-focused (suggesting this is for seismic events), the description fails to explicitly state this distinction or provide usage scenarios.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/brandao-20/mcp_server_ipma'

If you have feedback or need assistance with the MCP directory API, please join our Discord server