@Override
    public boolean isIntercepted(ShapeDetailsSection section) {
        var shape = section.shape();
        var model = section.context().model();
        var operationIndex = OperationIndex.of(model);

        if (shape.hasTrait(IdempotencyTokenTrait.ID)
                && operationIndex.isInputStructure(shape.asMemberShape().get().getContainer())) {
            return true;
        }

        var target = shape.isMemberShape()
                ? model.expectShape(shape.asMemberShape().get().getTarget())
                : shape;

        if (!target.isOperationShape()) {
            return false;
        }

        return shape.getMemberTrait(model, IdempotentTrait.class).isPresent()
                || shape.getMemberTrait(model, ReadonlyTrait.class).isPresent()
                || getIdempotencyToken(model, target.asOperationShape().get()).isPresent();
    }
Provides information about idempotency depending on a number of traits.
smithy-docgen/src/main/java/software/amazon/smithy/docgen/interceptors/IdempotencyInterceptor.java