There isn’t much competition in this category, admittedly, but “MacGruber” is the funniest “Saturday Night Live”-based film since “Wayne’s World.” We’d have breathed a sigh of relief if it were merely not awful. The fact that it’s actually pretty good, a gleefully silly action parody that doesn’t run out of steam before it’s over, is just icing on the cake.

The recurring SNL sketch it’s based on is a spoof of the 1980s TV series “MacGyver,” famous for its resourceful, duct-tape-wielding protagonist. MacGruber, played by Will Forte, is ostensibly just like MacGyver, with the joke being that he’s actually dangerously inept. (Each sketch ends with him and his crew being blown up.) The movie version, written by Forte and SNL writers John Solomon and Jorma Taccone (Taccone also directed), expands MacGruber’s character to include several more traits: cowardly, petty, vain, homophobic, delusional, immature, and maybe sociopathic. Like many characters played by another SNL-bred Will — that’d be Mr. Ferrell — what’s so funny about MacGruber is that, despite being the hero, he’s an awful person who’s terrible at his job. I mean, people die because of him. Regularly.

Forte and company have logically put MacGruber into an ’80s action-movie scenario. A former Navy SEAL, Army Ranger, and Green Beret, MacGruber is retired now, Rambo-style, when his old Pentagon friend, Gen. Faith (Powers Boothe), recruits him for an important mission. It seems a nuclear warhead has been stolen and must be found before it is deployed. And who is the thief? None other than the same dastardly villain responsible for the death of MacGruber’s wife. The bad guy, played by Val Kilmer, is named Dieter Von Cunth, primarily so the movie can make its characters say “cunth” over and over again.

Through a series of events that’s both comical and completely predictable given what you know about the MacGruber SNL sketches, MacGruber winds up working with an old partner named Vicki St. Elmo (Kristen Wiig) and a rookie military officer named Lt. Dixon Piper (Ryan Phillippe) in his efforts to stop Von Cunth. MacGruber’s methods of surveillance and espionage are unorthodox — one involves celery being misused in a manner that you will not soon forget — but not in the way that gets results, even accidentally, like Agent 86 in “Get Smart.” MacGruber gets results only rarely, and most of those are technically someone else’s doing. In that way, the film’s central joke is self-referential: This is a movie about a completely useless character who should not be the main character in a movie.

Unlike MacGruber, Will Forte is extremely capable. A fearless comedian, he has no problem forsaking all vestiges of dignity for the purpose of comedy, and his hit-to-miss ratio in “MacGruber” is high. Kristen Wiig, part of the glue that holds SNL together from week to week, is indispensable as Vicki, while serious actors Kilmer, Boothe, and Phillippe play things straight — an important element in any comedy. (It’s refreshing to see Kilmer, especially, remind us that he has a sense of humor.) Maya Rudolph also has a couple of funny moments as MacGruber’s late wife, seen in flashbacks and spectral visitations.

Having acknowledged that “MacGruber” is very funny, by turns crude and subtle but mostly crude, I must also acknowledge that it ain’t exactly an instant classic. Nothing about the film is revelatory; none of the gags are particularly inspired; it doesn’t represent a breakthrough in ’80s nostalgia-parody. (It might make this summer’s “A Team” movie seem pretty redundant, though.) With only a few exceptions, I doubt any of the punch lines or sight gags will be quoted — or even remembered — for very long. As far as solid-but-disposable comedies go, however, it’s more than enough to satisfy moviegoers, especially fans who are hungry for something SNL-related to appear on the big screen without embarrassing everyone.

B (1 hr., 30 min.; R, a lot of harsh profanity, a lot of vulgarity, some nonsexual nudity, some strong sexuality played for laughs, a lot of over-the-top comic violence.)