Skip to main content
Glama

jpl_periodic_orbits

Query NASA's JPL database for three-body periodic orbits by specifying system, family, and orbital parameters to analyze celestial mechanics.

Instructions

JPL Three-Body Periodic Orbits Database

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sysYesThree-body system (e.g., earth-moon, sun-earth)
familyYesOrbit family name (e.g., halo, dro, lyapunov)
librNoLibration point (1-5, required for some families)
branchNoBranch within family (N/S, E/W, etc., required for some families)
periodminNoMinimum period
periodmaxNoMaximum period
periodunitsNoUnits for period (s, h, d, TU)
jacobiminNoMinimum Jacobi constant
jacobimaxNoMaximum Jacobi constant
stabminNoMinimum stability index
stabmaxNoMaximum stability index

Implementation Reference

  • Main handler function that validates inputs, transforms parameters, queries JPL SSD Periodic Orbits API, stores result as resource, and returns MCP-formatted response.
    export async function periodicOrbitsHandler(args: PeriodicOrbitParams) {
      try {
        // Validate required parameters
        if (!args.sys || !args.family) {
          throw new Error('Missing required parameters: sys and family must be provided.');
        }
        
        // Base URL for the Periodic Orbits API
        const baseUrl = 'https://ssd-api.jpl.nasa.gov/periodic_orbits.api';
        
        // Transform parameter names from underscore to hyphenated format
        const transformedParams = transformParamsToHyphenated(args);
        
        // Make the API request using GET with parameters
        const response = await axios.get(baseUrl, { params: transformedParams });
        const data = response.data;
        
        // Create a resource URI 
        // Example: jpl://periodic-orbits?sys=earth-moon&family=halo&libr=1&branch=N
        let resourceUri = `jpl://periodic-orbits?sys=${encodeURIComponent(args.sys)}&family=${encodeURIComponent(args.family)}`;
        let resourceName = `Periodic Orbits: ${args.sys} / ${args.family}`;
        if (args.libr) {
          resourceUri += `&libr=${args.libr}`;
          resourceName += ` / L${args.libr}`;
        }
        if (args.branch) {
          resourceUri += `&branch=${encodeURIComponent(args.branch)}`;
          resourceName += ` / Branch ${args.branch}`;
        }
        // Potentially add filter params to URI/Name if needed for uniqueness
    
        // Add response to resources
        addResource(resourceUri, {
          name: resourceName,
          mimeType: "application/json", 
          text: JSON.stringify(data, null, 2)
        });
        
        // Format the response for MCP
        return {
          content: [{
            type: "text",
            text: JSON.stringify(data, null, 2)
          }]
        };
      } catch (error: any) {
        let errorMessage = `Error accessing JPL Periodic Orbits API: ${error.message}`;
        if (error.response) {
          // Include more detail from the API response if available
          errorMessage += `\nStatus: ${error.response.status}\nData: ${JSON.stringify(error.response.data)}`;
        }
        return {
          content: [{
            type: "text",
            text: errorMessage
          }],
          isError: true
        };
      }
    }
  • TypeScript interface defining the input parameters for the periodicOrbitsHandler, matching the JPL API parameters.
    interface PeriodicOrbitParams {
      sys: string;
      family: string;
      libr?: number;
      branch?: string;
      periodmin?: number;
      periodmax?: number;
      periodunits?: string;
      jacobimin?: number;
      jacobimax?: number;
      stabmin?: number;
      stabmax?: number;
    }
  • src/index.ts:1349-1380 (registration)
    Tool registration in tools/list endpoint defining the tool name 'jpl_periodic_orbits' and its input schema.
      name: "jpl_periodic_orbits",
      description: "JPL Three-Body Periodic Orbits Database",
      inputSchema: {
        type: "object",
        properties: {
          sys: {
            type: "string",
            description: "Three-body system (e.g., earth-moon, sun-earth)"
          },
          family: {
            type: "string",
            description: "Orbit family name (e.g., halo, dro, lyapunov)"
          },
          libr: {
            type: "integer",
            description: "Libration point (1-5, required for some families)"
          },
          branch: {
            type: "string",
            description: "Branch within family (N/S, E/W, etc., required for some families)"
          },
          periodmin: { type: "number", description: "Minimum period" },
          periodmax: { type: "number", description: "Maximum period" },
          periodunits: { type: "string", description: "Units for period (s, h, d, TU)", enum: ["s", "h", "d", "TU"] },
          jacobimin: { type: "number", description: "Minimum Jacobi constant" },
          jacobimax: { type: "number", description: "Maximum Jacobi constant" },
          stabmin: { type: "number", description: "Minimum stability index" },
          stabmax: { type: "number", description: "Maximum stability index" }
        },
        required: ["sys", "family"]
      }
    },
  • src/index.ts:2160-2166 (registration)
    Global MCP tool registration for 'mcp__jplperiodic_orbits' that routes to the JPL periodic orbits handler.
    registerGlobalTool('mcp__jplperiodic_orbits', async (args: Record<string, any>) => {
      serverInstance?.sendLoggingMessage({
        level: "info",
        data: `MCP JPL Periodic Orbits called with args: ${JSON.stringify(args)}`,
      });
      return await handleToolCall('jpl/periodic_orbits', args);
    });
Behavior1/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but fails to do so. It doesn't describe whether this is a read-only query, a data retrieval operation, or if it has any side effects like rate limits or authentication needs. For a tool with 11 parameters and no output schema, this lack of transparency 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.

Conciseness3/5

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

The description is a single phrase, which is concise but under-specified rather than efficiently informative. It's front-loaded but lacks substance, failing to earn its place with useful details. While not verbose, it's too brief to be helpful, balancing between conciseness and inadequacy.

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 complexity (11 parameters, no annotations, no output schema), the description is incomplete. It doesn't explain what the tool returns, how results are structured, or any behavioral traits. For a database query tool with rich input parameters, more context is needed to guide the agent effectively, making this description insufficient for the tool's scope.

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 schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds no additional meaning beyond what the schema provides, such as explaining relationships between parameters (e.g., how 'libr' interacts with 'family'). Baseline 3 is appropriate since the schema does the heavy lifting, but the description doesn't compensate or enhance understanding.

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

Purpose2/5

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

The description 'JPL Three-Body Periodic Orbits Database' restates the tool name with minimal elaboration, making it tautological. It lacks a specific verb or action (e.g., 'query', 'search', 'retrieve'), leaving the tool's function vague. While it hints at accessing a database, it doesn't clarify what the tool actually does with the data, distinguishing it poorly from siblings like 'jpl_horizons' or 'nasa_neo'.

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

Usage Guidelines1/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, prerequisites, or exclusions, such as when to choose it over other JPL or NASA tools for orbital data. This absence leaves the agent without direction for appropriate tool selection among the many siblings listed.

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