For one thing, “Kind of S” is not unique, since a thing can be a kind of something that is itself a kind of thing. Suppose clothing is a kind of thing, hats are a kind of clothing, and gloves are a kind of clothing. If the player has a hat and picks up gloves, should it refuse on the grounds that the player already has clothing? That’s probably not what you want.
There’s an extension Object Kinds by Brady Garvin which would let you get the most specific kind for any object, which would take care of the example above. But you still might not want this behavior; if you’ve defined things that aren’t of any special kind (like “A knife and a fork are in the Kitchen”), then they’ll both show up as kind “thing,” and you probably want the player to be able to pick them up. Though you could take care of this by special-casing so it doesn’t apply to “thing.”
My usual approach to this is to set up a relation among things of the same kind to block this, but then it wouldn’t give you the name of the kind. (That is, you could set a relation that relates every hat to every hat, every shoe to every shoe, and so on, and prevent the player from picking up something that bears that relation to something they’re carrying–but that rule wouldn’t give you a nice way to print “You already have a hat!”… though if you were willing to settle for the printed plural name property you could probably get the message “You don’t need two hats!”) So maybe Object kinds is the way to go.
As a note, the suggestion to make it easier to do things like this in native I7 is officially under review.
Thank you for the quick answer I’ll give that extension a try. It always can be useful.
My aim is not particularly preventing the player from having two swords (for example). What I’d like to know, above all, is how to make the player take the sword which is lying on the ground - when Inform, by default, makes him " take " the sword he’s already carrying, which is absurd (or, there is something I don’t understand).