Skip to main content
Glama

Star Wars API & MCP server (swapi.build)

sw_random

Read-only

Returns one random Star Wars entity of the given resource type as a JSON object. Each call can return a different entity, so it is not idempotent. Useful for demos and quizzes; to fetch a specific entity use sw_search or sw_get.

Input Schema

NameRequiredDescriptionDefault
resourceYesResource type: PEOPLE, FILMS, PLANETS, SPECIES, STARSHIPS or VEHICLES. Any other value returns a tool error.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and idempotentHint=false, so safety and idempotency are covered. The description reinforces the non-idempotent behavior with the reason that each call can return a different entity, but adds little about response shape beyond saying it is a JSON object.

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?

Three short sentences, front-loaded with the operation and followed by behavioral context and alternatives. Every sentence contributes useful selection or usage information.

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?

For a simple one-parameter read tool, the definition covers purpose, alternatives, and randomness. However, with no output schema, it only says the result is a JSON object without describing the entity structure; this is a minor gap given the tool's simplicity.

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 has 100% description coverage and explicitly documents the resource enum and that invalid values return a tool error. The description does not add parameter meaning beyond the schema, so the baseline of 3 is appropriate.

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?

States a specific operation: returns one random Star Wars entity of a given resource type. It clearly distinguishes the tool from siblings by naming sw_search and sw_get for fetching specific entities.

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

Usage Guidelines5/5

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

Explicitly says the tool is useful for demos and quizzes, and directs the agent to sw_search or sw_get when a specific entity is needed. This gives clear when-to-use and when-to-use-alternatives guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.