Ah-ha! I got tag sources to work at TV episode level.
At first, I was trying to modify the logic in Sweder's excellent TheMovieDB script.
That approach for movies can be made to work well in searching for TV series by name and year.
I use Mp3tag's album field for series name (suffixed with season number in the format - S99), so my SearchBy and IndexUrl for series level tagging are set up as follows:
[SearchBy]=Series||$regexp(%album%,'(.*)( - S\d\d)',$1)||&query=%s||Year||%year%||&year=%s
[IndexUrl]=https://api.themoviedb.org/3/search/tv?query=%s&api_key=XXXXXXXXXXXX&language=en-GB
However, once series level tags are populated this way, in particular, ensuring that TMDB tag is populated...
OutputTo "TMDB"
json_select "id"
SayRest
... then, assuming you already have (or can input) season number and episode number, you can call a second tag source script to get TV episode level information (for example, episode name).
The trick with the episode level script is to leave out IndexUrl, and have an empty ParserScriptIndex section, as you don't need to search and select from query results when you have unique identifiers.
Instead (as I figured out after looking at Cover Art#Discogs Release ID.src), you can just use SearchBy criteria to construct AlbumUrl directly.
Bearing in mind that I use %discnumber% rather than %tvepisiode% (as Mp3tag's TVEPISIODE field isn't mapped properly for MKV), SearchBy and AlbumUrl are thus set in my TV episode script as follows:
[SearchBy]=SeriesId||%tmdb%||%s||Season||%tvseason%||/season/%s||Episode||%discnumber%||/episode/%s
[AlbumUrl]=https://api.themoviedb.org/3/tv/%s?append_to_response=credits,external_ids&api_key=XXXXXXXXXXXX&language=en-GB