find_xkcd
Finds semantically relevant xkcd comics for a given context. Returns results with similarity scores to help select strong conversational matches.
Instructions
Find xkcd comics semantically relevant to the current conversation.
Call this whenever an xkcd comic might enrich the conversation — when the discussion lands on a topic xkcd is famous for skewering (programming, science, statistics, relationships, the absurdity of standards, etc.).
Pass a concise description of the current topic or theme as context (a phrase
or sentence works better than a whole transcript), e.g. "spending hours
automating a task that was faster to do by hand" or "code finally compiling".
IMPORTANT — deciding whether to mention one. xkcd has a comic for almost every
topic, so this tool will nearly always return something. A result being
returned does NOT mean you should bring it up. Use the score as a signal and
apply your own judgment about conversational fit:
score >= 0.75 strong match — usually worth mentioning if it fits the moment
0.66 - 0.75 plausible — mention only if it genuinely lands
< 0.66 weak/tangential — almost always better to stay silent
Only one comic, at most, per topic — and only when it actually adds something.
When in doubt, say nothing; a forced reference is worse than none.
When you do share one, cite it by number and title with its url, and quote
the alt (mouseover) text — it's half the joke.
Returns a dict with a results list (num, title, score, url, image, alt,
explain_url) and a count. An empty list means nothing cleared the floor.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| context | Yes | ||
| min_score | No | ||
| max_results | No |