Skip to main content
Glama

jpl_scout

Access JPL Scout data to retrieve orbits, ephemerides, and impact risk assessments for near-Earth objects using temporary designations or orbit IDs.

Instructions

Scout - NEOCP orbits, ephemerides, and impact risk data

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tdesNoObject temporary designation (e.g., P21Eolo)
orbit_idNoScout internal orbit ID
limitNoLimit number of results
fileNoType of data file to return (summary, ephem, obs, crit, all)
plotNoInclude plots in the response
summaryNoInclude summary data in the response

Implementation Reference

  • The primary handler function that implements the core logic for the 'jpl_scout' tool. It makes API requests to JPL Scout, handles errors, processes results using a helper, formats output, and adds resources.
    export async function jplScoutHandler(params: ScoutParams) {
      try {
        // Call the Scout API using jplApiRequest
        const result = await jplApiRequest('/scout.api', params);
    
        // Check for errors returned by jplApiRequest itself (network, etc.)
        if (result.isError) {
          return result; // Already formatted error response
        }
        
        // Check for API-specific errors within the payload (different formats)
        if (result.error_code || result.error) {
           return {
            isError: true,
            content: [{
              type: "text",
              text: `Error from Scout API: ${result.error_msg || result.error}`
            }]
          };
        }
    
        // Process the successful result
        const summaryText = processScoutResult(result, params);
        
        // Add the result as an MCP resource
        let resourceUri = 'jpl://scout/list';
        if (params.tdes) {
          resourceUri = `jpl://scout?tdes=${params.tdes}`;
        } else if (params.orbit_id) {
          resourceUri = `jpl://scout?orbit_id=${params.orbit_id}`;
        } else if (params.limit) {
          resourceUri = `jpl://scout/list?limit=${params.limit}`;
        } // Add more specific URIs if other params like 'file' are used
        
        addResource(resourceUri, {
          name: `JPL Scout Data ${params.tdes || params.orbit_id || '(List)'}`,
          mimeType: 'application/json',
          text: JSON.stringify(result, null, 2)
        });
    
        return {
          content: [{
            type: "text",
            text: summaryText
          }],
          isError: false
        };
        
      } catch (error: any) { // Catch unexpected errors during processing
        console.error('Error in JPL Scout handler:', error);
        return {
          isError: true,
          content: [{
            type: "text",
            text: `Handler Error: ${error.message || 'An unexpected error occurred processing Scout data'}`
          }]
        };
      }
    } 
  • Zod schema defining the input parameters (ScoutParams) for the jpl_scout tool, exported for use in handlers.
    const ScoutSchema = z.object({
      tdes: z.string().describe("Object temporary designation (e.g., P21Eolo)").optional(),
      orbit_id: z.string().describe("Scout internal orbit ID").optional(),
      limit: z.number().int().positive().describe("Limit number of results").optional(),
      file: z.enum(['summary', 'ephem', 'obs', 'crit', 'all']).describe("Type of data file to return").optional(),
      plot: z.boolean().describe("Include plots in the response").optional(),
      summary: z.boolean().describe("Include summary data in the response").optional()
    });
  • src/index.ts:1693-1709 (registration)
    Registers the direct MCP request handler for the 'jpl/scout' method, validating params with inline schema and delegating to the dynamic handleToolCall which imports and executes the handler.
    // Scout Handler
    server.setRequestHandler(
      z.object({ 
        method: z.literal("jpl/scout"),
        params: z.object({
          tdes: z.string().optional(),
          orbit_id: z.string().optional(),
          limit: z.number().int().positive().optional(),
          file: z.enum(['summary', 'ephem', 'obs', 'crit', 'all']).optional(),
          plot: z.boolean().optional(),
          summary: z.boolean().optional()
        }).optional()
      }),
      async (request) => {
        return await handleToolCall("jpl/scout", request.params || {});
      }
    );
  • src/index.ts:537-541 (registration)
    Lists 'jpl_scout' in the tools/manifest response, providing the tool name, ID, and description.
    {
      name: "jpl_scout",
      id: "jpl/scout",
      description: "NEOCP orbits, ephemerides, and impact risk data (Scout)"
    },
  • Supporting function that formats raw Scout API data into a human-readable markdown summary for single objects or lists.
    function processScoutResult(data: any, params: ScoutParams): string {
      // Handle API-level errors first
      if (data.error_code) {
        return `Error from Scout API (${data.error_code}): ${data.error_msg}`;
      }
      if (data.error) { // Handle other error format like "object does not exist"
        return `Error from Scout API: ${data.error}`;
      }
    
      let summary = `## JPL Scout Data\n\n`;
    
      if (params.tdes || params.orbit_id) {
        // Single object result
        if (!data.data || data.data.length === 0) {
          // If no specific error was returned, but data is empty, state that.
          return summary + `No data array found for object specified by ${params.tdes ? 'tdes='+params.tdes : ''}${params.orbit_id ? 'orbit_id='+params.orbit_id : ''}. Object may not exist or data type not available.`;
        }
        const obj = data.data[0];
        summary += `**Object:** ${obj.neo || 'N/A'} (${params.tdes || params.orbit_id})\n`;
        summary += `**Last Observed:** ${obj.last_obs || 'N/A'}\n`;
        summary += `**Observations:** ${obj.n_obs || 'N/A'}\n`;
        summary += `**RMS:** ${obj.rms || 'N/A'}\n`;
        summary += `**MOID (AU):** ${obj.moid || 'N/A'}\n`;
        summary += `**V_inf (km/s):** ${obj.v_inf || 'N/A'}\n`;
        summary += `**Impact Probability:** ${obj.impact_prob || 'N/A'}\n`;
        if (obj.summary) {
          summary += `**Summary:** ${obj.summary}\n`;
        }
        // Add more fields if file=ephem, obs, crit, all are requested
      } else {
        // List result
        summary += `**Total Objects Found:** ${data.total || 'N/A'}\n`;
        summary += `**Showing:** ${data.count !== undefined ? data.count : 'N/A'} (Limit: ${params.limit || data.limit || 'default'})\n\n`;
        if (data.data && Array.isArray(data.data) && data.data.length > 0) {
          data.data.forEach((obj: any, index: number) => {
            summary += `### ${index + 1}. ${obj.neo || 'Unknown Designation'}\n`;
            summary += `  - Last Observed: ${obj.last_obs || 'N/A'}\n`;
            summary += `  - Observations: ${obj.n_obs || 'N/A'}\n`;
            summary += `  - MOID (AU): ${obj.moid || 'N/A'}\n`;
            summary += `  - Impact Probability: ${obj.impact_prob || 'N/A'}\n`;
          });
        } else {
          summary += `No objects found matching criteria or returned in list.\n`;
        }
      }
      
      return summary;
    }
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 mentions the types of data returned but lacks critical details such as authentication requirements, rate limits, error handling, or whether this is a read-only or mutating operation. For a tool with no annotation coverage, this is a significant gap.

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 that front-loads the core purpose without unnecessary words. Every part of the sentence earns its place by specifying the data types retrieved, making it appropriately sized and well-structured.

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

Completeness3/5

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

Given the tool's complexity (6 parameters, no output schema, no annotations), the description is minimally adequate. It states what data is retrieved but lacks details on behavioral traits, usage context, and output format. With no output schema, it should ideally explain return values more, but the purpose is clear enough for basic use.

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, so the schema already documents all six parameters thoroughly. The description does not add any additional meaning or context beyond what the schema provides, such as explaining relationships between parameters or usage examples. Baseline 3 is appropriate when schema does the heavy lifting.

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 as retrieving 'NEOCP orbits, ephemerides, and impact risk data' with the verb 'Scout', which is specific and informative. However, it doesn't explicitly differentiate from sibling tools like 'jpl_sentry' or 'nasa_neo' that might handle similar Near-Earth Object data, missing full 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. With many sibling tools available (e.g., jpl_sentry, nasa_neo), there is no mention of specific contexts, prerequisites, or exclusions for selecting this tool over others.

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/ProgramComputer/NASA-MCP-server'

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