Build a CS2 3D viewer embed
embed_snippetEmbed a live, rotatable 3D CS2 item viewer on a web page. Generates cs2embed.js loader code, a raw iframe, or a React component from a Steam inspect link or catalog id.
Instructions
Use when a web page should show the live, rotatable 3D viewer of a CS2 item. Returns cs2embed.js loader code (default), a raw iframe or a React component, from a Steam inspect link or a catalog id. Tell the user to add the page origin under Allowed origins in the dashboard. For a flat picture use render_still. Example: {"id":"ak47_cu_ak47_cobra_gen","wear":0.24,"seed":661,"scene":"plate_dust2_video","controls":"poses","origin":"https://shop.example"}
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "embed_snippet"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bg | No | Background behind the item. transparent lets the page show through. | |
| id | No | Catalog id from catalog_search. | |
| ui | No | none hides the name plate. | |
| name | No | Name tag, up to 20 printable characters. Only with id. | |
| seed | No | Pattern seed, 0 to 1000. Only with id. | |
| view | No | Starting camera. Default front. | |
| wear | No | Float, 0 to 1. Only with id. | |
| charm | No | One charm. Only with id. | |
| light | No | Lighting. Defaults by view. | |
| scene | No | Map backdrop: plate_train_video, plate_ancient_video, plate_office_video, plate_dust2_video, plate_test_valley_waterfall (Splinter), plate_mocha_video, plate_boulder_video, plate_creek_video or plate_zion_video. bg wins if both are sent. | |
| theme | No | Styles the name plate, wordmark and buttons. | |
| width | No | Frame width in px, 160 to 1600. | |
| height | No | Frame height in px, 160 to 1600. | |
| origin | No | Origin of the page that will host the frame, such as https://shop.example or http://localhost:3000. | |
| inspect | No | Steam inspect link with the item as hex (copied from inside CS2, or a gen link), or the hex alone. | |
| variant | No | script: the cs2embed.js loader (default). iframe: a raw iframe. react: a React component. | script |
| controls | No | What a visitor can do. Default basic. full adds first person. | |
| stattrak | No | Kill counter. Any value makes the item StatTrak, 0 included. Only with id. | |
| stickers | No | Up to 5 stickers. Only with id. | |
| autorotate | No | Spin until the visitor first touches the frame. |