Skip to main content
Glama
seoh0711

NASA API Desktop Extension

by seoh0711

get_neo_feed

Retrieve Near Earth Object (NEO) data for specific date ranges using the NASA API Desktop Extension. Input start and end dates to access up-to-date astronomical information.

Instructions

근지구 천체(Near Earth Objects) 정보를 가져옵니다

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
end_dateNo종료 날짜 (YYYY-MM-DD)
start_dateNo시작 날짜 (YYYY-MM-DD)

Implementation Reference

  • The main handler function that fetches Near Earth Object (NEO) feed data from NASA's API based on provided date range, processes the asteroids data, and returns a formatted text response listing up to 10 NEOs with details like name, size, hazard status, and approach data.
      async getNEOFeed(args) {
        const { start_date, end_date } = args || {};
        const params = new URLSearchParams({
          api_key: this.apiKey,
        });
    
        if (start_date) params.append('start_date', start_date);
        if (end_date) params.append('end_date', end_date);
    
        const response = await fetch(`${this.baseUrl}/neo/rest/v1/feed?${params}`);
        const data = await response.json();
    
        if (!response.ok) {
          throw new Error(`NASA API 오류: ${data.error?.message || '알 수 없는 오류'}`);
        }
    
        const totalCount = data.element_count;
        const dates = Object.keys(data.near_earth_objects);
        let neoList = [];
    
        dates.forEach(date => {
          data.near_earth_objects[date].forEach(neo => {
            neoList.push({
              date,
              name: neo.name,
              id: neo.id,
              diameter: neo.estimated_diameter.kilometers,
              hazardous: neo.is_potentially_hazardous_asteroid,
              close_approach: neo.close_approach_data[0],
            });
          });
        });
    
        return {
          content: [
            {
              type: 'text',
              text: `**근지구 천체 정보** (${start_date || '오늘'} ~ ${end_date || '7일 후'})
    
    총 ${totalCount}개의 근지구 천체가 발견되었습니다:
    
    ${neoList.slice(0, 10).map((neo, index) => `
    ${index + 1}. **${neo.name}**
       - **ID**: ${neo.id}
       - **날짜**: ${neo.date}
       - **지름**: ${neo.diameter.estimated_diameter_min.toFixed(3)} - ${neo.diameter.estimated_diameter_max.toFixed(3)} km
       - **위험 여부**: ${neo.hazardous ? '위험' : '안전'}
       - **최근접 거리**: ${parseFloat(neo.close_approach.miss_distance.kilometers).toLocaleString()} km
       - **속도**: ${parseFloat(neo.close_approach.relative_velocity.kilometers_per_hour).toLocaleString()} km/h
    `).join('')}`,
            },
          ],
        };
      }
  • Input schema definition for the get_neo_feed tool, specifying optional start_date and end_date parameters as strings in YYYY-MM-DD format.
    inputSchema: {
      type: 'object',
      properties: {
        start_date: {
          type: 'string',
          description: '시작 날짜 (YYYY-MM-DD)',
        },
        end_date: {
          type: 'string',
          description: '종료 날짜 (YYYY-MM-DD)',
        },
      },
    },
  • server/index.js:85-101 (registration)
    Tool registration entry in the listTools response, including name 'get_neo_feed', Korean description, and input schema.
    {
      name: 'get_neo_feed',
      description: '근지구 천체(Near Earth Objects) 정보를 가져옵니다',
      inputSchema: {
        type: 'object',
        properties: {
          start_date: {
            type: 'string',
            description: '시작 날짜 (YYYY-MM-DD)',
          },
          end_date: {
            type: 'string',
            description: '종료 날짜 (YYYY-MM-DD)',
          },
        },
      },
    },
  • Switch case in the CallToolRequest handler that routes 'get_neo_feed' tool calls to the getNEOFeed method.
    case 'get_neo_feed':
      return await this.getNEOFeed(args);
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It only states what the tool does ('get information') without adding context like whether it's a read-only operation, if there are rate limits, authentication needs, or what the return format might be. For a tool with zero annotation coverage, this is a significant gap 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.

Conciseness5/5

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

The description is a single, efficient sentence in Korean that directly states the tool's purpose without any unnecessary words or fluff. It's front-loaded and appropriately sized for its content, making it highly concise and well-structured.

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 complexity (fetching NEO data with date parameters), lack of annotations, and no output schema, the description is incomplete. It doesn't explain what information is returned, how results are formatted, or any behavioral traits like error handling. For a data retrieval tool with these gaps, the description should provide more context to be fully helpful.

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?

The input schema has 100% description coverage, with clear descriptions for 'start_date' and 'end_date' parameters. The description doesn't add any meaning beyond the schema, such as explaining date range constraints or default behaviors. Since the schema does the heavy lifting, the baseline score of 3 is appropriate, as the description doesn't compensate but also doesn't detract.

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

Purpose4/5

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

The description clearly states the tool's purpose: '근지구 천체(Near Earth Objects) 정보를 가져옵니다' translates to 'Get Near Earth Objects information.' This specifies the verb ('get') and resource ('Near Earth Objects information'), making it clear what the tool does. However, it doesn't differentiate from sibling tools like 'get_apod' or 'get_mars_rover_photos,' which also fetch data but for different resources, so it lacks explicit sibling distinction.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention any context, exclusions, or prerequisites, such as when to choose this over other sibling tools like 'search_nasa_images' for broader searches. Without such information, users must infer usage from the tool name and schema alone.

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

Related 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/seoh0711/dxt_nasa'

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