Get icon SVG
get_icon_svgGet an icon as SVG by its ID - PREFERRED FORMAT for Icons8 icons. SVG scales to any size; a PNG is a fixed-size raster. Needs an Icons8 plan with MCP access, through a sign-in or a personal API key. Each successful call counts as one download of the plan. When the plan's allowance is spent, or the plan has none, the call refuses and returns a free PNG link instead.
An animated icon's SVG is a still frame - Icons8 publishes no animated vector. The result then carries a "note" saying so and an "animation" block with the motion, so no further call is needed.
Args: icon_id: The id from a search_icons result (field icons[].id) ctx: MCP context for API access
Returns: Dictionary containing the SVG content. For an animated icon it also carries a "note" saying the SVG is a still frame and an "animation" block of permanent gif and apng links. On failure, an "error" describing what the Icons8 API said - a rejected key is reported, not returned as an empty icon. Counts toward the paid-download limit: a refusal carries "retry_after_seconds" and a free PNG "url". When the plan's download allowance is spent, or the plan has none, the error says so, "code" is "limit_exhausted" and "url" is again a free PNG: until that allowance changes or renews, get_icon_svg refuses every icon this account has not downloaded before (the Lottie of get_icon_animation spends its own), and get_icon_png_url still works
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": {
"icon_id": "<icon_id>"
},
"name": "get_icon_svg"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| icon_id | Yes | Icon id from the results of search_icons (field icons[].id) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| svg | No | SVG markup of the icon. Absent when error is set. | |
| url | No | Free 24px PNG link. Set only when the call was refused: by the hourly download limit, by code "limit_exhausted", because the account's plan has no MCP access, or because the account could not be verified. | |
| code | No | "limit_exhausted" when the download allowance of the plan is spent, or the plan has none. error then says what to do. | |
| note | No | Set only for an animated icon: the SVG is a still frame. | |
| error | No | Set only on failure. | |
| animation | No | Permanent gif and apng links. Set for an animated icon, and when the download limit refused the call. | |
| retry_after_seconds | No | Seconds until the download limit resets. Set only when the limit refused the call. |