Get Comic
get_comicFetch a specific XKCD comic by its number (e.g., 353 for 'Python'). Returns title, image URL, alt text, publication date, transcript, and permalink.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"number": 353
},
"name": "get_comic"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| number | Yes | The XKCD comic number (e.g. 1, 353, 2867). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| alt | Yes | Alt text for the comic image | |
| img | Yes | URL to the comic image | |
| url | Yes | URL to view the comic on xkcd.com | |
| date | Yes | Publication date in YYYY-MM-DD format | |
| link | Yes | URL link related to the comic, or null if not present | |
| title | Yes | The comic title | |
| number | Yes | The comic number | |
| safe_title | Yes | The comic title with special characters escaped | |
| transcript | Yes | Transcript of the comic, or null if not available |