Skip to main content
Glama

Star Wars API & MCP server (swapi.build)

sw_get

Read-onlyIdempotent

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.

Input Schema

NameRequiredDescriptionDefault
idYesNumeric record id: the last segment of the entity's url field (1 in .../api/people/1).
expandNoOptional. 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.
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.7/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness5/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines5/5

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.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.