Create code tour card
create_code_tour_cardRender source code as an interactive card with one tab per file and copy buttons. Use a zip archive or explicit files; large projects split into paginated parts.
Instructions
Render a project's source as an interactive card with one tab per file (code with copy buttons). Explicit files keep the order they are given in, with README and manifests hoisted to the front; archive files are ordered README, manifest, then src. Pass the path of a zip archive generated earlier in the conversation for a one-call plug-n-play tour, or pass files explicitly. Files are packed into parts of about 32,000 rendered characters each regardless of how many there are, so a handful of medium files still splits. The result's structuredContent.parts {current,total,hasMore} reports the split: while hasMore is true some files were withheld, so call again with part: current + 1 and identical other arguments until every part has rendered.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| part | No | Part number for large projects (1-based). Big tours split automatically; while structuredContent.parts.hasMore is true, call again with the next part. | |
| files | No | Explicit files to show when not using archivePath | |
| intro | No | Guidance shown in a leading 'Start here' tab | |
| title | Yes | ||
| include | No | With archivePath: only include entries whose path contains one of these | |
| maxTabs | No | ||
| subtitle | No | ||
| tutorTerms | No | Educational tutor terms. The first occurrence of each term in the card's visible prose is underlined; hovering ~1.2s shows the tip and notifies the host so the model can follow up. Terms are matched once per card, longest first, and never inside code samples, tooltips, or another term's tip. Matching is CASE-SENSITIVE, so "PATH" does not attach its tip to a filesystem "path"; set caseInsensitive on a term to match any casing. Term and tip are PLAIN text. | |
| archivePath | No | Path to a zip ON THE MACHINE RUNNING THIS SERVER, not in the caller's sandbox. Over a remote bridge those are different machines: if the archive exists only on your side, pass its text files as files instead. | |
| contextActions | No | Right-click menu actions the model anticipates being useful. Choosing one sends its prompt to the conversation; use {{selection}} to include the user's selected text. | |
| tutorTermsInCode | No | Also highlight tutorTerms inside the code samples. Off by default, because marking up language keywords in source is noise rather than teaching. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| card | Yes | ||
| parts | Yes | Split state, present on EVERY card result so one completeness check works for all card types. Cards that cannot split always report {current:1,total:1,hasMore:false}; create_markdown_card and create_code_tour_card pack oversized content into parts and can report more. Read hasMore rather than the card title to decide whether content was withheld. |