Implementation:21st dev Magic mcp get generation
| Knowledge Sources | |
|---|---|
| Domains | AI_Generation, Retrieval |
| Last Updated | 2026-10-19 16:40 GMT |
Overview
Concrete tool for reading a generation record (all takes) by id, provided by the 21st MCP server (reached through the proxy).
Description
The get_generation tool returns the generation record for a given `generationId`, including its takes (variants). Reads remain available even when AI access is off, so previously-created drafts can be reviewed after entitlement lapses. Hosted server-side at `https://21st.dev/api/mcp`; this repo only forwards calls to it opaquely over the proxy.
This is an External Tool Doc: the signature below is reconstructed from `skills/21st-ui/SKILL.md` and `README.md`, not from in-repo source.
Usage
Call `get_generation` to inspect a generation produced by Implementation:21st_dev_Magic_mcp_generate (or an existing sketch draft id). Use Implementation:21st_dev_Magic_mcp_get_take to read the actual code of a specific take.
Code Reference
Source Location
- Repository: magic-mcp (proxy; tool is server-side)
- Docs: skills/21st-ui/SKILL.md:L37, README.md:L39
- Transport: forwarded via Implementation:21st_dev_Magic_mcp_forward
Signature
// JSON-RPC tool call, proxied to https://21st.dev/api/mcp
get_generation(generationId: string): {
id: string;
takes: Array<{ takeId: string; previewUrl?: string }>;
// ...other generation metadata
};
Import
// Not imported. Call as an MCP tool through the 21st MCP server:
// { "jsonrpc": "2.0", "id": <n>, "method": "tools/call",
// "params": { "name": "get_generation",
// "arguments": { "generationId": "..." } } }
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| generationId | string | Yes | Id from a prior `generate` call, or an existing sketch draft id |
Outputs
| Name | Type | Description |
|---|---|---|
| generation | object | The generation record, including takes with their takeIds |
Usage Examples
Read a generation's takes
{
"jsonrpc": "2.0",
"id": 5,
"method": "tools/call",
"params": {
"name": "get_generation",
"arguments": { "generationId": "gen-abc123" }
}
}
Related Pages
Implements Principle
Requires Environment
Notes
- Reads remain available with AI off; only `generate` is gated.
- Companion: Implementation:21st_dev_Magic_mcp_get_take reads a single take's code.