Implementation:21st dev Magic mcp get take
| Knowledge Sources | |
|---|---|
| Domains | AI_Generation, Retrieval |
| Last Updated | 2026-10-19 16:40 GMT |
Overview
Concrete tool for reading the code of a single take within a generation, provided by the 21st MCP server (reached through the proxy).
Description
The get_take tool returns the generated UI code for one take (variant) of a generation, identified by `generationId` + `takeId`. Reads remain available even when AI access is off. 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_take` after Implementation:21st_dev_Magic_mcp_get_generation has listed the takes of a generation, to read the actual code of the one you want to install or adapt.
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_take(generationId: string, takeId: string): {
code: string; // generated UI source for this take
};
Import
// Not imported. Call as an MCP tool through the 21st MCP server:
// { "jsonrpc": "2.0", "id": <n>, "method": "tools/call",
// "params": { "name": "get_take",
// "arguments": { "generationId": "...", "takeId": "..." } } }
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| generationId | string | Yes | Id of the generation |
| takeId | string | Yes | Specific take within the generation |
Outputs
| Name | Type | Description |
|---|---|---|
| code | string | Generated UI source for this take |
Usage Examples
Read a take's code
{
"jsonrpc": "2.0",
"id": 6,
"method": "tools/call",
"params": {
"name": "get_take",
"arguments": { "generationId": "gen-abc123", "takeId": "take-2" }
}
}
Related Pages
Implements Principle
Requires Environment
Notes
- Reads remain available with AI off; only `generate` is gated.
- Companion: Implementation:21st_dev_Magic_mcp_get_generation lists the takeIds of a generation.