Skip to main content
Glama

particle_swarm_optimization

Optimizes spacecraft trajectories by applying particle swarm optimization to defined problems, returning the best trajectory and convergence metrics. Use to find near-optimal solutions for complex aerospace design challenges.

Instructions

Optimize spacecraft trajectory using particle swarm optimization.

Args: optimization_problem: Problem definition (objective, constraints, variables) pso_parameters: Optional PSO parameters (n_particles, iterations, etc.)

Returns: JSON string with optimization results including best position found and convergence metrics.

Raises: No exceptions are raised directly; errors are returned as formatted strings.

Note: PSO updates each particle's velocity and position at every iteration: v_i(t+1) = wv_i(t) + c1r1*(p_best_i - x_i) + c2r2(g_best - x_i) x_i(t+1) = x_i(t) + v_i(t+1) where w is the inertia weight (balances exploration vs exploitation), c1/c2 are cognitive/social acceleration coefficients, r1/r2 are random numbers in [0,1], p_best_i is the particle's personal best, and g_best is the global best found by any particle in the swarm.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
optimization_problemYes
pso_parametersNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Given no annotations, the description effectively discloses key behaviors: the PSO update formula, error handling (errors returned as formatted strings), and algorithmic details. However, it does not explicitly state whether the tool has side effects (it is likely read-only), nor does it mention prerequisites or rate limits, which would elevate 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 front-loaded with the purpose, then systematically covers args, returns, errors, and a note. The inclusion of the full update formula is dense but valuable. It is appropriately sized for a complex optimization tool, though some redundancy exists (e.g., repeating parameters in args and later).

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

Completeness4/5

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

Given the presence of an output schema and the input schema's genericity, the description provides sufficient context for a scientific tool: it explains the algorithm, return format, and error handling. Minor gaps include no elaboration on variable types or constraints in the problem definition, but overall it meets the complexity level.

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

Parameters4/5

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

With 0% schema description coverage, the description compensates by explaining both parameters: optimization_problem as 'Problem definition (objective, constraints, variables)' and pso_parameters as 'Optional PSO parameters (n_particles, iterations, etc.).' This adds meaningful structural hints beyond the raw schema, though it does not enumerate all subfields.

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?

The description clearly states the tool's purpose: 'Optimize spacecraft trajectory using particle swarm optimization.' It specifies the verb (optimize), resource (spacecraft trajectory), and method (PSO), distinguishing it from sibling optimization tools like genetic algorithm or Monte Carlo.

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 like genetic_algorithm_optimization or monte_carlo_uncertainty_analysis. It neither suggests appropriate scenarios nor warns about limitations, leaving the agent without decision-making context.

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/cheesejaguar/aerospace-mcp'

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