Star Wars API & MCP server (swapi.build)
Server Details
Free Star Wars MCP server (SWAPI): people, films, planets, species, starships, vehicles. No API key.
- Status
- Healthy
- Uptime
- 0.0% over 64 days
- Last Tested
- Transport
- Streamable HTTP · MCP 2025-11-25
- URL
- Repository
- eldermoraes/swapi.build
- GitHub Stars
- 4
- Server Listing
- swapi-build
TDQS
Scored across 4 tools
Each tool maps to a clearly distinct retrieval mode: sw_get by id, sw_search by name substring, sw_list for full enumeration, and sw_random for non-deterministic picks. The descriptions explicitly guide when to prefer one over another (e.g. 'Start here' for sw_search, use sw_get for specific entities), leaving no meaningful overlap.
All four tools follow the same sw_<verb> pattern (get, list, random, search) with snake_case throughout. The prefix cleanly scopes the set to Star Wars and the verbs are predictable and readable.
Four tools is well-scoped for a read-only public dataset API, and each earns its place by covering a distinct access pattern. There is no bloat and no tool that could be folded into another without losing functionality.
The core read workflows (search, get-by-id, enumerate, random, plus relation expansion via expand) are covered with no dead ends. Minor gaps remain: no tool to discover available resource types/schema and no pagination or server-side filtering for large list results, though the descriptions mitigate this by recommending sw_search and the fields parameter.
Available Tools
4 toolssw_getARead-onlyIdempotentInspect
Gets one Star Wars entity by numeric record id and returns it as a JSON object. Take the id from the end of an entity's url field (from sw_search, sw_list or a relation URL). Ids are record ids, not episode numbers: FILMS id 1 is A New Hope (Episode IV). An unknown id returns a tool error, e.g. 'No films found with id 99'. Pass expand to get related records in the same call, e.g. ["homeworld", "species"]; name only the relations you need; * on a film can pass 50 KB.
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Numeric record id: the last segment of the entity's url field (1 in .../api/people/1). | |
| expand | No | Optional. Relations to embed, one level deep, under a final "expanded" key: PEOPLE homeworld, films, species, vehicles, starships; FILMS characters, planets, starships, vehicles, species; PLANETS residents, films; SPECIES homeworld, people, films; STARSHIPS and VEHICLES pilots, films; or ["*"] alone for all. Up to 8 names; an unknown name returns a tool error. | |
| resource | Yes | Resource type: PEOPLE, FILMS, PLANETS, SPECIES, STARSHIPS or VEHICLES. Any other value returns a tool error. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnly/idempotent/non-destructive, so the description is not carrying the safety burden; it instead adds behavior the annotations cannot: the JSON-object return shape, the tool-error response for an unknown id with an example message, and the warning that expanding '*' on a film can pass 50 KB. It stops short of stating what the error looks like for other resources or pagination, hence not a 5.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loads the core verb and result shape in the first sentence, then layers id derivation, the error contract, and the expand caveat in descending priority. No sentence is filler; the 50 KB warning and episode-number caveat are concrete and actionable.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema exists, and the description compensates by naming the return type (JSON object), the shape of expanded data, and the exact error behavior for a bad id. For a three-parameter read tool with full annotation coverage, nothing an agent needs to call it correctly is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the baseline is 3; the description earns an extra point by clarifying the semantic meaning of id (record id, not episode number) and by adding practical guidance on expand — one level deep only, requesting only needed relations, and the payload cost of '*'. The per-resource relation list is duplicated in the schema, so it adds no new value there.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb (gets) and resource (one Star Wars entity) scoped to a numeric record id, and explicitly separates itself from sw_list and sw_search by retrieving a single record by id. An agent can distinguish it from all three siblings without opening a schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explains exactly where the id comes from (the trailing segment of an entity url produced by sw_search, sw_list, or a relation URL) and explicitly warns against a common misuse — episode numbers versus record ids, with FILMS id 1 as the concrete example. It also advises naming only the relations needed rather than blindly expanding.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
sw_listARead-onlyIdempotentInspect
Lists every entity of one Star Wars resource type as a JSON array (Episodes I-VI data). Responses are large (all 82 PEOPLE, about 38 KB); to find a single entity, prefer sw_search, then sw_get; for a compact index pass fields, e.g. ["name"] (about 5 KB).
| Name | Required | Description | Default |
|---|---|---|---|
| fields | No | Optional. Field names to keep in each entity (url is always kept), e.g. ["name"] (FILMS: ["title"]). Up to 24 names; an unknown name returns a tool error listing the valid ones. Omit for full entities. | |
| resource | Yes | Resource type: PEOPLE, FILMS, PLANETS, SPECIES, STARSHIPS or VEHICLES. Any other value returns a tool error. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnly/idempotent/non-destructive, but the description adds what they cannot: the response is large (all 82 PEOPLE, ~38 KB) and shrinks to ~5 KB with fields. That payload-size warning is exactly the context an agent needs to avoid blowing its context window, and it is not available anywhere in structured fields.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, zero waste. The verb-and-scope statement is front-loaded, then the routing rule, then the size-reducing tip — the most decision-relevant information comes first.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema exists, yet the description covers the return shape (JSON array), its magnitude, and how to shrink it. Combined with annotations covering safety and the schema covering both parameters, an agent has everything needed to call this correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the baseline is 3. The description adds semantics the schema does not: the fields parameter is framed as producing a compact index, with a concrete size consequence (~5 KB vs ~38 KB) and a worked example. That is real added meaning, though the resource enum itself is not elaborated beyond 'resource type.'
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource: "Lists every entity of one Star Wars resource type as a JSON array," and scopes the data (Episodes I-VI). It also names the siblings sw_search and sw_get, so an agent can place it apart from the lookup tools without opening a schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly routes the agent: "to find a single entity, prefer sw_search, then sw_get," and gives the condition for staying with this tool (a full-type listing). It also names the escape hatch for a lighter call (pass fields). Both when-to-use and when-to-use-something-else are stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
sw_randomARead-onlyInspect
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.
| Name | Required | Description | Default |
|---|---|---|---|
| resource | Yes | Resource type: PEOPLE, FILMS, PLANETS, SPECIES, STARSHIPS or VEHICLES. Any other value returns a tool error. |
TDQS
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.
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.
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.
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.
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.
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.
sw_searchARead-onlyIdempotentInspect
Start here. Finds Star Wars entities by name (title for FILMS) with a case-insensitive substring match: 'sky' finds Luke, Anakin and Shmi Skywalker. Returns a JSON array of full entities; an empty array [] means no match; pass fields to shorten each entity. The id to pass to sw_get is the last segment of each entity's url field. Data covers Episodes I-VI only.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Name or title fragment, case-insensitive (e.g. 'falcon', 'hope'). | |
| fields | No | Optional. Field names to keep in each entity (url is always kept), e.g. ["name"] (FILMS: ["title"]). Up to 24 names; an unknown name returns a tool error listing the valid ones. Omit for full entities. | |
| resource | Yes | Resource type: PEOPLE, FILMS, PLANETS, SPECIES, STARSHIPS or VEHICLES. Any other value returns a tool error. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare read-only/idempotent/closed-world, and the description still adds real behavioral context: returns a JSON array of full entities, [] means no match, fields trims payloads, and data is limited to Episodes I-VI. That last point independently corroborates openWorldHint=false and sets an agent's expectation about coverage gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Four tight sentences, front-loaded with the imperative 'Start here', each carrying distinct information: matching rule, example, return shape, downstream id derivation, and data scope. No redundancy with the schema.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the description fully compensates by describing the array return, the empty-array convention, field projection, and the url-to-id mapping. The Episode I-VI scope note closes the remaining gap an agent would otherwise hit silently.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the baseline is 3; the description still adds value by showing a worked query example and by explaining that the id needed downstream is embedded in the url field rather than returned as a top-level key. It does not restate the fields-count limit or enum error behavior, which the schema already covers.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb (finds), resource (Star Wars entities) and the matching rule (case-insensitive substring, with 'title' for FILMS). The concrete 'sky' example makes the semantics unambiguous and separates it from sw_get, which the description explicitly routes to.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
'Start here' gives an explicit entry-point instruction, and 'The id to pass to sw_get is the last segment of each entity's url field' defines the handoff to the obvious follow-up tool. There is no explicit 'use sw_list/sw_random instead when...' clause, so it falls short of full when/when-not guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
4 tool updates
- First observed
sw_get - First observed
sw_list - First observed
sw_random - First observed
sw_search
Related MCP Connectors
SWAPI MCP — wraps the Star Wars API (free, no auth)
Rick and Morty MCP — wraps the Rick and Morty API (free, no auth)
Rick and Morty MCP — wraps The Rick and Morty API (free, no auth)
MCP server exposing live Helldivers 2 galactic war data.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceMCP server for querying the Star Wars universe via the SWAPI API, providing access to characters, films, starships, vehicles, species, and planets.ISC
- AlicenseNot gradedqualityBmaintenanceProvides keyless access to a fan-built API of animated films, characters, locations, species, and vehicles, enabling list retrieval, single-item lookups, and plain-language queries through MCP tools.7 npmMIT
- FlicenseBqualityDmaintenanceA Model Context Protocol server that exposes Star Wars API data as MCP tools. It enables users to list available categories and retrieve character information.335 npm-
- AlicenseNot gradedqualityCmaintenanceEnables LLMs and clients to search for Star Wars characters, planets, and films by exposing SWAPI as MCP tools.1MIT
Glama MCP Gateway
Add one secure layer between your agents and this server.