Get a component’s source
get_component_sourceRetrieve any encode-ui component's full source or demo code, including all imported files, as readable text.
Instructions
Every TSX file one component ships, or its demo usage example, in fenced code blocks. A multi-file component returns ALL of its files — the public module plus every sibling it imports (.parts.tsx pairs, block modules) — because the entry file alone does not compile. Check sourceBytes/demoBytes on get_component first if size matters. Returns code as text rather than a JSON field, so it stays readable.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>"
},
"name": "get_component_source"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Component slug, e.g. magnetic-button. A leading scope prefix is accepted and ignored. | |
| part | No | Which payload: the component source, or its demo usage example. | source |